Skip to content

Instantly share code, notes, and snippets.

View devvesa's full-sized avatar
🐢
Working from home

Jaume Devesa devvesa

🐢
Working from home
  • Midokura
  • Barcelona
  • 02:37 (UTC -12:00)
View GitHub Profile
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@datagrok
datagrok / gist:2199506
Last active December 16, 2024 16:14
Virtualenv's `bin/activate` is Doing It Wrong

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@nacx
nacx / massive-volume-creation.sh
Created June 28, 2011 13:59
Massive volume creation in Abiquo
#!/bin/bash
NUM=20 # The number of volumes to create
DC=2 # The datacenter where the volumes will be created
TIER=1 # The tier where the volumes will be created
VDC=4 # The virtual datacenter where the volumes will be created
SIZE=100 # The size of the volumes to create in MB
LOGIN=admin:xabiquo # The credentials
for V in `seq 1 ${NUM}`; do
@nacx
nacx / cleanup.py
Created June 16, 2011 11:00
Cleanup a NexentaStor device
#!/usr/bin/env python
import sys
import NZA
def delete_volumes_in_pool(pool):
print "Removing volumes in pool %s..." % pool
volumes = NZA.nms.zvol.get_names_by_prop('volume_name', pool, '')
for volume in volumes:
try: