View tail.py
#!/usr/bin/env python | |
import sys | |
def tail(filename): | |
f = open(filename) | |
while True: | |
pos = f.tell() | |
line = f.readline() |
View layout_todo.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" | |
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
tools:context="minhazm.com.hackumbc.TodoList"> | |
<ListView | |
android:layout_width="wrap_content" |
View transfer.sh
transfer() { | |
if [ $# -eq 0 ]; then | |
echo "No arguments specified. Usage:" | |
echo "$ transfer /tmp/test.md" | |
echo "$ cat /tmp/test.md | transfer test.md" | |
return 1 | |
fi | |
# write to output to tmpfile because of progress bar | |
tmpfile=$( mktemp -t transferXXX ); |
View cardata
1926|Chrysler|Imperial | |
1950|Hillman|Minx Magnificent | |
1953|Chevrolet|Corvette | |
1954|Chevrolet|Corvette | |
1954|Cadillac|Fleetwood | |
1955|Chevrolet|Corvette | |
1955|Ford|Thunderbird | |
1956|Chevrolet|Corvette | |
1957|Chevrolet|Corvette | |
1957|BMW|600 |
View osx-for-hackers.sh
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |