This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
data = {} | |
def main(): | |
FILENAME = 'foo.csv' | |
with open(FILENAME, 'r') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |