Skip to content

Instantly share code, notes, and snippets.

@abarax
abarax / uci.md
Created December 22, 2015 22:50
UCI Protocol Description

The UCI protocol as publiced by Stefan-Meyer Kahlen (ShredderChess):

Description of the universal chess interface (UCI) April 2004

  • The specification is independent of the operating system. For Windows, the engine is a normal exe file, either a console or "real" windows application.

  • all communication is done via standard input and output with text commands,

@abarax
abarax / _README.md
Created October 31, 2017 04:38 — forked from shaunlebron/_README.md
Direct3D9 Wrapper DLL

In response to a StackOverflow question:

This is code to build a Direct3D wrapper DLL, intercepting all calls to Direct3D interface functions so that you can draw your own objects to display over the game. Just plop the DLL into the same folder as the game's executable, and it should load it as if it were the real d3d9.dll file. It still forwards all calls to the real one in system32, just allows stuff to happen in between. original stackoverflow answer

@abarax
abarax / datatables.set_filter_debounce.js
Created July 20, 2017 01:42 — forked from dtjm/datatables.set_filter_debounce.js
Search filter debounce for Allan Jardine's DataTables plugin for jQuery. Requires Underscore.js
jQuery.fn.dataTableExt.oApi.fnSetFilterDebounce = function ( oSettings, iDelay ) {
/*
* Type: Plugin for DataTables (www.datatables.net) JQuery plugin.
* Name: dataTableExt.oApi.fnSetFilterDebounce
* Version: 0.01
* Description: Enables filtration debouncing which prevents filter from
* happening until keypresses have stopped for [iDelay] milliseconds.
* Uses code from Zygimantas' fnSetFilteringDelay
* Inputs: object:oSettings - dataTables settings object
@abarax
abarax / iterm2-solarized.md
Created March 14, 2016 00:40 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@abarax
abarax / postgres-upgrade-recipe.sh
Created February 22, 2016 03:07 — forked from eoinkelly/postgres-upgrade-recipe.sh
Upgrade Postgres to 9.4 using Homebrew on Mac OSX
#!/bin/bash
# This script can be used in "run & hope" mode or you can use it as a recipe to
# do things manually - you probably want the latter if you really care about
# the data in your databases.
# Happy hacking
# /Eoin/
# Tell bash to stop if something goes wrong
set -e

Keybase proof

I hereby claim:

  • I am abarax on github.
  • I am leighappel (https://keybase.io/leighappel) on keybase.
  • I have a public key whose fingerprint is A393 B390 42DE 071A 98D0 12B6 96F6 E575 7D95 F87D

To claim this, I am signing this object:

//
// Frink data file for non-changing units.
//
// This file is used by the Frink calculating tool/programming language:
// http://futureboy.us/frinkdocs/
//
// If you got to this page from a web search because you're trying to do a
// unit conversion or manipulation, try it at the following URL:
//
// http://futureboy.us/frink/
@abarax
abarax / batch-attachment-download.vb
Created November 14, 2013 02:57
Outlook macro for batch download of email attachments
Option Explicit
Sub SaveAttachments()
Dim strPath As String
Dim SH As Shell32.Shell
Dim Fldr As Shell32.Folder
Dim olFolder As Folder
Dim olItem As MailItem
Dim olAttach As Attachment
Const strSubject As String = "VA SSIM" 'text to look for in the subject line
package patmat
import common._
/**
* Assignment 4: Huffman coding
*
*/
object Huffman {
class node(object):
pass
class linked_list:
size = 0
def append(self, node):
if self.size == 0:
self.head, self.tail = node, node