Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@von
von / gist:f7e953492ca9f910062f
Created September 30, 2014 17:58
Keybase proof
### Keybase proof
I hereby claim:
* I am von on github.
* I am vwelch (https://keybase.io/vwelch) on keybase.
* I have a public key whose fingerprint is 200A BDDC B3E6 B86E 50C5 F615 93D4 09C8 1BBC 0D27
To claim this, I am signing this object:
" Prevent various Vim features from keeping the contents of pass(1) password
" files (or any other purely temporary files) in plaintext on the system.
"
" Modified from:
" Author: Tom Ryder <tom@sanctum.geek.nz>
" From: https://gist.github.com/tejr/5890634
"
" The '/private' part is Mac-specific
let s:passtmp='/private' . expand('$TMPDIR') . "pass.*/*"
# Load plugins and autoloads compinit
#
# Works around issues created by
# https://github.com/robbyrussell/oh-my-zsh/issues/4072
is_plugin() {
local base_dir=$1
local name=$2
test -f $base_dir/plugins/$name/$name.plugin.zsh \
(vons-mac) ~/develop/gridshib-ca.git-cvs>git-cvs pull
reading .git-cvs...
logging output to /Users/vwelch/develop/gridshib-ca.git-cvs/.git/git-cvs/logs/2009-11-16-2100-35.log
Importing module 'gridshib/gridshib-ca' from CVS welch@cvs.globus.org:/home/globdev/CVS/globus-packages
(vons-mac) ~/develop/gridshib-ca.git-cvs>git reset --hard master
HEAD is now at 5492cf9 cvsimport
(vons-mac) ~/develop/gridshib-ca.git-cvs>git-cvs push
reading .git-cvs...
logging output to /Users/vwelch/develop/gridshib-ca.git-cvs/.git/git-cvs/logs/2009-11-16-2101-17.log
Using internal CVS checkout in /Users/vwelch/develop/gridshib-ca.git-cvs/.git/git-cvs/cvscheckout/HEAD/gridshib/gridshib-ca
(vons-mac) ~/develop/gridshib-ca.git-cvs>git show-ref remotes/cvs/HEAD
15d057eeea896cd1f4d7609854c693be74a7a38a refs/remotes/cvs/HEAD
(vons-mac) ~/develop/gridshib-ca.git-cvs>git show-ref master
3ebd7ac47c902103d85a49b7d6b67c3c40d4ac6f refs/heads/master
(vons-mac) ~/develop/gridshib-ca.git-cvs>git --no-pager --git-dir '/Users/vwelch/develop/gridshib-ca.git-cvs/.git' rev-list --reverse 'remotes/cvs/HEAD'...'master'
0a689c733d45bd1fe8605635e135e40c65a54a95
cc6b254666e01e3ca54fcd0a28f517cfb6d6d5ad
60a8160e81a46b2ebc232655d4f5fe5afd79e796
262b467cc5555ea9aab67d9381138180aaf1bf34
1bb6ca9b7e7445da63e91a29c230da3acad99b51
* <- master
|\
| * <- remotes/cvs/HEAD
* | <- some commits on one branch
| * <- some commits on the other
|/
* <- merge point, which is what 'git rev-list' is always going back to.
@von
von / von-2.t
Created November 24, 2009 04:29
#!/usr/bin/perl
use strict;
use warnings;
use FindBin qw($Bin);
use lib "$Bin/lib";
use MyTest::Dirs;
use MyTest::Replay;
use Test::More tests => 2;
$ p.py -h
usage: p.py [-h] [-c FILE]
optional arguments:
-h, --help show this help message and exit
-c FILE, --conf_file FILE
Specify config file
@von
von / p.py
Created April 30, 2011 01:48
Demonstrate parse_known_args()
#!/usr/bin/env python
import argparse
import ConfigParser
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--conf_file",
help="Specify config file", metavar="FILE")
args, remaining_argv = parser.parse_known_args()
defaults = {
"option1" : "some default",
$ cat p.conf
[Defaults]
option1 = Hello World!
option2 = Have a nice day.
$ p.py --option1 "Hi there"
Namespace(conf_file=None, option1='Hi there', option2='some other default')
$ p.py --conf_file p.conf
Namespace(conf_file=None, option1='Hello World!', option2='Have a nice day.')
$ p.py --conf_file p.conf --option1="Hi there world."
Namespace(conf_file=None, option1='Hi there world.', option2='Have a nice day.')