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/bin/perl | |
# Usage: wr <term> [<dict>] | |
# Translate a word using wordreference.com | |
use strict; | |
use warnings; | |
use feature qw(say); |
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 JSON prettifier. | |
* | |
* Compile: | |
* $ cc -o j jsonpretty.c -ljansson | |
* | |
* Usage: | |
* $ ./j < <file> | |
* $ cat <file> | ./j | |
* |
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/bin/perl | |
use strict; | |
use warnings; | |
use FFI::Raw; | |
use IO::Handle; | |
my $fopen = FFI::Raw -> new( | |
'libc.so.6', 'fopen', |
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/sh -e | |
# Usage: sprunge < <file> | |
# Paste stuff to sprunge.us | |
if [ -t 0 ]; then | |
echo "Usage: sprunge < some_file.txt" | |
else | |
curl -sF 'sprunge=<-' http://sprunge.us < /dev/stdin | |
fi |
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/sh -e | |
# Usage: bpipe [-h|--html] | |
# Pipe stuff to the browser | |
if [ -t 0 ]; then | |
echo "Usage: echo '<h1>some stuff</h1>' | bpipe" | |
else | |
opt=`getopt -o h --long html -n bpipe -- "$@"` | |
eval set -- "$opt" |
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
# Copyright (C) 2011 Alessandro Ghedini <alessandro@ghedini.me> | |
# Updated 2012 by Mike Perry to extract syscall table addresses | |
# Updated 2014 by Francis Brosnan Blázquez to check for ia32 support | |
obj-m += noptrace2.o | |
KERNEL_VER=$(shell uname -r) | |
SCT := $(shell grep " sys_call_table" /boot/System.map-$(KERNEL_VER) | awk '{ print $$1; }') | |
SCT32 := $(shell grep "ia32_sys_call_table" /boot/System.map-$(KERNEL_VER) | awk '{ print $$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
ASM=nasm | |
ISO=genisoimage -input-charset utf-8 -boot-load-size 4 -no-emul-boot -r | |
all: boot.iso | |
boot.bin: boot.asm | |
$(ASM) -o boot.bin boot.asm | |
boot.iso: boot.bin | |
mkdir iso/ |
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
/* | |
* WAVE file info reader. | |
* | |
* Compile: | |
* $ cc -o wav_info wav_info.c | |
* | |
* Usage: | |
* $ ./wav_info <file> | |
* | |
* Examples: |
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
/* | |
* Simple sound playback using ALSA API and libasound. | |
* | |
* Compile: | |
* $ cc -o play sound_playback.c -lasound | |
* | |
* Usage: | |
* $ ./play <sample_rate> <channels> <seconds> < <file> | |
* | |
* Examples: |
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
/* | |
* Utility to hide the mouse cursor and prevent screen blanking. | |
* | |
* Compile: | |
* $ cc -o movietime movie_time.c -lX11 | |
* | |
* Usage: | |
* $ ./movietime | |
* | |
* Copyright (C) 2010 Alessandro Ghedini <alessandro@ghedini.me> |