Skip to content

Instantly share code, notes, and snippets.

View dufferzafar's full-sized avatar
🏠
Working from home

Shadab Zafar dufferzafar

🏠
Working from home
View GitHub Profile
@dufferzafar
dufferzafar / App Paths.reg
Created September 10, 2013 17:41
Windows Application Paths
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lua.exe]
@="\"D:\\I, Coder\\Dev.Tools\\Lua\\# Execs\\lua.exe\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\wlua.exe]
@="\"D:\\I, Coder\\Dev.Tools\\Lua\\# Execs\\wxlua.exe\""
@dufferzafar
dufferzafar / LuaInstall.reg
Created September 10, 2013 17:41
Install Lua Windows
Windows Registry Editor Version 5.00
; ---------------- Associate Lua Files
[HKEY_CLASSES_ROOT\.lua]
@="luafile"
[HKEY_CLASSES_ROOT\luafile]
@="Lua Script"
[HKEY_CLASSES_ROOT\luafile\DefaultIcon]
@dufferzafar
dufferzafar / Backup-Buddy.ahk
Created October 5, 2013 16:48
Timer based backup
/**
* Backup Buddy
*
* Compress and Backup folders every
*
* @dufferzafar
*/
/**
* Script Settings
@dufferzafar
dufferzafar / Python-Windows.reg
Created October 26, 2013 16:46
Python File Association Windows
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.py]
@="Python.File"
"Content Type"="text/plain"
[HKEY_CLASSES_ROOT\Python.File]
@="Python File"
[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]
@dufferzafar
dufferzafar / toImgur.ahk
Created November 14, 2013 09:06
Upload Image to Imgur
#SingleInstance, Force
; #Include json.inc.ahk
imgurClient := "a7c30de4f98751b"
File := FileOpen("screen.png", "r")
File.RawRead(Data, File.Length)
Base64enc( PNGDATA, Data, File.Length )
@dufferzafar
dufferzafar / Preferences.sublime-settings
Created November 14, 2013 19:01
My Sublime Text 3 User Preferences
{
"theme": "Soda Light 3.sublime-theme",
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"font_size": 13,
"line_padding_top": 1,
"line_padding_bottom": 1,
"tab_size": 3,
@dufferzafar
dufferzafar / Default (Windows).sublime-keymap
Created November 14, 2013 19:04
My Sublime Text 3 Keymap
[
// Remapped comment hotkeys as Ctrl+Q is easily reachable via left-hand :)
{ "keys": ["ctrl+q"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+q"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+/"], "command": "toggle_record_macro" },
{ "keys": ["ctrl+shift+/"], "command": "run_macro" },
// Plugin: Goto Documentation
// { "keys": ["ctrl+shift+h"], "command": "goto_documentation" },
@dufferzafar
dufferzafar / laszloTimestamp.ahk
Created November 20, 2013 12:25
UNIX Timestamps AHK
FileGetTime, SubtitleTime, % A_AhkPath, M
SecondsDifference := ToTimestamp(A_Now) - ToTimestamp(SubtitleTime)
MsgBox, 0, Approve - Subtitle, This file was saved around %SecondsDifference% seconds ago.
ToTimestamp(T) { ; By Sir Laszlo himself
; Retrieve required data from the input time.
FormatTime Y, %T%, yyyy
FormatTime D, %T%, YDay
@dufferzafar
dufferzafar / Selections-Sublime.md
Created November 27, 2013 09:50
Selections and Multiple Cursors in Sublime Text 3

Selections and Multiple Cursors in Sublime Text 3

A handy list of selection shortcuts.

Here are the official docs: Keyboard and Mouse

Mouse

Building blocks:

  • Add to selection: Ctrl
  • Subtract from selection: Alt
@dufferzafar
dufferzafar / Shutdown-Timer-My-Computer.reg
Created November 27, 2013 10:28
Add Shutdown Timers to My Computer's Context Menu
Windows Registry Editor Version 5.00
; If you change your mind at any moment. Just run "shutdown -a"
;Right-click My Computer To Shutdown In (10m 20m 30m 40m 50m 60m 2hrs 3hrs 4hrs 5hrs 6hrs)
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Shutdown In 010 Minutes]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Shutdown In 010 Minutes\command]
@="shutdown -s -f -t 600"
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Shutdown In 020 Minutes]
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Shutdown In 020 Minutes\command]