####Go to temp dir
$ cd /tmp
####Download your version of btsync i386
or x64
$ curl http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz -o btsync.tar.gz
# i386
$ curl http://btsync.s3-website-us-east-1.amazonaws.com/btsync_x64.tar.gz -o btsync.tar.gz
# x64
####Then unpack this shit
$ tar -xf btsync.tar.gz
####And move to your local bin
$ sudo mv btsync /usr/local/bin/
####Create a user and a group named btsync and give it a home folder
View gist:8979417
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
➜ ~ rvm use 2.0.0 | |
Using /Users/ylansegal/.rvm/gems/ruby-2.0.0-p353 | |
➜ ~ gem i gosu | |
Building native extensions. This could take a while... | |
ERROR: Error installing gosu: | |
ERROR: Failed to build gem native extension. | |
/Users/ylansegal/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb | |
The Gosu gem requires some libraries to be installed system-wide. |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View players.txt
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
Alan PULIDO Mexico 08/03/1991 5 4 | |
Adam TAGGART Australia 02/06/1993 4 3 | |
Reza GHOOCHANNEJAD Iran 20/09/1987 13 9 | |
NEYMAR Brazil 05/02/1992 48 31 | |
Didier DROGBA Ivory Coast 11/03/1978 100 61 | |
David VILLA Spain 03/12/1981 95 56 | |
Abel HERNANDEZ Uruguay 08/08/1990 12 7 | |
Javier HERNANDEZ Mexico 01/06/1988 61 35 | |
Islam SLIMANI Algeria 18/06/1988 19 10 | |
Shinji OKAZAKI Japan 16/04/1986 75 38 |
View pie_test.csv
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
Country | Likness | |
---|---|---|
USA | 50 | |
Mexico | 25 | |
Canada | 25 | |
India | 50 |
View example.rb
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
>> Thread.current[:your_variable] = 3 | |
=> 3 | |
>> puts Thread.current[:your_variable].to_i + 1 | |
4 | |
=> nil | |
>> Thread.new { puts Thread.current[:your_variable].to_i + 1 }.join | |
1 | |
=> #<Thread:0x007fa68d94d870@(irb):18 dead> | |
>> |
View gist:4272448
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 "sass" | |
require "compass" | |
def compile_sass(sass_file) | |
sass_dir = File.dirname(sass_file) | |
compass_dir = File.join(Compass.base_directory, "frameworks/compass/stylesheets") | |
css_dir = File.join(File.dirname(__FILE__), 'css') | |
Sass.compile(File.read(sass_file), :syntax => :scss, :load_paths => [sass_dir, compass_dir, css_dir]) | |
end |
View README.md
View delayed_job.rb
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
# config/initializer/delayed_job.rb | |
Thread.new { Delayed::HardenedWorker.new.start } |
View sample_meat_of_controller_action.txt
This file has been truncated, but you can view the full file.
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
Total time: 0.62 | |
%total %self total self children calls name | |
--------------------------------------------------------------------------------------------------------- | |
100% 0% 0.62 0.00 0.62 1 (top) | |
0.59 0.00 0.59 1/1 UserDecorator#to_client_api_resources_hash | |
0.01 0.00 0.01 1/2096 Class#new | |
0.01 0.00 0.01 1/79 ActiveSupport::Dependencies::ModuleConstMissing.const_missing | |
0.00 0.00 0.00 1/2 Repo::Oauthorization::GeneratedAssociationMethods.user |
View update-rbenv-rubygems.sh
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
#! /usr/bin/env bash | |
set -e | |
eval "$(rbenv init -)" | |
for version in `rbenv whence gem`; do | |
rbenv shell "$version" | |
echo "Updating rubygems for $version" | |
gem update --system --no-document --quiet |
OlderNewer