Skip to content

Instantly share code, notes, and snippets.

View andreasklinger's full-sized avatar
🤔
Busy: Trying to come up with a funny status…

Andreas Klinger andreasklinger

🤔
Busy: Trying to come up with a funny status…
View GitHub Profile
Delivered-To: my@email.com
Received: by 10.194.116.36 with SMTP id jt4csp1490864wjb;
Mon, 22 Aug 2016 03:10:26 -0700 (PDT)
X-Received: by 10.37.210.209 with SMTP id j200mr2870425ybg.28.1471860626543;
Mon, 22 Aug 2016 03:10:26 -0700 (PDT)
Return-Path: <andreas+caf_=my@email.com>
Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com. [2607:f8b0:4002:c05::235])
by mx.google.com with ESMTPS id n3si37059ywd.35.2016.08.22.03.10.25
for <my@email.com>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);

Names always based on what they do, not why, where or how

  • eg not Url2Png but Screenshot or ScreenshotTaker
  • eg not twitter_user_image_tag but user_image_tag

Git commits always why you did it - not what you did

  • eg not Update Gemfile but Security Update for Rails 4.1.1

Think of git commits as titles for blogposts

filter :user_username, as: :string
# as in
filter :<association-model>_<attribute>, as: :string
$ bower search bootstrap-daterangepicker
Search results:
bootstrap-daterangepicker git://github.com/dangrossman/bootstrap-daterangepicker.git
bootstrap-daterangepicker-reset git://github.com/digitalreasoning/bootstrap-daterangepicker.git
di-bootstrap-daterangepicker git://github.com/DrillingInfo/bootstrap-daterangepicker.git
bootstrap-daterangepicker-released git://github.com/DrillingInfo/bootstrap-daterangepicker.git
@andreasklinger
andreasklinger / gist:8316522
Created January 8, 2014 13:08
google analytics
MY STUFF
Dashboards
Private
My Dashboard
+ New Dashboard
Shortcuts
Intelligence Events
Daily Events
Weekly Events
Monthly Events
@andreasklinger
andreasklinger / VagrantFile
Created October 25, 2013 07:16
CakeResque
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "squeeze64"
@andreasklinger
andreasklinger / omfg.sh
Last active December 26, 2015 10:49
Getting CakeResque and ResqueBoard running on Debian Squeezy
WORKER_USER="vagrant"
# Install resque
apt-get -y install redis-server
# CakeResque calls sudo -u vagrant
# By default a user cannot sudo into other users
# To make it work we allow him to sudo into himself
chmod u+w /etc/sudoers
echo "$WORKER_USER ALL=($WORKER_USER) NOPASSWD: ALL" >> /etc/sudoers