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
FB.getLoginStatus Object {authResponse: undefined, status: "unknown"} | |
FB.login Object {authResponse: Object, status: "connected"} |
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
require 'eventmachine' | |
require 'em-http-request' | |
EM.run { | |
timer = EM::PeriodicTimer.new(60) do | |
http = EM::HttpRequest.new('http://nodeknockout.com/teams/new').get | |
http.errback { | |
puts 'Uh oh' | |
} |
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
gem 'rails-api' | |
gem 'active_model_serializers' | |
gem_group :development, :test do | |
gem 'debugger' | |
gem 'rspec-rails' | |
gem 'shoulda-matchers' | |
gem 'factory_girl_rails' | |
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
giovanni@thinkpad:~$ jitsu users confirm potomak XXX | |
info: Welcome to Nodejitsu | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command users confirm potomak XXX | |
info: Confirming user potomak | |
info: Great success! potomak is now confirmed. | |
info: User potomak confirmed | |
info: Would you like to log in now? | |
prompt: (yes/no): (yes) | |
info: Attempting to log in as potomak |
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
<% [:notice, :error, :alert].each do |level| %> | |
<% unless flash[level].blank? %> | |
<div class="alert-message <%= flash_class(level) %>"> | |
<a class="close" href="#">×</a> | |
<%= content_tag :p, flash[level] %> | |
</div> | |
<% end %> | |
<% 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
#!/bin/sh | |
for i in $(ls -r -t /System/Library/Speech/Voices/ | awk -F'.' '{print $1}'); do | |
echo $i | |
say -v $i "Hi, I'm $i" | |
done |
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
require 'rubygems' | |
require 'term/ansicolor' | |
COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'] | |
class String | |
include Term::ANSIColor | |
end | |
(0..15).each do |x| |
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
git config --global color.diff auto | |
git config --global color.status auto | |
git config --global color.branch auto |
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
require 'open-uri' | |
(1..700).each do |factor| | |
threads = [] | |
(1..100).each do |id| | |
threads << Thread.new(id+100*factor) { |image_id| | |
log = "#{image_id} opening image... " | |
begin |