Skip to content

Instantly share code, notes, and snippets.

# Mounts as regular user device /dev/<arg1> if not already mounted,
# changes into the devices directory with pushd,
# and prints the directory.
# Usage:
# Mount /dev/sdb1 if it is not mounted and change to it's directory
# d sdb1
# Unmount /dev/sdb1
# umount $(d sdb1)
@neonfuz
neonfuz / ffmpeg_decklink_h264_qsv.sh
Created October 10, 2017 01:20 — forked from jpriebe/ffmpeg_decklink_h264_qsv.sh
Example script to encode video from a Decklink Mini Recorder using h264_qsv
void check (int test, const char * message, ...)
{
if (test) {
va_list args;
va_start (args, message);
vfprintf (stderr, message, args);
va_end (args);
fprintf (stderr, "\n");
exit (EXIT_FAILURE);
@neonfuz
neonfuz / sizetest.c
Created December 2, 2015 03:06
Program to test the sizes of various types
#include <stdio.h>
int main(int argc, char *argv[])
{
#define PRINT_SIZEOF(type) printf("sizeof(" #type "):\t%lu bytes\n", sizeof(type))
PRINT_SIZEOF(char);
PRINT_SIZEOF(short);
PRINT_SIZEOF(int);
PRINT_SIZEOF(long);
PRINT_SIZEOF(long long);
@neonfuz
neonfuz / .emacs
Created December 1, 2015 22:17
neonfuz's .emacs
(setq-default c-default-style "bsd"
c-basic-offset 4
tab-width 4
indent-tabs-mode nil
js-indent-level 2)
(add-to-list 'default-frame-alist '(font . "PragmataPro-10" ))
(set-face-attribute 'default t :font "PragmataPro-10" )
(icomplete-mode 99)