This file contains hidden or 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
$ gcc switch-foo.c -o switch-foo | |
$ ./switch-foo | |
Got 1 for 1 | |
$ |
This file contains hidden or 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 | |
display -sample 600 $1 2>&1 >/dev/null & | |
viewer_pid=$! | |
sleep 0.5 | |
echo '====' | |
echo 'What is the date shown? YYYY-MM-DD' | |
read -p 'date> ' -e -i "$date" date |
This file contains hidden or 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 <ctype.h> | |
#include <stdio.h> | |
void hexdump(void *ptr, int buflen) { | |
unsigned char *buf = (unsigned char*)ptr; | |
int i, j; | |
for (i=0; i<buflen; i+=16) { | |
printf("%06x: ", i); | |
for (j=0; j<16; j++) | |
if (i+j < buflen) |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 has been truncated, but you can view the full file.
This file contains hidden or 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 <[email protected]> | |
.\" |
This file contains hidden or 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 contains hidden or 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 hidden or 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, |
OlderNewer