This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
from pcapfile import savefile | |
from PIL import Image | |
import sys | |
# turn a pcap into an image. | |
# each row of the image is one packet from the capture. | |
cap = open(sys.argv[1], 'rb') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* stupid C puzzle: without trying it in the computer, explain why | |
* does this not work | |
*/ | |
#include <stdio.h> | |
#define NR1 5 | |
#define NR2 4 | |
#define NR3 3 | |
#define NR4 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; this defun ripped from http://www.emacswiki.org/emacs/narrow-indirect.el | |
(defun narrow-to-region-indirect-other-window (start end here text) | |
"`narrow-to-region' in a cloned indirect buffer in the other window. | |
The indirect buffer is named the same as the current buffer, | |
except it is suffixed by `:text'. | |
Non-interactively: | |
START and END are the region beginning and end. | |
HERE is where to place the cursor, relative to START. | |
TEXT is prefixed by `:' and appended to the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Tiny tool to run as a cronjob, which will update | |
# (using nsupdate) your zone files to include dhcp- | |
# and statelessly-assigned addresses. | |
# Space-separated list of address-to-name resolution methods to try. | |
# They'll be tried in the order listed here. | |
METHODS="hostfile avahi localdns" | |
# Zone to update for each type of IP address. In my home network, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are rules which don't correspond to an actual file | |
.PHONY: calibrate flatten | |
export MAGICK_TMPDIR=/tmp/3 | |
# We maybe don't want to keep all these huge bitmaps lying around | |
#.INTERMEDIATE: out/%.ppm orig/%.ppm | |
# There is a tool ... which make knows how to compile ... | |
ppmunwarp: ppmunwarp.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* bbcode is a nightmare | |
** quote formats | |
- [quote], [QUOTE] | |
- universal | |
- [quote name="{username}" post={post_id} timestamp={time_t}] | |
- [quote name="{username}" post={post_id}] | |
- [quote={username};{post_id}] | |
- vbulletin | |
- [QUOTED={username};{post_id}] | |
- kittyforums, rare |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'\" t | |
.\" Copyright (c) 2013 Astrid Smith | |
.\" Created Sun Dec 22 21:21:39 PST 2013 | |
.\" | |
.\" %%%LICENSE_START(WTFPL) | |
.\" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
.\" Version 2, December 2004 | |
.\" | |
.\" Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
.\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Put the contents of this file in your .bashrc, to | |
# get a prompt that is automatically a distinct, | |
# stable color on every host you log into. | |
# ^O puts terminal back into default text mode for every prompt, | |
# preventing random glyphs. | |
resetterm="\[\017\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
int i = 0; | |
while (i < 5) { | |
i++; | |
printf("\n%d\n", i); | |
switch (i) { | |
case 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keycode 29 = j J g G | |
keycode 30 = l L p P | |
keycode 31 = u U f F | |
keycode 32 = y Y w W | |
keycode 33 = semicolon colon q Q | |
keycode 43 = h H d D | |
keycode 44 = n N t T | |
keycode 45 = e E s S | |
keycode 46 = i I r R | |
keycode 47 = o O a A |
NewerOlder