Skip to content

Instantly share code, notes, and snippets.

@DestyNova
DestyNova / .zprofile
Last active Mar 26, 2018
Handy aliases/miniscripts (in zsh format)
View .zprofile
# load existing pre-zsh profile
emulate sh -c '. ~/.profile'
# make a directory and cd into it
mkd () { mkdir $1 && cd $1 }
# verbally remind me of something after N minutes
# Examples:
# $ remind_after 5 tea
# $ remind_after 25 "pomodoro break"
View keybase.md

Keybase proof

I hereby claim:

  • I am destynova on github.
  • I am omf (https://keybase.io/omf) on keybase.
  • I have a public key ASBMi5I2PJPEeuiujfs-Mf6HnafUru6A_YiwRvpJmcb_2Qo

To claim this, I am signing this object:

@DestyNova
DestyNova / resurrectff-closedwindow.lua
Created Sep 8, 2013
Swap the open and closed windows in Firefox's saved session file (sessionstore.js). Needs the extremely fast ''dkjson'' library (the session file is a big JSON string).
View resurrectff-closedwindow.lua
json = require('dkjson')
function main(max_depth)
print('Reading file...')
local session = assert(io.open('sessionstore.js', 'r'))
local session_data = session:read('*all')
print('Parsing ('..#session_data..' bytes)...')
local obj, pos, err = json.decode(session_data, 1, json.null)
if err then error(err) end
You can’t perform that action at this time.