Skip to content

Instantly share code, notes, and snippets.

View dufferzafar's full-sized avatar

Shadab Zafar dufferzafar

View GitHub Profile
@dufferzafar
dufferzafar / dufferZafar's Resume (sorta).md
Created September 28, 2014 19:42
Profile Created for the Placement 2016 form. Finally Done.
@dufferzafar
dufferzafar / Hide Moz.ahk
Created September 30, 2014 16:30
Hide Private Mozilla Windows (like when your boss is around)
#NoTrayIcon
#SingleInstance, Force
SetTitleMatchMode, 2
PID := WinExist("Mozilla Firefox (Private Browsing)")
Hidden := 0
#h::
If (Hidden)
@dufferzafar
dufferzafar / git bisect.log
Created November 11, 2014 20:12
Using Git Bisect
Welcome to cmder! customized by dufferzafar
D:\Github\IdeaBin (sql)
λ git bisect start
D:\Github\IdeaBin (sql)
λ gl
7e74633 2014-11-07 5 days ago Added frontend SQL queries (HEAD, origin/sql, sql)
a575c5c 2014-11-07 5 days ago comments SQL queries updated
d34b316 2014-11-07 5 days ago users SQL queries updated
@dufferzafar
dufferzafar / Rotate.ahk
Created November 22, 2014 11:01
A quick script I wrote while going through all my notes to move them to right using the Windows Image and Fax Viewer.
]::
SendInput, {Right} ; Start moving to next image
Sleep, 1000 ; Wait for the current image to save
SendInput, ^. ; Rotate image to the right
Return
@dufferzafar
dufferzafar / ideabin-bot-chat.txt
Last active August 29, 2015 14:10
Discussion with Aditya Kumar, explaining the IdeaBin Bot. Request for comments.
(11:59:58 PM) dZ: accha ideabin ke liye ek sharing service bana rha hun
(12:00:17 AM) dZ: ideas ko tweet karega, aur unki summary email karega
(12:09:37 AM) dZ: gists mein alread har feature toh hai hi
(12:09:51 AM) dZ: stars, comments, etc.
(12:10:01 AM) dZ: toh bas ab ek script bana rha hun
(12:10:12 AM) dZ: jo bando ki gists fetch karegi aur
(12:10:18 AM) dZ: unmein se ideas wali nikalegi
(12:10:33 AM) dZ: (the ones which have #ideabin in the description)
(12:10:57 AM) kwikadi: only gists?
(12:11:08 AM) dZ: hm
@dufferzafar
dufferzafar / Sort Github File List.md
Created December 2, 2014 12:12
Sort Github file list according to last modified time. #userscript #github #ideabin

Create a hotkey to sort the Github file list.

There is a userscript that does the same thing but it doesn't have hotkey support. I tried understanding the code but just couldn't wrap my head around it.

Hotkey could be added using the jQuery Hotkeys plugin.

@dufferzafar
dufferzafar / Last.fm cli design.md
Last active August 11, 2021 04:36
A lastfm playlist generator. #python #lastfm #ideabin

lfm - the last.fm player

A last.fm based playlist creator.

lfm update - Create or Update your local database of music files.

lfm diff [me] users - Find differences in music taste between users.

lfm common [me] [users] - Find stuff common between users.

@dufferzafar
dufferzafar / Command line utility to find number of days to a date.md
Created December 3, 2014 18:25
Command line utility to find number of days to a date. #go #cli #ideabin

Examples:

days -m | -y                # Print number of days left in the month/year

days "Aug 31"               # This year

days "Aug 31, 2016"         # Exact date

days "31/08/2019"           # Alternate date format
@dufferzafar
dufferzafar / A utility to generate random test databases.md
Created December 3, 2014 18:30
Python utility to generate random test databases. #python #dbms #random #ideabin

Similar to cheater which is written in Perl and Mockaroo which is web based.

Generating random data is not a problem as the faker package is quite nice.

The main task would be to correctly implement the 'SQL-Like little language' from cheater.

Rather than just supporting regexes, we could support all faker data types, like {first_name} for random first names etc. Mocakroo does this.

@dufferzafar
dufferzafar / Script that reminds you to commit.md
Last active August 29, 2015 14:10
A script that reminds you to commit. #github #python #ideabin

The script can run on a server (as a nightly cron job)

At every 9 PM it fetches the list of my commits for that day and shoots me an email/(sms?)/tweet/(google now reminder?) if i haven't committed any code.

Would be great in occassions when you accidentally end up breaking your streaks.

Could use Sendgrid for email services.