| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ## redisZsetWorker | |
| // Requires Underscore.js | |
| // http://documentcloud.github.com/underscore/ | |
| // | |
| // Creates an easy to use object from a Redis sorted set. | |
| // | |
| // * Calculate to total, min and max of all scores | |
| // * Calculate a font size (default: 1-10) to create a tag cloud | |
| // * Calculate the percentage for each item | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require("sys"), | |
| url = require("url"), | |
| _ = require('./underscore-min'), | |
| redisclient = require("redis"), | |
| redisNEW = redisclient.createClient(6379,'127.0.0.1'); | |
| redisOLD = redisclient.createClient(6379,'192.168.11.18') | |
| function moveHash(rep) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--- | |
| Parts of this are based on Tim Dawe's | |
| http://amazonsig.riaforge.org | |
| and | |
| Joe Danziger's Amazon S3 REST Wrapper | |
| http://amazons3.riaforge.org/ | |
| Written by Patrick Liess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--- suppose your query you did with cfquery is stored in the variable myQuery ---> | |
| <script> | |
| var q = #SerialzeJSON(myQuery,true)#; | |
| // make an easy to use object | |
| var newQuery = queryToObject(q); | |
| console.log(newQuery); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script class="jsbin" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.1.7/underscore-min.js"></script> | |
| <meta charset=utf-8 /> | |
| <title>JS Bin</title> | |
| <!--[if IE]> | |
| <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> | |
| <style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #################################### | |
| # BASIC REQUIREMENTS | |
| # http://graphite.wikidot.com/installation | |
| # http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
| # Last tested & updated 10/13/2011 | |
| #################################### | |
| sudo apt-get update | |
| sudo apt-get upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Fisher-Yates shuffle in Coffeescript | |
| # | |
| # _shuffle(array) | |
| # | |
| # Returns a shuffled version of the array leaving the original untouched. | |
| _shuffle = (obj) -> | |
| shuffled = [] | |
| for e, i in obj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Redis ZSET to Leaderboard | |
| # | |
| # Transform a Redis ZREVRANGE result which should be something like this: | |
| # `["userid123",1234,"userid567",952,"someotherUser",200]` | |
| # | |
| # Result is an array like this: | |
| # [ | |
| # {"u":"userid123","s":1234}, | |
| # {"u":"userid567","s":952}, | |
| # {"u":"someotherUser","s":200} |
OlderNewer