Skip to content

Instantly share code, notes, and snippets.

View taxilian's full-sized avatar

Richard Bateman taxilian

View GitHub Profile
@taxilian
taxilian / error
Last active January 6, 2016 19:33
[richard:~/tmp] $ tsc -p .
@taxilian
taxilian / Dockerfile
Last active December 5, 2015 04:52
Docker container for fb-irc-logviewer
from phusion/passenger-ruby19
ENV HOME=/root TZ="America/Boise"
entrypoint ["/sbin/my_init", "--"]
RUN apt-get update && apt-get install -y openjdk-7-jre \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& rm -f /etc/service/nginx/down \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*a \
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local
MENU TITLE PXE Menu
LABEL local
MENU LABEL Boot local hard drive
LOCALBOOT 0
@taxilian
taxilian / base64.cpp
Created June 9, 2015 16:38
simple base64 lib for c++
/*
* base64.cpp
*
*/
#include "APITypes.h"
#include <string.h>
#include "precompiled_headers.h"
#include "base64.h"
@taxilian
taxilian / make_id.py
Created April 8, 2015 21:27
Python script to generate a chrome extension key and the matching id
import hashlib
import os
from Crypto.PublicKey import RSA
KEYSIZE = 1024
# Generate an RSA key
rsakey = RSA.generate(KEYSIZE, os.urandom)
define(['base/BaseView', 'underscore',
'_tpl!./tpl/CustomReport.jst'], function(BaseView, _, tpl) {
var CustomReportView = BaseView.extend({
events: {
},
render: function() {
var self = this;
#include <boost/make_shared.hpp>
#include <boost/process.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/shared_array.hpp>
#include "logging.h"
#include "BrowserPlugin.h"
#include <json/json.h>
#include "ImageFileLoader.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/filesystem.hpp>
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum errors before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false, // This would let through things that break IE
@taxilian
taxilian / updatedocs.sh
Created June 28, 2013 20:26
Script that updates docs for firebreath
#!/bin/bash
pushd /home/richard/sites/firebreath/firebreath-dev
git pull
echo "Running doxygen"
./doxygen/gen.sh > /dev/null
pushd docs
pushd html
for fl in *.html; do
grep $fl * > /dev/null
if (( $? )); then
@taxilian
taxilian / bootstrap.js
Last active December 12, 2015 15:29
require.js shim config for loading twitter bootstrap
/*global requirejs*/
requirejs.config({
shim: {
"bootstrap/js/bootstrap-affix": ["jquery"],
"bootstrap/js/bootstrap-transition": ["bootstrap/js/bootstrap-affix"],
"bootstrap/js/bootstrap-alert": ["bootstrap/js/bootstrap-transition"],
"bootstrap/js/bootstrap-button": ["bootstrap/js/bootstrap-alert"],
"bootstrap/js/bootstrap-collapse": ["bootstrap/js/bootstrap-button"],
"bootstrap/js/bootstrap-dropdown": ["bootstrap/js/bootstrap-collapse"],
"bootstrap/js/bootstrap-modal": ["bootstrap/js/bootstrap-dropdown"],