Skip to content

Instantly share code, notes, and snippets.

View minhaz1's full-sized avatar

Minhaz Mahmud minhaz1

View GitHub Profile
#!/usr/bin/env python
import sys
def tail(filename):
f = open(filename)
while True:
pos = f.tell()
line = f.readline()
<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"
@minhaz1
minhaz1 / transfer.sh
Created March 30, 2015 22:14
alias for srtr.me transfer
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 );
@minhaz1
minhaz1 / cardata
Created October 3, 2014 23:11
Pipe delimited car data
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
#!/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'