Skip to content

Instantly share code, notes, and snippets.

View mipmip's full-sized avatar
🐟

Pim Snel mipmip

🐟
View GitHub Profile
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@codeprimate
codeprimate / ctags.rake
Created October 22, 2011 16:29
Rake task to create ctags for a Rails application
# ctags.rake - Rake task to create ctags for a Rails application
# and also including Ruby and Gem signatures
#
# Requires exuberant-ctags to be in $PATH
desc "Regenerate tags (CTAGS)"
task :ctags do
puts " * Regenerating Tags"
excludes = %w{
.git
@mipmip
mipmip / gist:1844353
Created February 16, 2012 12:00
Mac OS X: restart mDNSResponder
Load up Terminal (Applications > Utilities > Terminal.app) and type the following.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
To turn it back on, just do the opposite:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
@meleyal
meleyal / macvim-padding
Created February 24, 2012 18:42
Add padding to MacVim windows
defaults write org.vim.MacVim MMTextInsetTop '10'
defaults write org.vim.MacVim MMTextInsetLeft '10'
defaults write org.vim.MacVim MMTextInsetBottom '10'
defaults write org.vim.MacVim MMTextInsetRight '10'
@seratch
seratch / config.yml
Created October 25, 2012 09:37
AWS SQS Example
access_key_id: xxx
secret_access_key: yyy
@paulodeleo
paulodeleo / .tmux.conf
Last active July 15, 2022 10:16
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows
@todgru
todgru / starttmux.sh
Last active April 27, 2024 18:17
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
@thitemple
thitemple / dev_setup.ps1
Last active March 22, 2022 05:19
A PowerShell script for installing a dev machine using Chocolatey.
function Add-Path() {
[Cmdletbinding()]
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder)
# Get the current search path from the environment keys in the registry.
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
# See if a new folder has been supplied.
if (!$AddedFolder) {
Return 'No Folder Supplied. $ENV:PATH Unchanged'
}
# See if the new folder exists on the file system.
@diramazioni
diramazioni / texture_change.py
Created February 27, 2014 17:54
blender python: texture change from command line
'''
texture image path are relative to the blend file directory. run from command line like this:
texture=img/2012720989_c.jpg blender -b mug.blend --python texture_change.py -F PNG -s 1 -e 1 -j 1 -t 0 -a
''''
import os
image_file = os.getenv('texture')
if not image_file:
image_file="img/2012720989_c.jpg"
@Newbrict
Newbrict / ascii cube
Created March 26, 2014 16:56
an ASCII art Cube
cubes look like this:
e-------f
/| /|
/ | / |
a--|----b |
| g----|--h
| / | /
c-------d