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
# 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
# Usage: mpv --vf=vapoursynth=60fps.py --hwdec=no <file> | |
import vapoursynth as vs | |
core = vs.get_core() | |
src_fps = 24 | |
dst_fps = 60 | |
clip = core.std.AssumeFPS(video_in, fpsnum=src_fps) | |
super = core.mv.Super(clip, pel=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
#!/usr/bin/perl | |
# Usage: gist_backup.pl <user> | |
# Clone all the gists of a GitHub user | |
use strict; | |
use warnings; | |
use Git::Raw; | |
use Pithub::Gists; |
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> |
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
/* | |
* Wrap mouse pointer at screen edges. | |
* | |
* Compile: | |
* $ cc -o mousewrap mouse_wrap.c -lX11 -lXi | |
* | |
* Usage: | |
* $ ./mwrap | |
* | |
* Copyright (C) 2012 Alessandro Ghedini <alessandro@ghedini.me> |
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
package main | |
import "fmt" | |
import "net" | |
import "sync" | |
import "strings" | |
import "github.com/miekg/dns" | |
func handleRequest(w dns.ResponseWriter, r *dns.Msg) { |
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
/* | |
* Execute a command after some time of inactivity | |
* | |
* Compile: | |
* $ cc -o sleepd sleepd.c | |
* | |
* Usage: | |
* $ ./sleepd -t 600 -c "slock" | |
* | |
* NOTE: to run this as a normal (non-root) user you may need to change |
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
/* | |
* Arduino library for the ATSHA204 authentication chip. | |
* | |
* The ATSHA204 is a tiny and low-power authentication chip. This library | |
* implements a simple interface to access most of the chip functionality from | |
* an Arduino. | |
* | |
* Note that only the Single-Wire Interface (SWI) is currently supported. | |
* | |
* FEATURES: |
NewerOlder