Skip to content

Instantly share code, notes, and snippets.

View hacknightly's full-sized avatar
:octocat:
On Github

Darrell Banks hacknightly

:octocat:
On Github
View GitHub Profile
;; emacs housekeeping
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq warning-minimum-level :emergency)
;; pixel scroll
(setq pixel-scroll-precision-mode 1)
;; don't create lock files
(setq create-lockfiles nil)
@hacknightly
hacknightly / riffwave.js
Created September 24, 2012 15:20
riffwave.js
/*
* RIFFWAVE.js v0.03 - Audio encoder for HTML5 <audio> elements.
* Copyleft 2011 by Pedro Ladaria <pedro.ladaria at Gmail dot com>
*
* Public Domain
*
* Changelog:
*
* 0.01 - First release
* 0.02 - New faster base64 encoding
@hacknightly
hacknightly / random-walk.html
Created April 5, 2019 04:24
A Random Walk in JavaScript
<html>
<head>
<style>
body {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
display: flex;
justify-content: center;
@hacknightly
hacknightly / vtk_loader.js
Created April 26, 2013 14:56
A VTK file loader for three.js, thanks Mr. Doob
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.VTKLoader = function () {};
THREE.VTKLoader.prototype = {
constructor: THREE.VTKLoader,
@hacknightly
hacknightly / downloader.js
Last active May 23, 2017 02:29
Wikipedia Page Downloader
import * as https from "../lib/https";
import * as http from "http";
import * as htmlparser from "htmlparser2";
import { HTML, DownloaderResult } from "./types";
export default class Downloader {
parser : htmlparser.Parser;
collecting : boolean;
done : boolean;
@hacknightly
hacknightly / hacknightly.tmTheme
Created March 14, 2016 23:52
My dope sublime theme based on Chelvera
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Hacknightly</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
zipstream = require "zipstream"
fs = require "fs"
async = require "async"
class StreamingResponse
filename: ""
files: []
streaming: true
###
script(id='pageTpl', type='text/html')
| <div class="page">
| <div class="head"><%=title%> - <%=path%></div>
| <div class="body">
| <ul>
| <% _(actions).each(function(action) { %>
| <li>
| <%=action.name%> - <%=Helpers.df(action.time)%>
| <% if (action.ext) { %>
| <i class="pop icon-info-sign" data-content="<%=_.template($('#extTpl').html(), action)%>" data-original-title="Extra Information"></i>
@hacknightly
hacknightly / gist:4698714
Created February 2, 2013 18:27
Audio only ffmpeg
#!/bin/sh
./configure \
--prefix=$PREFIX \
--enable-cross-compile \
--arch=$ARCH \
--target-os=darwin \
--cc="/usr/bin/gcc-4.0" \
--extra-ldflags="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch $ARCH" \
--extra-cflags="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch $ARCH" \
@hacknightly
hacknightly / app.js
Last active November 16, 2015 18:41 — forked from superherointj/app.js
// Hello. I'm learning. Thank you for sharing your insights.
var sUtil = require('sUtils.js');
var obj = {
a:[1,2],
b:[3,4],
}
Object.keys(obj).forEach(function(key) {
if (Array.isArray(obj[key])) {