Skip to content

Instantly share code, notes, and snippets.

@darealshinji
darealshinji / apt-get-build.sh
Last active April 18, 2016 16:12
A simple alternative to apt-build for Debian-based systems.
#!/bin/sh
#
# Usage: sudo apt-get-build <package>
ROOTUID="0"
if [ "$(id -u)" -ne "$ROOTUID" ] ; then
echo "This script must be executed with root/sudo privileges!"
exit 1
fi
@darealshinji
darealshinji / timer.avs
Last active September 9, 2015 04:23
AviSynth script to add a highly customizable timer to your video. Extended description can be found at http://forum.doom9.org/showthread.php?t=168241
# AviSynth script to add a highly customizable timer to your video.
#
# Copyright (C) 2013 djcj <djcj@gmx.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@darealshinji
darealshinji / coreutils-8.22-md5-sha.patch
Last active August 29, 2015 14:00
A patch for GNU's coreutils v8.22 which adds an option to md5sum and sha*sum, that allows one to print only the checksum.
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -42,42 +42,42 @@
/* The official name of this program (e.g., no 'g' prefix). */
#if HASH_ALGO_MD5
-# define PROGRAM_NAME "md5sum"
+# define PROGRAM_NAME "md5"
# define DIGEST_TYPE_STRING "MD5"
# define DIGEST_STREAM md5_stream
@darealshinji
darealshinji / make-icons.sh
Last active March 13, 2016 11:36
Create an X11 icon set from a single image file.
#!/bin/sh -e
# Create an X11 icon set from a single image file.
# Usage: make-icon.sh <icon> [<output-folder>]
# Last revision : 2015-04-10
# Requires: librsvg2-bin imagemagick
# Copyright (c) 2014-2015, djcj <djcj@gmx.de>
#!/bin/sh -e
# delete previous changelogs
rm -f ChangeLog*
# download changelog
wget -k http://plorkyeran.com/aegisub/
# delete lines with following content
sed -i "/<h1>Aegisub trunk builds/d;
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -4176,13 +4176,13 @@
} break;
default: { /* La la la */
- gchar *buf;
+ //gchar *buf;
purple_debug_error("oscar", "ssi: Action 0x%04hx was unsuccessful with error 0x%04hx\n", retval->action, retval->ack);
- buf = g_strdup_printf(_("Unable to add the buddy %s for an unknown reason."),
#!/bin/sh
set -e
# repack-deb - Repack Debian package with xz compression algorithm
# Copyright (c) 2014, djcj <djcj@gmx.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
#!/bin/bash
# Date : (2014-05-27 23:08)
# Last revision : (2014-05-27 23:08)
# Wine version used : 1.4.1
# Distribution used to test : Mint 16 petra x64
# Author : djcj
# Licence : Freeware
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
@darealshinji
darealshinji / gzdoom-build-linux.sh
Last active August 29, 2015 14:02
Automates building GZDoom for GNU/Linux
#!/bin/sh
# Install dependencies:
# sudo apt-get install chrpath cmake git libfluidsynth-dev libglew-dev libgtk2.0-dev libsdl1.2-dev
if [ "$(uname)" != "Linux" ] ; then
echo "Not running GNU/Linux"
exit 1
fi
@darealshinji
darealshinji / mis2x264.sh
Last active May 2, 2023 20:54
Convert MediaInfo encoding settings to x264 commands
#!/bin/sh
if [ -z "$1" ] ; then
echo "Convert MediaInfo encoding settings to x264 commands"
echo "Usage: $0 <video>"
echo " $0 \"MediaInfo encoding settings\""
exit 0
fi