This file contains hidden or 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
// ⓪ ⓪ Circled Digit Zero | |
// ① ① Circled Digit One | |
// ② ② Circled Digit Two | |
// ③ ③ Circled Digit Three | |
// ④ ④ Circled Digit Four | |
// ⑤ ⑤ Circled Digit Five | |
// ⑥ ⑥ Circled Digit Six | |
// ⑦ ⑦ Circled Digit Seven | |
// ⑧ ⑧ Circled Digit Eight | |
// ⑨ ⑨ Circled Digit Nine |
This file contains hidden or 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
//// InhibitWindowsEvents.cpp : Defines the entry point for the console application. | |
//// | |
#define WIN32_LEAN_AND_MEAN // Note: This could use WIN_NT 403 | |
#include <windows.h> | |
#include <stdio.h> | |
HHOOK llMouseHook = NULL; | |
HHOOK llKeyboardHook = NULL; |
This file contains hidden or 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 | |
# Note, apt-get on Ubuntu seems to be providing an out of date optipng. | |
# Try doing this to install version 0.7.6 | |
# Run optipng -v to see the version you have installed. | |
# wget http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.6/optipng-0.7.6.tar.gz | |
# tar xvf optipng-0.7.6.tar.gz | |
# cd optipng-0.7.6 | |
# ./configure |
This file contains hidden or 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
// This script will connect to the DB and look for potential missing indexes. | |
// Author: Liam Mitchell | |
var db = 'database here'; | |
var async = require('async'); | |
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'host here', | |
user : 'username here', |
This file contains hidden or 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
var crc32Previous = crc32(document.body.innerHTML); | |
var notificationPromptedAlready = false; | |
var useAlertInstead = true; | |
var ajaxRefreshTimeout = null; | |
function goReloadAJAX(done, notifyOnChange) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', window.location); | |
xhr.send(null); | |
xhr.onreadystatechange = function () { |
This file contains hidden or 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
/* | |
Goal: To output an ordered array of records distributed into a table/grid with natural numbering top left to bottom then continue counting from next column's top. | |
Author: Liam Mitchell | |
Example: | |
2 columns with 8 records would look like this. | |
Row 0: 0 4 | |
Row 1: 1 5 | |
Row 2: 2 6 |
This file contains hidden or 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
//-------------------------------------- | |
//--- 010 Editor v8.0 Binary Template | |
// | |
// File: Lithtech REZ File Version 1 | |
// Author: MegaByte | |
// Revision: 1 | |
// Purpose: To understand REZ Files. | |
//-------------------------------------- | |
// TODO: Detect empty areas. | |
// TODO: Identify more parts of the Archive. |
This file contains hidden or 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/sh | |
USER=$1 | |
PASSWD=$2 | |
HOST=$3 | |
# Connect to FTP and download all files. | |
SSHPASS=$PASSWD sshpass -e sftp -oBatchMode=no -b - $USER@$HOST <<EOF | |
get -r * | |
quit | |
EOF |
This file contains hidden or 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
-- A port of node-random-number-csprng to PostgreSQL. | |
-- https://github.com/joepie91/node-random-number-csprng/blob/master/src/index.js | |
-- Requires pgcrypto for gen_random_bytes() method. | |
CREATE EXTENSION IF NOT EXISTS pgcrypto; | |
-- Note: Maybe I should use bigint which is 8 bytes in size? | |
DROP FUNCTION IF EXISTS csprng_calculate_parameters(integer); | |
DROP TYPE IF EXISTS csprng_parameters; | |
CREATE TYPE csprng_parameters AS ( |
This file contains hidden or 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
/* | |
* A timer that attempts to be more accurate than native setInterval. | |
* It calculates an appropriate delay to timeout after the callback is called. | |
* It is intended that the Callback function return ASAP this will not handle async operations that may be delayed. | |
*/ | |
class Interval { | |
constructor(cb, ms) { | |
this.cb = cb; | |
this.ms = ms; | |
this.timeout = null; |