Skip to content

Instantly share code, notes, and snippets.

View eduOS's full-sized avatar
💭
I may be slow to respond.

Lerner Zhang eduOS

💭
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env python
"""Natural-Merge sort a singly linked linear list."""
import random
from itertools import product
# Linked list is either empty or a value and a link to the next list
empty = None # empty list
class LL(object):
__slots__ = "value", "next"
@eduOS
eduOS / tmux-cheatsheet.markdown
Created December 1, 2015 05:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@eduOS
eduOS / frag32.py
Last active September 10, 2015 03:13 — forked from ryancdotorg/frag32.py
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
#!/bin/bash
tmuxSnapshot=/.tmux_snapshot
tmuxEXE=/usr/local/bin/tmux
save_snap()
{
${tmuxEXE} list-windows -a -F"#{session_name} #{window_name} #{pane_current_command} #{pane_current_path}" > ${tmuxSnapshot}
}
restore_snap()
{