Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tfwio
tfwio / Sample2WindowFrame.cs
Created June 25, 2014 14:55
Sample to Frame resolution calculation; Desired result is simply the integer 'f' (frame-width, in samples). 1920x1080 maximum resolution, windowing path-data for X/Width (1920), so that we can create a cache of this data and more rapidly calculate path-data for rendering. Concept is based on NAuido's WPF player demo, only applied to an entire wa…
some_namespace {
class some_class {
static int FrameSize(int hours, int minutes, int seconds, int channels = 2, int bytes = 2, int rate = 44100, float round = 0f)
{
double samples = channels * bytes * rate * ( hours*60*60 + minutes*60 + seconds );
int frameCount = Convert.ToInt32(samples - samples % 1);
if ((samples % 1) > round) frameCount++;
return frameCount;
}
static void SampleProgram(int window, int hours, int minutes, int seconds, int channels = 2, int bytes = 2, int rate = 44100, float round = 0f)
@tfwio
tfwio / FirstFloor.MUI-net40.xpt
Last active September 25, 2015 21:58
For me, C:\Program Files (x86)\SharpDevelop\5.1\data\templates\project\CSharp\FirstFloor.MUI.xpt; Once you use this template, check out the LocalMuiSettings and feel free to change things around. Here we use HKLM or HKCU (I'm not remembering)/Software/tfwio/... in the windows registry to remember the color theme being used for the MUI app. 20140…
<?xml version="1.0"?>
<Template originator="tfw" created="07/07/2014">
<!-- Template Header -->
<TemplateConfiguration>
<Name>FirstFloor MUI</Name>
<Category>C#</Category>
<Subcategory>WPF</Subcategory>
<Icon>C#.Project.WPFProject</Icon>
<Description>Framework v4.0 --- FirstFloor.ModernUI application (With Icons)</Description>
<Description>FirstFloor.ModernUI application (With Icons)</Description>
@tfwio
tfwio / formatter-prototypes.js
Last active August 29, 2015 14:05
needs consolidation, cleanup ... more
function __formatter(){
//console.log("Formatter prototype initialized.");
return this;
}
/**
* Believe it or not, this is of huge help to our table-sorting algo.
* What it is still doing here is beyond me.
* ---ahh, I was rendering tables in ASPNET/MVC and validating content?

SVN Berkley DB Upgrade

This concept is also known as SVN repository upgrade from v1.6.x to v1.7.

The note is written for an archive I created and have up on my drive.google.com, with some ammendments to this readme for the passer-byer...

Requirements

@tfwio
tfwio / jquery.mbox.js
Created September 2, 2014 13:52
Force a menu to the top of the page when scrolling past the particular item; (seed, working prototype)
'use strict';
/*
* (C) tfwroble 201408231822
*/
(function(w){
/*
what I'm trying to do:
brotli/enc/write_bits.h | 1 -
shared.mk | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/brotli/enc/write_bits.h b/brotli/enc/write_bits.h
index cf6f53e..95b29db 100644
--- a/brotli/enc/write_bits.h
+++ b/brotli/enc/write_bits.h
@@ -21,7 +21,6 @@
#if defined(OS_MACOSX)

Author-meta:Thomas F Wroble Author:Thomas F Wroble Title: UbuntuServer in VirtualBox Subtitle: UbuntuServer Date:20140909 encoding:utf8 version:from the desk of TFWroble mainfont: Roboto Slab documentclass: book dh:8.5in

@tfwio
tfwio / readme.md
Last active August 29, 2015 14:07
a simple download script w/patches where useful for custom mingw-w64 builds using a "/mingw/x64_86-w64-mingw32" or "/mingw/i686-w64-mingw32" (symbolic link) junctioned as "/mingw/mingw32"

This is just a collection of notes and bash (or sh) scripting dedicated to setting up a custom build environment around a mingw-w32 or few. This would probably not be of any interest to any particular individual as compared to other much better team driven scripts and/or projects out there like github.com/Alexpux/MINGW-packages—which I encountered a short time after writing much of this script.

  • First we would do a git checkout ...
  • download the patch
  • apply the patch
  • make ; make install

After patching, a bash process might look something like:

@tfwio
tfwio / b64.sh
Last active August 29, 2015 14:10
¡ TESTING ! webfont-tools
#!/bin/sh
##############################################################
# ¡¡¡DO NOT RUN ME!!!
# THIS SCRIPT IS TO BE CALLED BY ITS OWNER
##############################################################
if [[ ! -z $DIR_ROOT ]] ; then cd $DIR_ROOT ; fi
# ------------------------------------------
# git clone git://git.code.sf.net/p/libb64/git libb64-git
# base64
# ------------------------------------------