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
# binstubs light | |
function bundle_exec { | |
bundler=`bundle list 2>&1` | |
cmd=$1 | |
shift | |
if [[ $bundler == "" || $bundler =~ "Could not locate Gemfile" ]] | |
then | |
command="$cmd $@" | |
else |
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
/* ====================== */ | |
/* = resources :baskets = */ | |
/* ====================== */ | |
butler_baskets GET /butler/baskets(.:format) {:action=>"index", :controller=>"butler/baskets"} | |
POST /butler/baskets(.:format) {:action=>"create", :controller=>"butler/baskets"} | |
new_butler_basket GET /butler/baskets/new(.:format) {:action=>"new", :controller=>"butler/baskets"} | |
edit_butler_basket GET /butler/baskets/:id/edit(.:format) {:action=>"edit", :controller=>"butler/baskets"} | |
butler_basket GET /butler/baskets/:id(.:format) {:action=>"show", :controller=>"butler/baskets"} | |
PUT /butler/baskets/:id(.:format) {:action=>"update", :controller=>"butler/baskets"} | |
DELETE /butler/baskets/:id(.:format) {:action=>"destroy", :controller=>"butler/baskets"} |
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
initial load 0.010000 0.000000 0.010000 ( 0.001589) | |
Calculating ------------------------------------- | |
::new 71.000 i/100ms | |
------------------------------------------------- | |
::new 726.286 (± 3.4%) i/s - 3.692k | |
Calculating ------------------------------------- | |
::one 71.000 i/100ms | |
#one 6.942k i/100ms | |
------------------------------------------------- |
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
# add source | |
cat >> /etc/apt/sources.list <<EOF | |
# Percona XtraBackup | |
deb http://repo.percona.com/apt precise main | |
deb-src http://repo.percona.com/apt precise main | |
EOF | |
# add signing key | |
apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A |
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
# add source | |
cat >> /etc/apt/sources.list <<EOF | |
# Nginx | |
deb http://nginx.org/packages/ubuntu/ disco nginx | |
deb-src http://nginx.org/packages/ubuntu/ disco nginx | |
EOF | |
# add signing key | |
curl http://nginx.org/packages/keys/nginx_signing.key | sudo apt-key add - |
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
ff18f75f8b0ad1c1363d5cce9db813da GrandTheftAutoV.exe | |
882b69cc9478004e2878655a099d31ff GrandTheftAutoV.exe.001 | |
164b9522cbf574a04603e956cf558aa4 GrandTheftAutoV.exe.002 | |
08c2ff42b2123ed6abd91395e8869e72 GrandTheftAutoV.exe.003 | |
1f3d7ca33f1f98897606857a2e73a33b GrandTheftAutoV.exe.004 | |
0a7e62e837ee3784257b0dacc502d9a2 GrandTheftAutoV.exe.005 | |
c1f95852ca39c2b3c772fd5a10007e70 GrandTheftAutoV.exe.006 | |
2d08e283e9e47c6be5190d8ebaf811f6 GrandTheftAutoV.exe.007 | |
ad2cfc3b2fb36bebd5cbe43681db6316 GrandTheftAutoV.exe.008 | |
ae9f9c1b475f0eb06ff9c6c751ed809c GrandTheftAutoV.exe.009 |
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_table "codenames", force: true do |t| | |
# t.integer "user_id" | |
# t.string "name" | |
# t.datetime "created_at" | |
# t.datetime "updated_at" | |
# end | |
# add_index "codenames", ["name"], name: "index_codenames_on_name", unique: true, using: :btree | |
# add_index "codenames", ["user_id"], name: "index_codenames_on_user_id", unique: true, using: :btree | |
class Codename < ActiveRecord::Base |
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
# Heavily inspired by https://gist.github.com/erpe/8586565 | |
# Call `PiwikAnalytics.init()` once per document load, e.g.: | |
# unless $(document).data("piwik_loaded") | |
# PiwikAnalytics.init() | |
# $(document).data("piwik_loaded", "loaded") | |
class @PiwikAnalytics | |
@trackerUrl: -> "//analytics.example.net" | |
@siteId: -> |
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
# put this in an initializer | |
# and use/output MemProfiler.profile all over the place (we use HTML comments). | |
class MemProfiler | |
def self.profile | |
Thread.main[:memprof_last_tick] ||= 0 | |
Thread.main[:memprof_last_tick] += 1 | |
was = Thread.main[:memprof_last_val] | |
now = Thread.main[:memprof_last_val] = measure | |
if was |
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
module Mcl | |
Mcl.reloadable(:AutomaticServerRestart) | |
class AutomaticServerRestart < Handler | |
def setup | |
@stop_at = 1.hour.from_now | |
end | |
def tick! | |
# only check every 240 MCL ticks == 60 seconds |