Skip to content

Instantly share code, notes, and snippets.

View tig's full-sized avatar

Tig tig

View GitHub Profile
@tig
tig / Utils.cs
Created February 1, 2012 08:24
Base64 conversion
public static string ToBase64(string encode) {
Byte[] btByteArray = null;
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
btByteArray = encoding.GetBytes(encode);
string sResult = System.Convert.ToBase64String(btByteArray, 0, btByteArray.Length);
sResult = sResult.Replace("+", "-").Replace("/", "_");
return sResult;
}
public static string FromBase64(string decode) {
@tig
tig / WINTIME.C
Created February 13, 2012 01:38
This module contains functions for managing time and date strings using internationalization.
/************************************************************************
*
* Module: WINTIME.C
*
* System: Microsoft C 6.00A, Windows 3.00
*
* Remarks:
*
* This module contains functions for managing time and date strings
* using internationalization.
@tig
tig / spit.c
Created February 13, 2012 01:51
Blast from the past: SPIT - A print formatting utility from 1987
/*
spit.c (C) KindelCo Software Systems, 1987, 1988
SPIT - A print formatter for the PC
Author: Charles E. Kindel, Jr. (tigger)
Started: July 18, 1987
Version: 1.53
@tig
tig / ez.c
Created February 13, 2012 02:33
EZ: a text editor I wrote in 1987
/* ez.c
ez.c (c) KindelCo Software Systems, 1987
EZ - The tlw Screen Editor
Author: Charles E. Kindel, Jr. (tigger)
Started: July 17, 1987
@tig
tig / compress.c
Created February 13, 2012 02:40
COMPRESS - An LZW file compressor written in 1987
/*
compress.c (c) Charles E. Kindel, Jr., 1987
COMPRESS - An ASCII file compress program
Author: Charles E. Kindel, Jr. (tigger)
Started: June 14, 1987
Version: 2.0
@tig
tig / PLAN
Last active September 23, 2020 02:25
My PLAN file from 1987
To graduate, yell at Dennis Ritchie for writing such a stupid
operating system, write my own, make tons of money,
and die.
@tig
tig / gist:1814218
Created February 13, 2012 06:20
Mono compiler says "The variable `myStream' is assigned but its value is never used"
private void toolStripButtonChooseText_Click(object sender, EventArgs e)
{
Stream myStream = null;
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = ".";
openFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog.FilterIndex = 1;
openFileDialog.RestoreDirectory = false;
@tig
tig / app.js
Created March 17, 2012 19:52
Connect-assetmanager question
require('./bootstrap/bootstrap');
const express = require('express');
const auth = require('connect-auth');
const config = require('./config');
const ConnectCouchDB = require('connect-couchdb')(express);
const assetManager = require('connect-assetmanager');
const assetHandler = require('connect-assetmanager-handlers');
const port = config.keys.port;
echo chars:\u20AC| nc 192.168.0.5 5150 -w 1
@tig
tig / cmdline
Created March 27, 2012 16:57
unicode command line for mce controller
echo chars:\u20AC| nc.exe 192.168.0.5 5150 -w 1