Skip to content

Instantly share code, notes, and snippets.

View RJ's full-sized avatar
🥱
parenting toddlers

Richard Jones RJ

🥱
parenting toddlers
View GitHub Profile

Keybase proof

I hereby claim:

  • I am RJ on github.
  • I am RJ (https://keybase.io/RJ) on keybase.
  • I have the public key with fingerprint 0EDD ED5C 68CB 98A2 222D  F327 1CB6 5397 9D96 56FD

To claim this, I am signing this object:

@RJ
RJ / ldap-config.txt
Created May 12, 2014 15:43
Setting up LDAP server for testing our ldap auth against
as root:
apt-get install slapd ldap-utils cpu
edit, /etc/cpu/cpu.conf replace these lines:
LDAP_URI = ldap://localhost
BIND_DN = cn=admin,dc=nodomain
BIND_PASS = irccloud
USER_BASE = dc=nodomain
gulp.task('flatten-js', function() {
return gulp.src(['app/*.js', './app/**/*.js'])
.pipe(flatten())
.pipe(gulp.dest('./build/js-app'))
});
function bundleEntryPoint(entryfile) {
process.env.NODE_PATH = ( process.env.NODE_PATH ?
process.env.NODE_PATH + ':' : '')
+ './build/js-app/'
@RJ
RJ / ec2-iam-custom-inline-policy-packer.json
Created April 9, 2015 13:49
EC2 user custom inline policy for packer ec2-builder
{
"Statement": [
{
"Sid": "PackerSecurityGroupAccess",
"Action": [
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:DescribeSecurityGroups",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:RevokeSecurityGroupIngress"
<?php
function array_map_eval($code, $array)
{
$retval=array();
foreach($array as $_) $retval[]=eval($code);
return $retval;
}
$input = array();
for($i=0;$i<2;++$i)
% An ad hoc, informally-specified, bug-ridden, slow implementation of half of Lisp
%
% start like: erlc erlisp.erl && rlwrap erl -noshell -s erlisp -s init stop
% quoting and eval are not working.
% one example that works:
% (set triple (lambda (n) (* n 3)))
% (triple 3)
%
% Any feedback on what I'm doing wrong or how to improve appreciated.
% twitter.com/metabrew
#!/bin/bash
# Hacky 'IRCCat for twitter' (see http://github.com/RJ/irccat)
# Usage: ./twittercat.sh
# echo "my tweet" | nc -q0 localhost 9999
PORT=9999
USERNAME="your_twitter_name"
PASSWORD="your_twitter_password"
while [ 1 ]
Music library, search engine and scanner.
Implements the JSON-RPC musiclibrary protocol as outlined below.
NB: "id" field would be unique to each call (increment int, or use guid)
ADDING/REMOVING TRACKS FROM THE INDEX
-------------------------------------
>>> (no "id", thus no response sent)
{
#!/usr/bin/ruby
require 'net/http'
require 'net/https'
require 'uri'
require 'rubygems'
require 'json'
require 'ruby-growl'
require "getopt/long"
opt = Getopt::Long.getopts(
%%
%% Simple pool for gen_servers that only use :call
%%
-module(gen_server_call_pool).
-behaviour(gen_server).
%% --------------------------------------------------------------------
%% External exports
-export([start_link/3, stats/1]).