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 test ( | |
id serial NOT NULL primary key, | |
name text | |
desc1 text | |
desc2 text | |
); | |
CREATE INDEX alll ON test(name, desc1, desc2); | |
CREATE INDEX name ON test(name); | |
CREATE INDEX more ON test(name, desc1); | |
CREATE INDEX more1 ON test(name, desc2); |
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
osascript -e 'tell application "Keyboard Maestro Engine" to do script "Keyboard International"' |
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
--color | |
--require spec_helper |
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
def do_job | |
return if @cleaning | |
puts "Starting cleanup" | |
@cleaning = true | |
sleep(10) # simulate killing of sinatra app | |
puts "Completed" | |
exit | |
end | |
while true | |
trap('INT') { do_job } |
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
van_glory = Game.new title: ‘Van Glory’ | |
fates = Game.new title: ‘Fates Forever’ | |
van_gloryless = Game.new title: ‘Van Glory’ | |
van_glory === van_glory # true | |
fates === van_glory # false | |
van_gloryless === van_glory # false |
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
defmodule Factorial do | |
def factorial(n) when n>1 do | |
n * factorial(n-1) | |
end | |
def factorial(n) when n <=1 do | |
1 | |
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
FROM nginx | |
RUN rm /etc/nginx/conf.d/default.conf | |
COPY default.conf /etc/nginx/conf.d/default.conf | |
EXPOSE 80 | |
CMD ["nginx", "-g", "daemon off;"] |
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
FallbackResource /index.php |
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 'twitter' | |
require 'unirest' | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "CONSUMER KEY" | |
config.consumer_secret = "CONSUMER SECRET" | |
config.access_token_secret = "ACCESS TOKEN SECRET" | |
config.access_token = "ACCESS TOKEN" | |
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
# File Cheffile | |
#!/usr/bin/env ruby | |
#^syntax detection | |
site 'http://community.opscode.com/api/v1' | |
cookbook 'apt' | |
cookbook 'php' | |
cookbook 'apache2' |