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 | |
#This is a start script for nginx. Tested on Unbuntu Edge. | |
#Should work on Ubuntu, Debian and probably a few other Linux distros. | |
#Change DAEMON and CONFIG_FILE if neccessary | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
#Location of nginx binary. Change path as neccessary |
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
rvm remove 1.9.2 | |
curl https://gist.github.com/raw/999435/fc2718ac3f488ab2341b65dc2ae5c123f8859bff/fast-require-ruby-19.2-p180 > /tmp/require-performance-fix.patch | |
rvm install 1.9.2 --patch /tmp/require-performance-fix.patch |
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
server "a.production.com", :app | |
server "b.production.com", :app |
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
Ext.require(['Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.state.*', 'Ext.window.*']); | |
Ext.onReady(function() { | |
var myData = [ | |
['3m Co']]; | |
var store = Ext.create('Ext.data.ArrayStore', { | |
fields: [ | |
{ | |
name: 'company' |
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
main thread profile results: | |
Total time: 21.13 | |
total self children calls method | |
---------------------------------------------------------------- | |
18.16 0.00 18.16 1 RSpec::Core::Runner.run | |
18.01 0.01 18.00 189 Array#collect | |
17.95 0.00 17.95 1 RSpec::Core::Runner.run_in_process | |
17.95 0.00 17.95 1 RSpec::Core::CommandLine#run | |
16.90 0.00 16.90 1 RSpec::Core::Reporter#report |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var array = []; | |
var emptyArray = []; | |
console.log(array); | |
// Google Chrome 10.0.648.204 #=> [1, 2, 3, 4, 5, 6] - WTF? |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var array = []; | |
var emptyArray = []; | |
console.log(array); | |
// Google Chrome 10.0.648.204 #=> [1, 2, 3, 4, 5, 6] - WTF? |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
alert("string".constructor == String); | |
</script> | |
</body> | |
</html> |
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 | |
NAME=<set your application name here> | |
DIRECTORY=<set your application directory here> | |
PIDFILE=/var/run/$NAME.pid | |
DAEMON="/usr/local/rvm/bin/rvm exec rackup" | |
DAEMON_ARGS="-s Kirk config.ru -p 3000 -P $PIDFILE" |
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 ModelBase < ActiveRecord::Base | |
end | |
class BaseA < ModelBase | |
has_many :things, :as => :model_a | |
end | |
class BaseB < ModelBase | |
has_many :things, :as => :model_b | |
end |