Skip to content

Instantly share code, notes, and snippets.

View kode54's full-sized avatar

Christopher Snowhill kode54

View GitHub Profile
@kode54
kode54 / PKGBUILD
Last active December 17, 2015 13:19
Arch Linux AUR PKGBUILD for lib32-mesa-git
# Maintainer: Jesse Jaara <gmail.com: jesse.jaara>
# Contributor: Kristian Klausen <hotmail.com: klausenbusk>
# Contributor: Egon Ashrafinia <gmail.com: e.ashrafinia>
# Contributor: Tavian Barnes <gmail.com: tavianator>
# Contributor: Jan de Groot <archlinux.org: jgc>
# Contributor: Andreas Radke <archlinux.org: andyrtr>
# Contributor: Thomas Dziedzic <gmail: gostrc>
# Contributor: Antti "Tera" Oja <gmail.com: antti.bofh>
# Contributor: Diego Jose <gmail.com: diegoxter1006>
--- a/configure.ac 2013-05-19 18:01:13.125728757 -0700
+++ a/configure.ac 2013-05-17 10:41:57.581424949 -0700
@@ -1579,13 +1579,13 @@
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
- LLVM_COMPONENTS="engine bitwriter"
+ LLVM_COMPONENTS="engine bitwriter ipo"
if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
@kode54
kode54 / genversion.bat
Last active December 17, 2015 13:39
genversion.bat for the Xiph Opus project
@echo off
setlocal enableextensions enabledelayedexpansion
for /f %%v in ('git --git-dir="%~dp0..\.git" describe --tags --match "v*"') do set version=%%v
if not "%version%"=="" goto :gotversion
if exist "%~dp0..\version.mk" goto :getversion
@kode54
kode54 / flatten.bat
Created May 26, 2013 00:56
A simple batch script for single step flattening a series of delta frames converted from GIF89 animation to PNG.
@echo off
setlocal
set itemno=%1
set outno=%1
set /a outno+=1
SET itemno=0000%itemno%
@kode54
kode54 / lanczos_resampler.h
Created August 26, 2013 05:24
Lanczos FIR filter resampler, import header
#ifndef _LANCZOS_RESAMPLER_H_
#define _LANCZOS_RESAMPLER_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Call this once on startup */
void lanczos_init();
@kode54
kode54 / vio2sf_pgd.txt
Created October 16, 2013 04:56
MSVC 2012 profiler output data for foo_input_vio2sf
Microsoft (R) Profile Guided Optimization Manager 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
PGD File: foo_input_vio2sf.pgd 10/15/2013 20:59:52
Module Count: 1 Function Count: 3497 Arc Count: 5520 Value Count: 170
Static instructions: 70918 Basic blocks: 13195 Average BB size: 5.4
Dynamic instructions: 12592881851
entry static dynamic % run
@kode54
kode54 / clock_scan.tcl
Last active December 25, 2015 22:18
This is a wrapper around clock scan for Tcl older than 8.6, which lacks the -format argument to manually specify a timestamp format. This will remove any timezone offset, which clock scan will choke on, and turns it into a relative time offset to apply to the remaining timestamp.
proc urllog:clock_scan {datestring} {
set regpat {([-+]{1}[0-9]{1,4})}
set offset_string "0 seconds"
if {[regexp $regpat $datestring -> offset]} {
regsub $regpat $datestring {} datestring
set offset_hours 0
set offset_minutes 0
set offset_length [string length $offset]
scan $offset %d offset
set offset_sign [expr { ($offset > 0) ? "ago" : "" }]
<?php
define( 'IPB_THIS_SCRIPT', 'public' );
define( 'IPB_LOAD_SQL' , 'queries' );
require_once( '/var/www/path/to/ipb/init.php' );
require_once ROOT_PATH . "sources/ipsclass.php";
require_once KERNEL_PATH . "class_converge.php";
@kode54
kode54 / ciso-portability.patch
Created November 18, 2013 00:59
This patch fixes several portability issues and most or all of the warnings in the CISO Compressed ISO9660 tool, version 1.01.
diff -ur ciso-1.0.0/ciso.c ciso-1.0.2/ciso.c
--- ciso-1.0.0/ciso.c 2006-11-03 12:53:29.000000000 -0800
+++ ciso-1.0.2/ciso.c 2013-11-17 16:07:47.000000000 -0800
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <zlib.h> /* /usr(/local)/include/zlib.h */
#include <zconf.h>
@kode54
kode54 / higan_v094_osx.patch
Created January 21, 2014 03:53
Patch against higan v094 which does the following: 1) Adds the executable base path to the dlopen search path, to facilitate loading libananke.dylib from the app bundle. 2) Imports endian.h from the correct path. 3) Fixes noinline macro clash with Cocoa/Carbon headers. 4) Updates Ruby Carbon input implementation poll() function and removes an ex…
diff -urN higan_v094-source/nall/dl.hpp higan/nall/dl.hpp
--- higan_v094-source/nall/dl.hpp 2014-01-20 17:30:18.000000000 -0800
+++ higan/nall/dl.hpp 2014-01-20 18:17:41.000000000 -0800
@@ -60,9 +60,15 @@
handle = 0;
}
#elif defined(PLATFORM_MACOSX)
+static void junk_function() {}
inline bool library::open(const string& name, const string& path) {
if(handle) close();