This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Windows utility that creates a child process without inheriting any | |
* sort of environment. Used in the setup scripts to fake a vanilla | |
* windows environment for CMake. | |
* | |
* Developed by Qix | |
*/ | |
#pragma comment(lib, "Userenv.lib") | |
#pragma comment(lib, "Advapi32.lib") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WANSI - The Windows ANSI Lua Module | |
*/ | |
#ifndef _WIN32 | |
static_assert(false, "This Lua module is only intended to be built by MSVC tools on Windows."); | |
#endif | |
#include <windows.h> | |
#include <lua.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var injectables = [ | |
"ingredients", | |
"for the cake", | |
"1 2/3 cups all-purpose flour", | |
"1 1/2 cups granulated sugar", | |
"2/3 cup unsweetened cocoa powder", | |
"1 1/2 teaspoons baking soda", | |
"1 teaspoon salt", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BSON Pure Javascript Implementation | |
* by Qix | |
* | |
* Known shortcomings: | |
* - ObjectID is excluded (for now) | |
* - DBPointer is excluded | |
* - Javascript code is excluded (for now; scoped encoding | |
* will always be excluded) | |
* - Timestamp (Mongo's specific type, not UTC) is excluded (for now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Palette Library | |
* | |
* A simple class that wraps color modification operations | |
* into a simple and elegant chainable clas | |
*/ | |
class Palette | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A more robust ucwords() | |
*/ | |
define( 'UCW_DEFAULTS', 0x1 ); | |
define( 'UCW_MATCHSTART', 0x2 ); | |
define( 'UCW_REVERSE', 0x4 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Takes a **RELATIVE** path and makes it relative to the *actual* source tree. | |
# Only use if you know what you're doing; this circumvents what Tup is supposed | |
# to do: manage read/write access. | |
# Check that we're in a tup directory | |
test "$(pwd | grep "\/\.tup")" || (echo "Not in a .tup directory!" 1>&2 && exit 1) | |
# First, find the actual root. | |
troot= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get width | |
const width = parseInt(process.argv[2] || '80'); | |
// Read STDIN | |
let buffer = Buffer.alloc(0); | |
process.stdin.resume(); | |
process.stdin.on('data', function(data) { | |
buffer = Buffer.concat([buffer, data]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
(cat > /usr/local/bin/watchrun) <<EOF | |
#!/bin/bash | |
# Watches the CWD recursively and runs a command | |
# whenever a file changes. | |
trap ctrl_c INT | |
function ctrl_c() { | |
echo "Terminating watchrun" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <tchar.h> | |
#include <sstream> | |
#include <iostream> | |
#include <fstream> | |
#include <io.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
BOOL ncEnableConsole() |
OlderNewer