Skip to content

Instantly share code, notes, and snippets.

Minhaz Mahmud minhaz1

Block or report user

Report or block minhaz1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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"
@minhaz1
minhaz1 / transfer.sh
Created Mar 30, 2015
alias for srtr.me transfer
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 );
@minhaz1
minhaz1 / cardata
Created Oct 3, 2014
Pipe delimited car data
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'
You can’t perform that action at this time.