Skip to content

Instantly share code, notes, and snippets.

View claco's full-sized avatar
:octocat:
I may be slow to respond.

Chris Laco claco

:octocat:
I may be slow to respond.
View GitHub Profile
FROM debian:wheezy
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && \
apt-get upgrade -y && \
apt-get autoclean
@claco
claco / keybase.md
Created March 25, 2014 14:47
keybase.md

Keybase proof

I hereby claim:

  • I am claco on github.
  • I am claco (https://keybase.io/claco) on keybase.
  • I have a public key whose fingerprint is D4B5 9C03 E9E2 960F 3118 8168 8286 F09D FEC8 72AD

To claim this, I am signing this object:

@claco
claco / api.rb
Created January 13, 2014 23:05
require 'uri'
class ::Chef::Recipe
include ::Openstack
end
{
"name": "development",
"description": "",
"cookbook_versions": {
"apache2": "= 1.6.7",
"apt": "= 2.0.1",
"aws": "= 0.101.3",
"build-essential": "= 1.4.1",
"ceilometer": "= 0.0.1",
"cinder": "= 0.0.10",
@claco
claco / gist:5912133
Last active December 19, 2015 06:29
# Attributes
default["some"]["thing"] = "foop"
# Recipe
# This prints the value
Chef::Log.warn node["some"]["thing"]
template "farp" do
source "farp.erb"
variables(
GIT
remote: git://github.com/opscode/test-kitchen.git
revision: bf17d76df4c63bb58f70dd32ce0deb1b09b9df8d
branch: 1.0
specs:
test-kitchen (1.0.0.dev)
celluloid
mixlib-shellout
net-scp
net-ssh
@claco
claco / gist:3660445
Created September 6, 2012 21:19
Quick test running for test unit/rspec sans all the other plugins hupla.. current test under cursor, current file, current suite; puts errors in QuickFix. Uses m instead of testrb for test unit line support.
autocmd BufNewFile,BufRead *_test.rb setlocal makeprg=m errorformat=%A%>\ \ %n)\ Failure:,%C%m\ [%f:%l]:,%Z
autocmd BufNewFile,BufRead *_test.rb setlocal makeprg=m errorformat+=%A%>\ \ %n)\ Error:,%C%.%#:,%C%m\ for\ #<%.%#>,%Z\ \ \ \ %f:%l:in\ \`%.%#\',%-G%.%#
"autocmd BufNewFile,BufRead *_spec.rb setlocal makeprg=rspec errorformat=rspec\ %f:%l\ #\ %m,%-G%.%#
autocmd BufNewFile,BufRead *_spec.rb setlocal makeprg=rspec errorformat=%A%>\ \ %n)%.%#,%C%>\ \ \ \ \ Failure/Error:%.%#,%C\ \ \ \ \ %m:,%C\ \ \ \ \ \ \ ,%C\ \ \ \ \ \ \ %m,%C\ \ \ \ \ #\ %f:%l:in%.%#,%Z,%-G%.%#
function! RunMake(...)
if a:0 == 1
echo "Running " . &makeprg . " " . a:1 . "..."
silent exec "make! " . a:1
@claco
claco / gist:1888612
Created February 23, 2012 00:17
Pomodoro on Alfred
on alfred_script(q)
tell application "Pomodoro"
if q is equal to "reset" then
reset
else if q is equal to "resume" then
resume
else if q is equal to "complete" then
force completion
else if q is equal to "external" then
@claco
claco / database.yml.example mysql2
Created February 18, 2012 17:31 — forked from erichurst/database.yml.example mysql2
Rails 3 database.yml examples
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
desc 'Install MacVim'
task :macvim do
system 'git clone git://github.com/b4winckler/macvim.git ~/Downloads/macvim'
system 'cd ~/Downloads/macvim && git pull'
system 'cd ~/Downloads/macvim && make clean'
system 'cd ~/Downloads/macvim && ./configure --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-cscope --with-tlib=ncurses --enable-multibyte'
system 'cd ~/Downloads/macvim && make'
system 'rm -rf /Applications/MacVim.app'
system 'cd ~/Downloads/macvim && cp -R ~/Downloads/macvim/src/MacVim/build/Release/MacVim.app /Applications'
system 'cd ~/Downloads/macvim && cp ~/Downloads/macvim/src/MacVim/mvim /usr/local/bin'