Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| // Ruby = 5.times { |i| puts i } | |
| // JS = (1).times(function(i){console.log(i);}) | |
| Number.prototype.times = function(cb) { | |
| var i = -1; | |
| while (++i < this) { | |
| cb(i); | |
| } | |
| return +this; |
| var randomNumbers = [42, 12, 88, 62, 63, 56, 1, 77, 88, 97, 97, 20, 45, 91, 62, 2, 15, 31, 59, 5] | |
| func partition(v: Int[], left: Int, right: Int) -> Int { | |
| var i = left | |
| for j in (left + 1)..(right + 1) { | |
| if v[j] < v[left] { | |
| i += 1 | |
| (v[i], v[j]) = (v[j], v[i]) | |
| } | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| 'use strict'; | |
| var COMPILED = !0, goog = goog || {}; | |
| goog.global = this; | |
| goog.DEBUG = !1; | |
| goog.LOCALE = "en"; | |
| goog.provide = function (a) { | |
| if (!COMPILED) { | |
| if (goog.isProvided_(a)) | |
| throw Error('Namespace "' + a + '" already declared.'); |
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg
| data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
| <?php | |
| $db = new PDO('mysql:host=hostname;dbname=defaultDbName', | |
| 'username', 'password', | |
| array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); | |
| $query = 'SELECT * FROM my_table WHERE title = :title'; | |
| $stmt = $db->prepare($query); | |
| $stmt->bindValue(':title', $myTitle); | |
| $stmt->execute(); |
| @media (max-width: 480px) { | |
| /* Mobile CSS goes here */ | |
| } |
| @media only screen and (-webkit-device-pixel-ratio: .75) { | |
| /* CSS for Low-density screens goes here * | |
| * Ex: HTC Evo, HTC Incredible, Nexus One */ | |
| } | |
| @media only screen and (-webkit-device-pixel-ratio: 1) and (max-device-width: 768px) { | |
| /* CSS for Medium-density screens goes here * | |
| * Ex: Samsung Ace, Kindle Fire, Macbook Pro * | |
| * max-device-width added so you don't target laptops and desktops */ | |
| } |
| #!/bin/bash | |
| # License: Public Domain. | |
| # Author: Joseph Wecker, 2012 | |
| # | |
| # Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? | |
| # Are you tired of trying to remember how darwin/mac-osx treat them differently from linux? | |
| # Are you tired of not having your ~/.bash* stuff work the way you expect? | |
| # | |
| # Symlink all of the following to this file: | |
| # * ~/.bashrc |