Skip to content

Instantly share code, notes, and snippets.

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

Function FunctionDJ

🏠
Working from home
View GitHub Profile
@FunctionDJ
FunctionDJ / swap.js
Created February 7, 2020 18:09
How the swap function works
// We're given this function
x = (y=>y)(y,y=x)
// It assignes something to x
// y => y is an arrow function with implicit return
// implicit return means that the "function body" is just an expression that we return
// We can write y => y like this
y => {
return y;
}
// So we can turn our arrow function to a classic named function like this:
@roryokane
roryokane / FixCtrlBackspace.ahk
Created August 26, 2013 21:19
AutoHotkey script to fix Ctrl+Backspace (delete previous word) in File Explorer and Notepad
; how to write scripts: http://www.autohotkey.com/docs/
#IfWinActive ahk_class CabinetWClass ; File Explorer
^Backspace::
#IfWinActive ahk_class Notepad
^Backspace::
Send ^+{Left}{Backspace}
#IfWinActive
; source and context: http://superuser.com/a/636973/124606