Skip to content

Instantly share code, notes, and snippets.

View joelmoss's full-sized avatar

Joel Moss joelmoss

View GitHub Profile
@joelmoss
joelmoss / gist:ac4b1bd3405c1080d8b8
Created July 2, 2014 09:20
Alternative SSH keys
# Create a new SSH keypair with a different name. Eg. `my_alternative_key`, then in your ~/.ssh/config SSH config, add the following. Then you can connect via SSH (and of course Git) using `ssh://git@my_alternative_key:USER/REPO`
Host my_alternative_key
Hostname github.com
IdentityFile /home/MYUSER/.ssh/my_alternative_key
$ go build github.com/docker/libcontainer/nsinit
# github.com/docker/libcontainer/namespaces
namespaces/nsenter.go:7:10: fatal error: 'linux/sched.h' file not found
#include <linux/sched.h>
^
1 error generated.
joelmoss@qa:~/images/base$ ssh root@localhost -p 49155 -v
OpenSSH_6.2p2 Ubuntu-6ubuntu0.1, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 4: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 49155.
debug1: Connection established.
debug1: identity file /home/joelmoss/.ssh/id_rsa type -1
debug1: identity file /home/joelmoss/.ssh/id_rsa-cert type -1
debug1: identity file /home/joelmoss/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
NoMethodError
-------------
No resource or method named `mount' for `Chef::Recipe "home_image"'
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/fileserver/recipes/home_image.rb:18:in `from_file'
/var/chef/cache/cookbooks/fileserver/recipes/default.rb:29:in `from_file'
/var/chef/cache/cookbooks/fileserver/recipes/role.rb:12:in `from_file'
@joelmoss
joelmoss / gist:8829439
Last active August 29, 2015 13:56 — forked from philips/gist:7555876

Add a local docker unit file

Create a file called /media/state/units/docker-local.service that has the following contents:

[Unit]
Description=docker local

[Service]
PermissionsStartOnly=true
Last login: Wed Dec 18 17:11:36 on ttys004
~/dev/applicationcraft/codio/chef-repo  ± master ●  ssh sharejs@ec2-184-73-128-49.compute-1.amazonaws.com
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-54-virtual x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Wed Dec 18 17:35:40 UTC 2013
System load: 0.0 Processes: 70
Usage of /: 25.5% of 7.87GB Users logged in: 1
include_recipe 'aws'
# The AWS cookbook requires your AWS access key and secret, so we store these in the `keys/aws`
# encrypted data bag item.
search(:keys, 'id:aws') do |s|
keys = Chef::EncryptedDataBagItem.load('keys', 'aws')
# Mount EBS Raid volumes. See https://github.com/opscode-cookbooks/aws#ebs_raidrb
ebs_raid do
aws_secret_access_key keys['secret_access_key']
@joelmoss
joelmoss / RESULT
Last active December 25, 2015 17:49
resolving cookbooks for run list: ["apt", "build-essential", "chef-client::delete_validation", "chef-client", "mongodb::10gen_repo", "mongodb::replicaset"]
Synchronizing Cookbooks:
- apt
- build-essential
- chef-client
@joelmoss
joelmoss / gist:5889322
Created June 29, 2013 01:44
Build failing with http port min and max
$ packer build -debug packer/packer.json
Debug mode enabled. Builds will not be parallelized.
virtualbox output will be in this color.
==> virtualbox: Downloading VirtualBox guest additions. Progress will be shown periodically.
==> virtualbox: Pausing after run of step 'stepDownloadGuestAdditions'. Press any key to continue.
==> virtualbox: Copying or downloading ISO. Progress will be reported periodically.
==> virtualbox: Pausing after run of step 'stepDownloadISO'. Press any key to continue.
==> virtualbox: Pausing after run of step 'stepPrepareOutputDir'. Press any key to continue.
==> virtualbox: Pausing before cleanup of step 'stepPrepareOutputDir'. Press any key to continue.
@joelmoss
joelmoss / gist:5743190
Last active December 18, 2015 06:59
Codio JS Class proposal

Codio Javascript Class Proposal

While the Codio Client has a simple inheritance system in the form of the core/context plugin, it leaves a little to be desired and is lacking in a few areas that I feel would greatly improve the readability of our code base, as well as providing a little extra functionality.

Javascript has no such thing as Classes, but it has several different ways to fake them. We need a clean and concise way to define and use classes, with the ability for constructors, inheritance and access to overridden methods.

John Resig posted an article a long time ago with his solution for Classes in Javascript. It's simple, but powerful, and is extremely readable, so it will form the basis of this proposal.

The Base Class