Skip to content

Instantly share code, notes, and snippets.

View tautologistics's full-sized avatar

Chris Winberry tautologistics

View GitHub Profile
<?php
define('CONFIG_PATHS', 'path');
define('CONFIG_URLS', 'url');
define('CONFIG_DATABASE', 'db');
define('CONFIG_LOGGING', 'log');
class Config {
private static $instance = null;
private $storage;
@tautologistics
tautologistics / 22-position_data.js
Created November 18, 2010 13:38
node-htmlparser test case that fails element position calculation for chunked parsing
(function () {
function RunningInNode () {
return(
(typeof require) == "function"
&&
(typeof exports) == "object"
&&
(typeof module) == "object"
&&
@tautologistics
tautologistics / example.html
Created December 20, 2010 17:03
Example of explicitly names methods for concise exception stack traces
<html>
<head>
<script language="Javascript">
function Example () {}
Example.prototype.NoName = function () {
this.foo();
}
Example.prototype.ShortName = function ShortName () {
this.foo();
@tautologistics
tautologistics / .gitconfig
Created December 3, 2013 18:43
Personal gitconfig
[user]
name = Xxx Xxx
email = xxx@xxx.xxx
[gui]
recentrepo = ~/some/repo
[color]
ui = auto
branch = auto
diff = auto
interactive = auto
var tv4 = require('tv4');
var schema = {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"id": "#",
"required": ["events"],
"properties": {
"events": {
"type": "array",
var pInfScrLoading = false;
var pInfScrDelay = 250;
function pInfScrExecute() {
pInfScrNode = $('.more').last();
pInfScrURL = $('.more a').last().attr("href");
if(pInfScrNode.length > 0 && pInfScrNode.css('display') != 'none') {
$.ajax({
type: 'GET',
url: pInfScrURL,
beforeSend: function() {
ant
apple-gcc42
autoconf
autoconf213
automake
boost
byobu
cairo
chromedriver
cloog
#!/bin/bash
r=`x="() { :; }; echo x" bash -c ""`
if [ -n "$r" ]; then
echo -e '\033[91mVulnerable to CVE-2014-6271 (original shellshock)\033[39m'
else
echo -e '\033[92mNot vulnerable to CVE-2014-6271 (original shellshock)\033[39m'
fi
cd /tmp;rm echo 2>/dev/null

Keybase proof

I hereby claim:

  • I am tautologistics on github.
  • I am tautologistics (https://keybase.io/tautologistics) on keybase.
  • I have a public key whose fingerprint is 56D5 919E 652E 19FA FFA4 1D9B DFCB C02E 796A FF9D

To claim this, I am signing this object:

@tautologistics
tautologistics / logger.js
Created July 1, 2015 18:14
Angular XHR debug logger
$httpProvider.interceptors.push([
'$q', '$rootScope', '$location',
function ( $q, $rootScope, $location ) {
var formatRequest = function (request) {
return JSON.parse(JSON.stringify({
method: request.method,
url: request.url,
headers: request.headers,
data: request.data
}));