Skip to content

Instantly share code, notes, and snippets.

View JeanMertz's full-sized avatar

Jean Mertz JeanMertz

View GitHub Profile
@JeanMertz
JeanMertz / 1-osx-wualafs-background.md
Last active August 29, 2015 14:12
OS X WualaFS running in the background

Use Wuala.app on OS X in the background:

  • Download & extract Wuala scripts

    $ mkdir -p /usr/local/share
    $ curl https://cdn.wuala.com/repo/other/wuala.tar.gz | tar -xz -C /usr/local/share
  • Download & load LaunchAgent script

@JeanMertz
JeanMertz / d
Last active August 29, 2015 14:11
/opt/bin/d - docker management script for CoreOS/systemd
#!/usr/bin/env bash
command -v systemd-cat &>/dev/null && exec 2> >(systemd-cat -t d)
source /etc/environment
run() {
shift
$docker run --cidfile "$pid_file" $@
}
#!/bin/bash
source /etc/environment
name=$(cat /etc/machine-id)
if [ ! -f /opt/consul ]; then
mkdir /opt
mkdir /var/lib/consul
wget https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip
unzip 0.4.1_linux_amd64.zip
require 'formula'
class Fish < Formula
homepage 'http://fishshell.com'
head 'https://github.com/fish-shell/fish-shell.git',
:revision => '3cbace98a76ba35af88f0a9234a7c6ebad10d68c'
depends_on 'autoconf'
depends_on 'doxygen' => :build
#!/bin/bash
#
# This file is managed by Chef, using the <%= node.name %> cookbook.
# Editing this file by hand is highly discouraged!
#
# Copyright (c) 2014 Jean Mertz <jean@mertz.fm>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@JeanMertz
JeanMertz / full_log
Last active January 6, 2016 07:43
Chef not finding template file
$ vagrant up --provider=aws
Bringing machine 'ubuntu' up with 'aws' provider...
[Berkshelf] This version of the Berkshelf plugin has not been fully tested on this version of Vagrant.
[Berkshelf] You should check for a newer version of vagrant-berkshelf.
[Berkshelf] If you encounter any errors with this version, please report them at https://github.com/RiotGames/vagrant-berkshelf/issues
[Berkshelf] You can also join the discussion in #berkshelf on Freenode.
[Berkshelf] Updating Vagrant's berkshelf: '/Users/Jean/.berkshelf/ubuntu/vagrant/berkshelf-20131112-14525-13uyllm-ubuntu'
[Berkshelf] Using node-kabisa-chef-server (0.1.0)
[Berkshelf] Using kabisa-base (1.0.0) at '../../cookbooks/kabisa-base'
@JeanMertz
JeanMertz / working-lxc-start.sh
Last active December 16, 2015 07:58
lxc working container
root@ip-10-238-62-148:~# lxc-start -n worker
<4>init: udev-fallback-graphics main process (51) terminated with status 1
cloud-init-container: emitted ifup for eth0
<4>init: console-font main process (72) terminated with status 1
<4>init: setvtrgb main process (94) terminated with status 1
<4>init: console-setup main process (97) terminated with status 1
mountall: Disconnected from Plymouth
<4>init: plymouth main process (5) killed by ABRT signal
<4>init: plymouth-splash main process (85) terminated with status 2
<30>udevd[111]: starting version 175
function p
cd ~/Projecten/$argv
end
function cs
echo (set_color red) '== SHORTCUTS =='
echo (set_color green) 'Ctrl-F\t' \t (set_color 999) 'command completion (instead of arrow-right)'
end
function dotfiles
require 'formula'
class WkhtmltopdfQt < Formula
# This is the latest staging branch commit, dated 6 JAN 2012.
url 'https://qt.gitorious.org/qt/wkhtmltopdf-qt/archive-tarball/6053b687d24956d0a7eac21a015172b29cf0f451'
sha1 '3a48649a2082ced3153bd2841d1e8a94a5e74a4f'
version '6053b68'
end
class Wkhtmltopdf < Formula
@JeanMertz
JeanMertz / chruby.sh
Last active September 9, 2020 21:03
Snippets for article "debian + chruby + postgres + nginx + unicorn + rails and friends…"
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
chruby 2 &>/dev/null
if [ "$?" -eq "1" ]
then
chruby 1 &>/dev/null
fi