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
#footer { | |
left: auto; | |
bottom: 0px; | |
right: 0; | |
width: 500px; | |
height: 100%; | |
} | |
#info_playlist_frame_left { | |
height: 100%; |
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
application = "example" | |
environment = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'production' | |
app_path = "/usr/local/rails/#{application}" | |
shared_path = "#{app_path}/shared/" | |
timeout 30 | |
preload_app true | |
worker_processes 3 | |
listen "/tmp/unicorn-#{application}.sock" |
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
ioreg -lw0 | grep EDID | sed "/[^<]*</s///" | xxd -p -r | strings -6 |
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
class Neko | |
nyan: => | |
@_nyan || do => | |
alert 'nyan' | |
@_nyan = true | |
neko = new Neko | |
neko.nyan() #=> alert 'nyan' & true | |
neko.nyan() #=> true |
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
_.mixin | |
sample: (count, array) -> | |
if !array | |
array = count | |
count = 1 | |
sample = Array(count) | |
_(count).times (i) -> sample[i] = (array[Math.floor(Math.random() * array.length)]) | |
return sample |
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
# coding: utf-8 | |
require 'hashie' | |
hash = {:foo => 1, "bar" => {:baz => 2}} | |
m = Hashie::Mash.new(hash, nil) do |_, method_name| | |
raise NoMethodError, "undefined method `#{method_name}'", caller(5) | |
end | |
puts m.foo #=> 1 | |
puts m.bar.baz #=> 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
require "open-uri" | |
require "nokogiri" | |
require "pp" | |
base_url = "http://dribbble.com" | |
@file = File.open('dribbble_profile_urls.txt','w') | |
def get_web_link(url) | |
doc = Nokogiri::HTML(open(url)) | |
doc.css('.profile-details .url').each do |link| |
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
load 'deploy/assets' | |
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
%x{bundle exec rake assets:precompile} | |
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}} | |
%x{bundle exec rake assets:clean} | |
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
#!/bin/sh | |
set -u | |
set -e | |
# Example init script, this can be used with nginx, too, | |
# since nginx and unicorn accept the same signals | |
# Feel free to change any of the following variables for your app: | |
APP_ROOT=/home/deploy/public_html/rm/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
ENV=production |
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
source 'https://rubygems.org' | |
gem 'chatroid' | |
gem 'im-kayac' |