Skip to content

Instantly share code, notes, and snippets.

View orderthruchaos's full-sized avatar

Brett DiFrischia orderthruchaos

View GitHub Profile
@orderthruchaos
orderthruchaos / arduino_indent.vim
Created May 12, 2011 16:19
Arduino indent file...
" Vim syntax file
" Language: Arduino
" Maintainer: Brett DiFrischia <orderthruchaos _at_ gmail _dot_ com>
" Last Change: 2011-05-12
" License: VIM license (:help license, replace vim by arduino.vim)
" Based on syntax/arduino.vim (by Johannes Hoff) initial setup.
" Read the C++ indent script to start with
if version < 600
@orderthruchaos
orderthruchaos / pathogen_helptags_map.vim
Created January 27, 2012 15:42
Normal mode map for calling pathogen#helptags()
nnoremap <Leader>ph :call pathogen#helptags()<CR>
@orderthruchaos
orderthruchaos / hex_pm_pages.user.js
Last active August 29, 2015 14:17
Greasemonkey User Script: add "first page" and "last page" links to hex.pm package listing.
// ==UserScript==
// @name hex_pm_pages
// @namespace http://orderthruchaos.bitbucket.org/
// @copyright 2015+, Brett DiFrischia
// @license
// @description
// @grant GM_log
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @include https://hex.pm/packages
// @include https://hex.pm/packages?*
@orderthruchaos
orderthruchaos / rand_sig.m
Created March 31, 2015 15:53
MATLAB function to create randomized list of 2 values.
function [ sigmas ] = rand_sig( s1, s2, p, n )
% RAND_SIG Generate random list of sigmas
% sigs = rand_sig(0.5, 0.45, 0.65, 100000);
%
% Arguments:
% s1 = first standard deviation
% s2 = second standard deviation
% p = probability (decimal) of s1 occurring
% n = number of items to generate
@orderthruchaos
orderthruchaos / hex_pm_hexdocs_link.user.js
Created April 7, 2015 15:01
Greasemonkey User Script: add hexdoc.pm link to hex.pm package information page.
@orderthruchaos
orderthruchaos / smile_amazon_com.user.js
Created April 7, 2015 15:03
Greasemonkey User Script: ensure that you are on smile.amazon.com.
// ==UserScript==
// @name smile_amazon_com
// @namespace http://orderthruchaos.bitbucket.org/
// @copyright 2015+, Brett DiFrischia
// @license
// @description Always remember to smile!
// @grant GM_log
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @include http://www.amazon.com/*
// @include https://www.amazon.com/*
@orderthruchaos
orderthruchaos / bnd_utils.clj
Created September 10, 2015 23:37
Implementation of `def-` for Clojure
(ns bnd-utils)
; Based on the definition of defn-
(defmacro def-
"same as def, yielding non-public def"
[name & decls]
(let [m (assoc (meta name) :private true)]
`(do
(def ~name ~@decls)
(alter-meta! (var ~name) assoc :private true))

City Construction Site

Get it? Site? oh man.

Demos for GreenSock's latest 18.0 release, with stagger cycle and hsl tweens, as well as jQuery3.0 with class operations on SVG. So many goodies. SVG.

A Pen by Sarah Drasner on CodePen.

License.

@orderthruchaos
orderthruchaos / IEx.exs
Last active November 28, 2019 12:44
A possible q/0 helper for Elixir.IEx.
if ! Enum.member?(:erlang.loaded, IEx.UserDrv.Config) do
defmodule IEx.UserDrv.Config do
import Process, only: [group_leader: 0]
@moduledoc """
Structure to hold :user_drv configuration information.
"""
defstruct node: Node.self, pid: nil, port: nil, leader: group_leader
@orderthruchaos
orderthruchaos / install_phoenix.sh
Created February 22, 2016 21:15 — forked from ulve/install_phoenix.sh
Install Erlang/Elixir/Phoenix on a Raspberry Pi
#!/bin/bash
sudo apt-get update
sudo apt-get --assume-yes install wget
sudo apt-get --assume-yes install libssl-dev
sudo apt-get --assume-yes install ncurses-dev
sudo apt-get --assume-yes install m4
# erlang
wget http://erlang.org/download/otp_src_18.2.tar.gz
tar -xvzf otp_src_18.2.tar.gz
cd otp_src_18.2