Skip to content

Instantly share code, notes, and snippets.

View joelmoss's full-sized avatar

Joel Moss joelmoss

View GitHub Profile
@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
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@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
$ 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
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
HTTP ERROR 500
Problem accessing /ac2.server.core/. Reason:
Error creating bean with name 'jsonDispatcher' defined in URL [file:ac.resources/configs/server-beans.xml]: Cannot resolve reference to bean 'invoker' while setting bean property 'invoker'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'invoker' defined in URL [file:ac.resources/configs/server-beans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonDispatcher' defined in URL [file:ac.resources/configs/server-beans.xml]: Cannot resolve reference to bean 'invoker' while setting bean property 'invoker'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'invoker' defined in URL [file:ac.resources/configs/server-beans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException:
import React from 'react'
import Modal from 'react-modal/lib/index'
Modal.setAppElement(document.getElementById('codio'))
Modal.injectCSS()
export default React.createClass({
displayName: 'ModalConfirm',
propTypes: {
@joelmoss
joelmoss / snippet.rb
Created August 13, 2009 13:51 — forked from fronx/snippet.rb
class Object
# nil if false, else self
def only_if(&block)
self if self.instance_eval(&block)
end
end
puts ''.only_if { length > 0 } || 'previously blank'
# => 'previously blank'
@joelmoss
joelmoss / 9.04.
Created September 5, 2009 13:03 — forked from mrrooijen/9.04.sh
# Author: Michael van Rooijen
# Description:
# A Rails Stack Installer for Ubuntu 8.04/9.04 with the light-weight and fast NginX Web Server.
# This shell script will install a basic Rails Stack with a bunch of useful and commonly used utilities.
# It will install Ruby Enterprise Edition with Phusion Passenger (Reduces Rails Application Memory Usage By Approx. 33%)
# It will install some essential gems like mysql, sqlite, postgres etc.
# It will install NginX Web Server
# It will install the MySQL database
# It will install Git
# It will install these utilities: ImageMagick, FFMpeg, Memcached
@joelmoss
joelmoss / commit-msg
Created September 11, 2009 00:19 — forked from henrik/commit-msg
#!/usr/bin/env ruby
#
# Git commit-msg hook. If your branch name is in the form "t123", automatically
# adds "Refs #123." to commit messages unless they mention "#123" already.
#
# By Henrik Nyh <http://henrik.nyh.se> 2009-09-10 under the MIT License.
#
#
# Install:
#