Skip to content

Instantly share code, notes, and snippets.

Here is a quick rundown of the tools that we use to collaborate and win at efficiency.

Company wide for Collaboration and Productivity

  • Asana for task management, planning, full replacement for internal email
  • Gmail for email
  • Google docs for sheets, word, powerpoint (supplemented by MS office for a few computers if you need to collaborate with lawyers etc)
  • Slack for real-time chatting, channel for each project
  • Expensify - simplify expense receipt filing
  • Xero - Web accounting system, that will scale normally up to ~10m of revenue, or maybe more.
@ewalk153
ewalk153 / ca.conf
Created September 21, 2015 01:12
Setup command to generate X509 keys for Xero.
[ 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
# 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()
{ :admin =>
{
role: Role.create(name: 'admin'),
asdf: 'asdf'
}
:staff =>
{
}
:concierge =>
@ewalk153
ewalk153 / fix_images.rb
Created June 5, 2015 16:21
Console script to find bad paperclip image uploads and fix them.
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
@ewalk153
ewalk153 / plug-ins
Last active August 29, 2015 14:16
Sublime setups
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)
@ewalk153
ewalk153 / feature-branch.bash
Created February 19, 2015 16:13
Steps to merge a long running feature branch, using a squash
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
@ewalk153
ewalk153 / rails-4-clean_guide.sh
Last active August 29, 2015 14:09
All queries should be empty! :). This can be run on a rails 3.2.x codebase to make sure ActiveRecords is prepared for rails 4. This does NOT handle rails4 methods that have no rails 3.2 counterpart.
# no find_all_by
grep -e "find_all_by" -r --include "*.rb" .
# no :conditions
grep -e ":conditions" -r --include "*.rb" .
# no naked scopes
grep -r -e "scope :" --include "*.rb" . | grep -v "lambda" | grep -v '\->'
# no naked default_scopes
@ewalk153
ewalk153 / pg_tablebackup.bash
Created August 28, 2014 11:52
backup one postgres tables as CSV, compressed
time psql DBNAME -F , --no-align -c "SELECT * FROM TABLE" | gzip -9 > table_backup.gz
@ewalk153
ewalk153 / ex_serial.rb
Created August 27, 2014 15:49
example to serialize an attribute in Ruby
class FavOptions < Array
def self.dump(ingredients)
ingredients ? ingredients.join(";") : nil
end
def self.load(ingredients)
ingredients ? new(ingredients.split(";")) : nil
end
end