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 10:19 — forked from anonymous/PKGBUILD
# Maintainer: Martin Schmölzer <mschmoelzer@gmail.com>
# BUILD INSTRUCTIONS:
# ----------------------
# This package is intended as a more up-to-date replacement for the AUR
# 'ttf-ms-fonts' and 'ttf-vista-fonts' packages. It provides newer versions of
# the fonts in these packages, but due to license issues cannot automatically
# download the fonts.
#
# Instead, you must acquire them from a Windows 7 system or install media:
@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 / PKGBUILD
Last active August 24, 2016 19:45
Arch Linux AUR PKGBUILD for mesa-git
# Maintainer: Kristian Klausen <klausenbusk@hotmail.com>
# Contributor: Egon Ashrafinia <e.ashrafinia@gmail.com>
# Contributor: Tavian Barnes <tavianator@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Antti "Tera" Oja <antti.bofh@gmail.com>
# Contributor: Diego Jose <diegoxter1006@gmail.com>
# Credits to maintainers of mesa in extra!
@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 / numa_hack.patch
Created July 27, 2013 22:55
Patch against wine which adds basic implementations of the existing stubbed NUMA functions, which are required by the Concurrency::critical_section and other scheduling code used by std::mutex and std::thread in the MSVC 2012 and newer runtime libraries.
diff -ur wine-crossover.orig/sources/wine/dlls/kernel32/process.c wine-crossover/sources/wine/dlls/kernel32/process.c
--- wine-crossover.orig/sources/wine/dlls/kernel32/process.c 2013-05-13 12:06:06.000000000 -0700
+++ wine-crossover/sources/wine/dlls/kernel32/process.c 2013-07-27 15:52:34.000000000 -0700
@@ -3922,9 +3922,10 @@
*/
BOOL WINAPI GetNumaHighestNodeNumber(PULONG highestnode)
{
- FIXME("(%p): stub\n", highestnode);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
@kode54
kode54 / lanczos_resampler.c
Last active April 3, 2020 20:42
Lanczos FIR filter resampler source code
#include <stdlib.h>
#include <string.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include "lanczos_resampler.h"
enum { LANCZOS_RESOLUTION = 8192 }; /* Phase precision for 1:1 or upsampling */
enum { LANCZOS_WIDTH = 8 }; /* Width of half a wing of the filter */
enum { LANCZOS_SAMPLES = LANCZOS_RESOLUTION * LANCZOS_WIDTH };
@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