Word / Phrase | acroym | iphone autocomplete |
---|---|---|
Working from home | wfh | egg |
This file contains 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 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 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 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 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 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 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" /> |
This file contains 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
# Create a fresh git repo | |
git :init | |
git :add => "." | |
git :commit => "-m 'Initial commit.'" | |
# Create the javascripts dir | |
run 'mkdir public/javascripts' |
This file contains 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
# Create the javascripts dir | |
run 'mkdir public/javascripts' | |
# pull down jquery, jquery-ui and the appropriate rails driver | |
run 'curl -L http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js > public/javascripts/jquery.js' | |
run 'curl -L http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js > public/javascripts/jquery-ui.js' | |
run 'curl -L http://github.com/rails/jquery-ujs/raw/master/src/rails.js > public/javascripts/rails.js' |