start new:
tmux
start new with session name:
tmux new -s myname
from fabric.api import env, local, run | |
def vagrant(): | |
# change from the default user to 'vagrant' | |
env.user = 'vagrant' | |
# connect to the port-forwarded ssh | |
env.hosts = ['127.0.0.1:2222'] | |
# use vagrant ssh key | |
result = local('vagrant ssh_config | grep IdentityFile', capture=True) |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: carbon-cache | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: carbon-cache init script | |
# Description: An init script for Graphite's carbon-cache daemon. | |
### END INIT INFO |
" http://recursivedream.com/blog/2012/auto-completing-google-contacts-in-vim/ | |
" Escape query and handle goobook errors | |
function! mailcomplete#Complete(findstart, base) | |
if a:findstart == 1 | |
let line = getline('.') | |
let idx = col('.') | |
while idx > 0 | |
let idx -= 1 | |
let c = line[idx] | |
" break on header and previous email |
" based on: | |
" http://vim.1045645.n5.nabble.com/editing-Python-files-how-to-keep-track-of-class-membership-td1189290.html | |
function! s:get_last_python_class() | |
let l:retval = "" | |
let l:last_line_declaring_a_class = search('^\s*class', 'bnW') | |
let l:last_line_starting_with_a_word_other_than_class = search('^\ \(\<\)\@=\(class\)\@!', 'bnW') | |
if l:last_line_starting_with_a_word_other_than_class < l:last_line_declaring_a_class | |
let l:nameline = getline(l:last_line_declaring_a_class) | |
let l:classend = matchend(l:nameline, '\s*class\s\+') |
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 = git@github.com: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:
#!/bin/bash | |
USER=$1 | |
REALNAME=$2 | |
PASS=$(pwgen -B -s -n 12 1) | |
if [[ -z ${USER} || -z ${REALNAME} ]];then | |
echo "znc-add-user.sh: login realname" | |
exit 1 | |
fi |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2015 François Charlier <francois.charlier@enovance.com> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
#!/usr/bin/env python | |
import argparse | |
from collections import defaultdict | |
import os | |
import sys | |
import time | |
from novaclient import client | |
from novaclient import exceptions |