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
steps to squash and merge a lot running feature branch: | |
# on feature branch {guest-crm}, make a clean space to play | |
git checkout guest-crm | |
git checkout -b package-guest-crm | |
# here, find a commit before the first you want to use in the squash | |
git rebase -i 1f98b7a26a9874105 | |
# on this screen, keep the first commit as "pick", for everything below, switch pick to s or squash | |
# save |
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
https://github.com/eddorre/SublimeERB | |
https://github.com/wesf90/rails-partial | |
https://github.com/pavelpachkovskij/sublime-html-to-haml | |
https://github.com/sobstel/SyncedSideBar | |
rubocop (maybe, can be slow) |
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 head_status(u) | |
uri = URI(u) | |
Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http| | |
request = Net::HTTP::Head.new uri | |
response = http.request request # Net::HTTPResponse object | |
response.code | |
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
{ :admin => | |
{ | |
role: Role.create(name: 'admin'), | |
asdf: 'asdf' | |
} | |
:staff => | |
{ | |
} | |
:concierge => |
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
# http://stackoverflow.com/questions/19991445/run-an-ols-regression-with-pandas-data-frame | |
import pandas as pd | |
import statsmodels.formula.api as sm | |
df = pd.DataFrame({"A": [10,20,30,40,50], "B": [20, 30, 10, 40, 50], "C": [32, 234, 23, 23, 42523]}) | |
result = sm.ols(formula="A ~ B + C", data=df).fit() | |
print result.params | |
print result.summary() |
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
[ req ] | |
prompt = no | |
default_bits = 2048 | |
default_keyfile = flatbook.co.key | |
encrypt_key = no | |
distinguished_name = req_distinguished_name | |
#string_mask = utf8only | |
#req_extensions = v3_req |
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
package main | |
type Box interface { | |
Width() int | |
} | |
type Square struct { | |
w int | |
} |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"time" | |
) | |
/* simple go app showing the use of a buffered writer */ |
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 'net/http' | |
require 'net/https' | |
class Woot | |
def foo | |
uri = URI.parse("https://www.google.fr/?q=example") | |
https = Net::HTTP.new(uri.host,uri.port) | |
https.use_ssl = true | |
req = Net::HTTP::Get.new(uri.path) | |
res = https.request(req) |
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 'rubygems' | |
require './post' | |
run Sinatra::Application |