Skip to content

Instantly share code, notes, and snippets.

View rebolyte's full-sized avatar

James Irwin rebolyte

View GitHub Profile
@rebolyte
rebolyte / shThemeUpstream.css
Created November 12, 2014 20:13
Upstream TextMate theme ported for use with Alex Gorbatchev's SyntaxHighlighter. See demo here: http://rebolyte.pancakeapps.com/syntax-highlighting.html
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
* Version 3.0.83 (July 02 2010)
* Copyright (C) 2004-2010 Alex Gorbatchev.
* Dual licensed under the MIT and GPL licenses.
*
* Upstream theme originally by Media Upstream:
* https://github.com/mediaupstream/Upstream-Textmate-Themes/tree/master/Upstream
* Ported to SyntaxHighlighter by James Irwin (@rebolyte).
Verifying that +jamesirwin is my openname (Bitcoin username). https://onename.io/jamesirwin
@rebolyte
rebolyte / gist:b0d742b72fc9c3f9765a
Created February 16, 2015 23:00
access nested data in dgrid
// http://dgrid.io/js/dgrid/test/Grid_rendering.html
// Apparently this is the only way to access nested data? And it's
// seriously legacy and only supported because of old DojoX stuff?
// data format goes thusly:
// {
// "_id": 1,
// "name": {
// "formatted": "first last",
@rebolyte
rebolyte / errorception-deconstructed.js
Created February 17, 2015 19:19
deconstructing errorception's snippet
// Original snippet:
// https://errorception.com/docs
var SCRIPT_EL = 'script';
function (window, document, SCRIPT_EL, PROJ_ID) {
// Set a global variable called '_errs' to an array with our PROJ_ID in it
window._errs = [PROJ_ID];
// Specify our method to be executed when 'onerror' fires. This gives us
@rebolyte
rebolyte / cryptogram.reb
Last active August 29, 2015 14:17
Cryptogram generator
REBOL [
title: "Cryptogram generator"
author: "James Irwin"
email: "rebolyte at Google's email thingy"
date: 23-Mar-2015
]
alpha: [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]
the-file: ask "File of strings to encode: "
@rebolyte
rebolyte / rotate-logs-test.py
Created July 17, 2015 05:17
Playing around with Python
"""
title: nginx log rotator
author: James Irwin
date: 16-Jul-2015
purpose: A test to play around with Python.
"""
import os
from datetime import datetime
import shutil
@rebolyte
rebolyte / gulpfile.js
Last active January 20, 2017 10:27
gulp+browserify+ES6
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var stylus = require('gulp-stylus');
@rebolyte
rebolyte / gist:ba25c16c25d3f87ecf3b
Created November 2, 2015 22:17
nvm .tar.xz error
$ nvm install 4.0.0
Downloading https://nodejs.org/dist/v4.0.0/node-v4.0.0-darwin-x86.tar.xz...
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
Binary download failed, trying source.
######################################################################## 100.0%
Checksums empty
tar: Unrecognized archive format
@rebolyte
rebolyte / polish.js
Last active September 29, 2017 20:08
Evaluate a string in Reverse Polish Notation and output the result.
// https://codegolf.stackexchange.com/questions/221/reverse-polish-notation
'use strict';
// let s = '-4 5 +';
// let s = '5 2 /';
// let s = '5 2.5 /';
// let s = '4 2 5 * +';
// let s = '5 1 2 + 4 * 3 - +';
let s = '4 2 5 * + 1 3 2 * + /';
@rebolyte
rebolyte / oloo.es5.js
Last active February 17, 2016 19:44
Testing out the OLOO pattern
/* jshint esversion: 5, strict: global, devel: true */
// Requires an Object.assign polyfill, depending on your environment.
// Nothing else special needed.
'use strict';
var log = console.log.bind(console);
var Vehicle = {