Skip to content

Instantly share code, notes, and snippets.

View kode54's full-sized avatar

Christopher Snowhill kode54

View GitHub Profile
@kode54
kode54 / readme.txt
Created January 7, 2015 05:09
How to install DirectSound audio effects in Wineskin for OpenMPT
1. Acquire dsdmo.dll and msdmo.dll from a copy of Windows. This may include up to Windows 8.1,
or possibly even Windows 10. You want the 32-bit versions, so if you're working with a 64-
bit version, you want the ones from the SysWOW64 directory.
2. Copy them in Finder, or prepare to do this in a Terminal prompt if you wish.
3. Open Package Contents on the OpenMPT.app Wineskin bottle.
4. Drill into the drive_c shortcut, or go the long way, through Contents/Resources.
5. Drill deeper, into windows/system32.
6. Copy the two DLL files here, overwriting as necessary.
That's just the preparation. Now you need to make it actually register with the bottled system, so:
#include <stdlib.h>
#include <string.h>
#include "psflib.h"
uint32_t ROM_SIZE;
uint8_t ROM[0x4000000];
uint8_t savestatespace[0x80275c];
static void * stdio_fopen( const char * path )
if ( $to_channel == 1 ){
$output = weechat::string_remove_color($output, "");
weechat::command(weechat::current_buffer(),"/say " . $output);
}elsif ( $to_channel == 0 ){
weechat::print(weechat::current_buffer(),$output);
}
@kode54
kode54 / Makefile
Last active March 7, 2017 03:42
Simple stereo resampler in C99, based on blargg's Fir_Resampler.(cpp|h)
CFLAGS = -O2
OBJS = test.o resampler.o
all: test spectrum.png
test : $(OBJS)
$(CC) -o $@ $^
.c.o:
@kode54
kode54 / config.example.json
Last active September 3, 2015 04:14 — forked from Treeki/config.example.json
FurAffinity -> Pushbullet Notifications
{
"username": "ninji-vahran",
"database": "notifier.db",
"cookies": {
"__cfduid": "REDACTED",
"a": "REDACTED",
"b": "REDACTED",
"folder": "inbox"
},
"pushbullet_key": "REDACTED",
@kode54
kode54 / patch_cd2.c
Last active September 12, 2015 06:20
A simple patcher to fix broken PSF1 sets. In this case, it is to fix PSFs from CaitSith2's Chocobo's Dungeon 2 rip.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include <stdint.h>
static uLongf decomp_size = 0;
static uint8_t exe_buffer[2 * 1024 * 1024];
static uint8_t file_buffer[3 * 1024 * 1024];
@kode54
kode54 / invision23_to_smf.sql
Last active January 9, 2016 13:34
IP Board 2.3.x to SMF 2.x conversion script for use with SMF's convert.php script
/* ATTENTION: You don't need to run or use this file! The convert.php script does everything for you! */
/******************************************************************************/
---~ name: "Invision Power Board 2.3"
/******************************************************************************/
---~ version: "SMF 1.1.x"
---~ settings: "/conf_global.php"
---~ globals: INFO
---~ from_prefix: "`$INFO[sql_database]`.$INFO[sql_tbl_prefix]"
---~ table_test: "{$from_prefix}members"
<?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";
limit_req_zone $binary_remote_addr zone=weechat:10m rate=5r/m;
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name ##goeshere##;
include /path/to/ssl_config;
...
@kode54
kode54 / fix_elkarte_quotes.php
Last active January 9, 2016 05:18
This little PDO powered script is designed for fixing the date stamps on converted quote tags after my initial IPS Board to SMF converter script produces mangled timestamps.
<?php
$dsn = 'mysql:dbname=elkarte;host=localhost';
$dbuser = '<username>';
$dbuserpw = '<password>';
$sql = 'SELECT * FROM `elkarte_messages` LIMIT ';
$sql2 = ', 200';
$sql_msg = 'SELECT poster_time FROM elkarte_messages WHERE id_msg = :id_msg';
$sql_upd = 'UPDATE elkarte_messages SET body = :body WHERE id_msg = :id_msg';