Skip to content

Instantly share code, notes, and snippets.

View 0robustus1's full-sized avatar

Tim Reddehase 0robustus1

View GitHub Profile
@tpope
tpope / foremux
Last active August 11, 2016 16:42
#!/usr/bin/env ruby
# Install in PATH as foremux
if %w(help --help -h).include?(ARGV.first)
$stderr.puts <<-help
Usage:
foremux [PROCESS]
Options:
-e, [--env=ENV] # Specify an env file to load, defaults to .env
@aasmith
aasmith / refresh.applescript
Created December 11, 2012 21:53
Reload safari when vim saves (OSX)
tell application "Safari"
activate
do JavaScript "window.location.reload();" in first document
end tell
tell application "MacVim" to activate
@leifg
leifg / README.md
Created December 6, 2012 15:48
Jenkins Dashboard using dashing

This is an example of adding Jenkins build status to a [dashing-dashboard](https://github.com/Shopify/dashing

If a job is running, the widget will have a grey background. If a job succeeded at its last run, it will have a green background. If a job failed at its last run, it will have a red background.

Requirements:

@ryanb
ryanb / issues_with_modules.md
Created November 29, 2012 22:38
Points on how modules can make code difficult to read.

My issues with Modules

In researching topics for RailsCasts I often read code in Rails and other gems. This is a great exercise to do. Not only will you pick up some coding tips, but it can help you better understand what makes code readable.

A common practice to organize code in gems is to divide it into modules. When this is done extensively I find it becomes very difficult to read. Before I explain further, a quick detour on instance_eval.

You can find instance_eval used in many DSLs: from routes to state machines. Here's an example from Thinking Sphinx.

class Article &lt; ActiveRecord::Base
@0robustus1
0robustus1 / gitignore
Last active October 13, 2015 06:28
LaTeX-specific gitignore
# Self
.gitignore
# Mac OS X
.DS_Store
# LaTeX
*.acn
*.acr
*.alg
@nandosola
nandosola / macvim.txt
Created October 30, 2012 20:19
MacVim notes
http://wiredupandfiredup.blogspot.com.es/2008/09/pimp-your-macvim.html
http://spf13.com/post/perfect-vimrc-vim-config-file/
https://github.com/altercation/vim-colors-solarized
https://wincent.com/products/command-t
http://superuser.com/questions/247678/installing-command-t-breaks-macvim
@cjolly
cjolly / pg.sh
Last active June 19, 2025 14:34
Use homebrew to upgrade to postgres on OSX
newpg=9.6.1 # set to new PG version number
oldpg=`pg_config --version | cut -d' ' -f2`
# PG 96. upgrades the readline to v7, which breaks anything linked against readline v6, like ruby via ruby-build.
# I *think* this should prevent it from installing v7. But if weird shit happens with various rubies,
# you'll have to reinstall them.
brew pin readline
# Stop current Postgres server
brew services stop postgresql
@sebthemonster
sebthemonster / pre-commit.rspec.rb
Created October 25, 2011 18:47 — forked from david-hodgetts/pre-commit
pre-commit git hook, runs rspec if branch is master
#!/usr/bin/env ruby
# pre-commit git hook
# will run rspec if and only if current branch is master
# script adapted from http://book.git-scm.com/5_git_hooks.html
# source : https://gist.github.com/1141992
NO_COMMIT_MESSAGE = "\aDID NOT COMMIT YOUR FILES!"
FORMAT = :html
@panchicore
panchicore / bash
Created October 7, 2011 00:25
solve perl: warning: Setting locale failed.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@jridgewell
jridgewell / applescript_service
Created August 7, 2011 22:34
Open file/folder in MacVim. Preceded by get Finder Selection
on run {input, parameters}
repeat with i in input
tell application "MacVim"
open (POSIX path of i)
end tell
end repeat
tell application "MacVim"
activate
end tell
return input