Skip to content

Instantly share code, notes, and snippets.

View momorientes's full-sized avatar

momo momorientes

View GitHub Profile
@momorientes
momorientes / zshrc
Created October 8, 2015 14:14
vim:15 opens document with vim at line 15
vim() {
if test $# != 1 -o -r $1; then
command vim "${@}"
else
local args
args=(${(s.:.)1})
[[ $#args -ge 2 && $args[2] == <-> ]] \
&& command vim $args[1] +$args[2] \
|| command vim $args[1]
fi
#!/usr/bin/env python3
data = {}
def main():
FILENAME = 'foo.csv'
with open(FILENAME, 'r') as f:
#!/bin/bash
# give dd output using pv and the correct size parameter
SIZE=`wc -c $1 | cut -d " " -f 1`
dd if=$1 | pv -s $SIZE | sudo dd of=$2
sync