Skip to content

Instantly share code, notes, and snippets.

#cloud-config
# vim: syntax=yaml
#
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
@jhgaylor
jhgaylor / lib.go
Last active November 12, 2017 22:41
package ci
import (
"crypto/tls"
rc "github.com/concourse/fly/rc"
"github.com/concourse/go-concourse/concourse"
)
type target struct {
baseTarget rc.Target
func NewCI(
teamName string,
url string,
username string,
password string,
insecure bool,
caCert string,
) (*ConcourseCI, error) {
authTarget, _ := rc.NewBasicAuthTarget("my-target", url, teamName, insecure, username, password, caCert, false)
fmt.Printf("CI: got a basic auth target.\n")
cards_3ed = MTG::Card.where(set: '3ED').all
cards_lea = MTG::Card.where(set: 'LEA').all
all_cards = cards_3ed + cards_lea
$ ruby beau.rb
Let's practice everything.
You'd need to know 'bout escapes with \ that do
newlines and tabs.
--------------
The lovely world
with logic so firmly planted
cannot discern
the needs of love
nor comprehend passion from intuition
@jhgaylor
jhgaylor / count_children.js
Created June 13, 2016 16:55
Does your brain hurt when you think of trees? Mine too... I don't ever want to write this again.
function countChildren (node) {
function _countChildren (node) {
if (node.children) {
return node.children.map((child) => {
return _countChildren(child);
}).reduce((memo, next) => {
return memo + next;
}, 1);
}
return 1;
all: hello
hello: main.o factorial.o hello.o
g++ main.o factorial.o hello.o -o hello
main.o: main.cpp
g++ -c main.cpp
factorial.o: factorial.cpp
g++ -c factorial.cpp

Keybase proof

I hereby claim:

  • I am jhgaylor on github.
  • I am jhgaylor (https://keybase.io/jhgaylor) on keybase.
  • I have a public key ASBAtvWD5X5UkRIrdsL5GBueOfiYfE9n_OLC8FeuANWYoAo

To claim this, I am signing this object:

log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
[2016-01-15 03:02:08,126][INFO ][node ] [Bevatron] version[2.1.0], pid[12], build[72cd1f1/2015-11-18T22:40:03Z]
[2016-01-15 03:02:08,126][INFO ][node ] [Bevatron] initializing ...
[2016-01-15 03:02:08,384][INFO ][plugins ] [Bevatron] loaded [cloud-kubernetes], sites []
[2016-01-15 03:02:08,407][INFO ][env ] [Bevatron] using [1] data paths, mounts [[/data (/dev/sda9)]], net usable_space [75gb], net total_space [94.5gb], spins? [possibly], types [ext4]
[2016-01-15 03:02:10,535][INFO ][node ] [Bevatron] initialized
[2016-01-15 03:02:10,535][INFO ][node ] [Bevatron] starting ...
[2016-01-15 03:02:10,756][INFO ][transport
@jhgaylor
jhgaylor / get.incoming.twilio.js
Created November 25, 2015 20:14
hello-twilio-meteor
var getTwilioMessages = Meteor.wrapAsync(twilioClient.client.messages.list, twilioClient.client.messages);
function updateMessages () {
getTwilioMessages(function (err, data) {
if (err) {
console.warn("There was an error getting data from twilio", err);
return
}
data.messages.forEach(function (message) {
if (SMS.find({sid: message.sid}).count() > 0) {