Skip to content

Instantly share code, notes, and snippets.

@tfwio
tfwio / naudio-midi-tempo_reader-calculator-test.cs
Last active September 16, 2018 22:54
Example Console Application demonstrating a TempoMap using NAudio.Midi.MidiFile (C#6-ish)
using System;
using System.Collections.Generic;
using NAudio.Midi; // v1.8.4
namespace NAudioMidiTest
{
class Program
{
const string fmt3 = "{0:##,###,###,000}:{1:0#}:{2:00#}";
@tfwio
tfwio / bs
Last active December 27, 2017 18:19
a simple, initial golang helper (bootstrap) script which helps import some nodejs/npm, statik and stuff. (and builds various aspects of a given project)
# !/usr/bin/env bash
# vars from `~/.bash_profile`. don't seem to get picked up for all
# bash terminal emulators for windows.
# particularly, GOPATH and GOROOT don't seem to get picked up.
# Therefore, its suggested (for this case) that you define
# GOPATH, GOROOT and any modifications to PATH there.
# EG: PATH=${PATH}:${GOPATH}/bin:${GOROOT}/bin
if [ -d /c/windows ]; then . ~/.bash_profile ; fi
@tfwio
tfwio / Clew.cs
Last active October 14, 2017 16:28
CSharp Thread Caller Utility (WinForms)
/*
* User: xo
* Date: 8/13/2017
* Time: 1:20 PM
*/
using System;
using System.Threading;
using System.Windows.Forms;
//using NLog=System.Diagnostics.Debug;//.net 3.5 isn't supporting this
@tfwio
tfwio / FileSystemExtensions.cs
Last active July 28, 2017 15:22
INI file serializer/deserializer
/*
* User: xo
* Date: 6/17/2017
* Time: 11:33 PM
*/
using System;
using System.Linq;
using w32;
using w32.shell;
@tfwio
tfwio / AudioDevice.cs
Created June 17, 2017 00:14
Abstraction on NAudio AudioDevice as implemented in a particular (private) ds2 library
/* tfwxo * 1/19/2016 * 2:10 AM */
using System;
using System.Linq;
using System.Threading;
using NAudio.Wave;
using on.drumsynth2;
namespace on.audio
{
@tfwio
tfwio / FontAwesome.cs
Last active October 3, 2015 07:43
FontAwesome CharCode class — generated using YamlDotNet, from the YAML file in FontAwesome's git repository
namespace System
{
static public class FontAwesome {
static public readonly string _500px = "\xf26e";
static public readonly string Adjust = "\xf042";
static public readonly string Adn = "\xf170";
static public readonly string AlignCenter = "\xf037";
static public readonly string AlignJustify = "\xf039";
static public readonly string AlignLeft = "\xf036";
static public readonly string AlignRight = "\xf038";
@tfwio
tfwio / DragDropFormsExtension.cs
Last active September 20, 2015 14:49
Quick 'DropIn' to apply DragDrop operations to a WinForms with particular attention to dragging a file into TextBox. [tags=csharp,dragdrop,csharp-extension]
// tfwio ;)
using System;
namespace System.Windows.Forms
{
/// <summary>
/// Apply DragDrop actions indirectly using delegtes or EventHandlers,
/// or directly with Action definitions (see Example).
/// </summary>
/// <seealso cref="ApplyDefaultDragDrop(TextBox)"/>
/// <example>
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 1671)
+++ CMakeLists.txt (working copy)
@@ -492,6 +492,7 @@
${PoDoFo_SOURCE_DIR}
${PoDoFo_SOURCE_DIR}/src
${FREETYPE_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
@tfwio
tfwio / get-woff2
Last active August 29, 2015 14:19
Compile WOFF2 compress/decompress mingw32-w64-pthread
#!/bin/sh
function boo () {
# vars
local WORK_PATH=${PWD}
local WOFF2_GIT=https://github.com/google/woff2.git
local WOFF2_SHA=2855ee7b8bf6a46ec3a10f773f358c8c0f808b74
# BROTLISHA=f8bfe06821904a8e009577e938682d6522998792
@tfwio
tfwio / msys-helper.md
Last active August 29, 2015 14:10
MSYS HELPER DRAFT