| Word / Phrase | acroym | iphone autocomplete |
|---|---|---|
| Working from home | wfh | egg |
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
| Install PG from binary + rubygem | |
| PATH=$PATH:/Library/PostgreSQL/9.0/bin gem install pg |
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
| function Weather(locationName){ | |
| var locationURL = "http://www.google.com/ig/api?weather="+locationName; | |
| var forcast = {}; | |
| $.get(locationURL, function(data){ | |
| var current = $(data).find('current_conditions'); | |
| ['condition', 'temp_f', 'temp_c', 'humidity', 'wind_condition'].forEach(function(attribute){ | |
| forcast[attribute] = $(current).find(attribute).attr('data'); | |
| }); | |
| }); |
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
| alias sublime='open -a "Sublime Text 2"' |
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
| sudo /usr/sbin/apachectl restart |
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
| # found this the other day while looking for something entirely different.. | |
| # http://webcache.googleusercontent.com/search?q=cache:s4vKoo5lpwoJ:blog.viamentis.com/articles/category/ruby/page/2/+chat+AI+ruby&cd=10&hl=en&ct=clnk&client=safari | |
| require 'net/http' | |
| def eliza(str) | |
| response = Net::HTTP.post_form(URI.parse("http://www-ai.ijs.si/eliza-cgi-bin/eliza_script"),{'Entry1'=>str}) | |
| return response.body.split("</strong>\n").last.split("\n").first | |
| end |
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
| dpkg --get-selections > installed-software |
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
| /* Ismael Celis 2010 | |
| Simplified WebSocket events dispatcher (no channels, no users) | |
| var socket = new FancyWebSocket(); | |
| // bind to server events | |
| socket.bind('some_event', function(data){ | |
| alert(data.name + ' says: ' + data.message) | |
| }); |
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
| # divide an array with one pint too many | |
| class Array | |
| def /(divider) | |
| divider = divider.to_i | |
| collection_size = size / divider | |
| array = [] | |
| each_with_index do |element, index| | |
| index % collection_size == 0 && divider != array.size ? array << [element] : array.last.push(element) | |
| end | |
| array.size == 1 ? array.flatten! : array |
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
| <link rel="apple-touch-icon" media="screen and (resolution: 163dpi)" href="57px.png" /> | |
| <link rel="apple-touch-icon" media="screen and (resolution: 132dpi)" href="72px.png" /> | |
| <link rel="apple-touch-icon" media="screen and (resolution: 326dpi)" href="114px.png" /> |