Skip to content

Instantly share code, notes, and snippets.

View wyaeld's full-sized avatar
🐣
work in progress

Brad Murray wyaeld

🐣
work in progress
View GitHub Profile
@wyaeld
wyaeld / person_test.rb
Created October 27, 2011 09:46 — forked from tenderlove/person_test.rb
Use minitest/spec with Rails 3
require 'test_helper'
require 'minitest/autorun'
module Tenderlove
class Spec < MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
include ActiveRecord::TestFixtures
alias :method_name :__name__ if defined? :__name__
self.fixture_path = File.join(Rails.root, 'test', 'fixtures')
@wyaeld
wyaeld / ArchiveServiceMessagesJob.java
Created November 15, 2011 01:20
DI Style Service
public class ArchiveServiceMessagesJob extends AbstractJob {
private static final int PAGE_SIZE = 10;
private ServiceMessageRepository messageRepository;
private AlfrescoAtomPubClient alfrescoClient;
@Autowired
public ArchiveServiceMessagesJob(ServiceMessageRepository messageRepository,
AlfrescoAtomPubClient alfrescoClient) {
@wyaeld
wyaeld / config.ru.rb
Created January 19, 2012 23:32 — forked from brianmario/config.ru.rb
minimal rails3 app
# minimal rails3 app
require 'action_controller'
Router = ActionDispatch::Routing::RouteSet.new
Router.draw do
root :to => 'site#index'
end
class SiteController < ActionController::Metal
<!DOCTYPE html>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
/*nodes*/
.node text {
pointer-events: none;
font: 20px sans-serif;
@wyaeld
wyaeld / index.html
Created January 23, 2013 00:38 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
stroke: #000;
}
.node {
fill: #ccc;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="https://raw.github.com/timrwood/moment/1.6.0/min/moment.min.js"></script>
<style type="text/css">
#chart-mini {
#!/usr/bin/env python
#http://ozkatz.github.io/ssh-into-your-ec2-instances-with-ease.html
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
@wyaeld
wyaeld / gist:7243037
Last active December 27, 2015 01:09
/etc/apparmor.d/usr.bin.lxc-start for Jerome
14:13 $ cat /etc/apparmor.d/usr.bin.lxc-start
#include <tunables/global>
/usr/bin/lxc-start flags=(attach_disconnected) {
#include <abstractions/lxc/start-container>
}
~/
@wyaeld
wyaeld / 0_reuse_code.js
Created November 28, 2013 20:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am wyaeld on github.
  • I am wyaeld (https://keybase.io/wyaeld) on keybase.
  • I have a public key whose fingerprint is 923F AAAD 9255 3CD7 7DCA 9AA5 C58F 04F8 AE5A 814B

To claim this, I am signing this object: