Skip to content

Instantly share code, notes, and snippets.

@kbauer
kbauer / chrome-comic-rocket-navigation.ahk
Last active December 15, 2015 16:22
An AutoHotKey script for navigating comic-rocket. For use with other Browsers than Chrome, change the RegEx in the #IfWinActive line accordingly.
SetTitleMatchMode RegEx
#IfWinActive .*Comic Rocket webcomic list - Google Chrome
ComicRocketChangePage(bynum)
{
oldclip := clipboard
Send ^l
Sleep 50
Send ^c
Sleep 50
@talwai
talwai / servefile.sh
Created January 23, 2015 19:57
One-shot HTTP webserver to serve file contents using netcat
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <some.file)\r\n\r\n"; cat some.file; } | nc -l 8080
@schlamar
schlamar / example.py
Last active December 20, 2024 08:10
mplog: Python advanced multiprocessing logging.
import logging
import multiprocessing
import time
import mplog
FORMAT = '%(asctime)s - %(processName)s - %(levelname)s - %(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
existing_logger = logging.getLogger('x')
@rxin
rxin / ramdisk.sh
Last active November 21, 2024 15:11
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then