Skip to content

Instantly share code, notes, and snippets.

@andruby
andruby / gist:7869992
Created December 9, 2013 10:07
iTerm 2 (1.00.20131124) crash log in OS X 10.9 (13A603) Even after downloading again
Process: iTerm [73050]
Path: /Applications/iTerm.app/Contents/MacOS/iTerm
Identifier: com.googlecode.iterm2
Version: ???
Code Type: X86-64 (Native)
Parent Process: launchd [249]
Responsible: iTerm [73050]
User ID: 501
Date/Time: 2013-12-09 11:04:57.560 +0100
@andruby
andruby / post-receive.sh
Created January 11, 2014 11:00
post receive git hook that runs post_receive.rb if it exists in the repository
#!/bin/bash
# Shell script that should be installed on the origin server as post-receive hook
export GIT_SOURCE=$PWD
# Extract args and set environment variables for each ref pushed
while read oldrev newrev ref
do
export BEFORE=$oldrev
@andruby
andruby / ruby.rb
Created June 27, 2014 09:44
Chef recipe to install ruby from Brightbox mirror
# Install a recent version of the ruby interpreter from ppa:brightbox
include_recipe "apt"
include_recipe "build-essential"
# Add the brightbox ppa
apt_repository 'brightbox' do
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
distribution node['lsb']['codename']
components ['main']
@andruby
andruby / encfs-agent.py
Last active August 29, 2015 14:04 — forked from mprymek/encfs-agent
#! /usr/bin/env python2
"""
encfs-agent
Mounts encfs filesystems with passwords generated using private keys stored in ssh-agent.
You can have any number of encrypted filesystems ("vaults") under VAULTS_DIR. Password for
each of them is derived from its name and given private key stored in ssh-agent.
You can use ssh-askpass for ssh-agent if you want.
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
diff --git a/web/gate/package.json b/web/gate/package.json
index e3dc156..04cb424 100644
--- a/web/gate/package.json
+++ b/web/gate/package.json
@@ -36,5 +36,8 @@
"express": "^4.8.5",
"glob": "^4.0.5",
"rails-csrf": "git+https://github.com/andruby/rails-csrf.git#fix-promise"
+ },
+ "dependencies": {
@andruby
andruby / cloud-config.yml
Last active November 3, 2016 02:16
Cloud init for a Discourse instance running on Ubuntu 14.04 on Digital Ocean
#cloud-config
apt_upgrade: true
packages:
- zsh
- docker
- vim
users:
- name: andrew
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDElTSlnjEpU91nk4HKluGCzEXwkWE2XzdXqdmU9HJA+i5zP5UHnd7AtWmcO6OG6DbY2cUpdWE/l82dqYWxwhG0811hRsErz/DMesK2Hn22Dh97K9RAH7+e1s0eh7LkrNv0F5zgvNd1YaDQo5Lu9LMws+nhQeS8+MJ7YwluRhA8Xlbz7/eqKyPeuRTTjOT2Bz17aqXSet3Uqjs51n322I9FPQR369v+jNdb62JXpfTQVxacM59kOd5yOtYQnTRRTnZhJpFocnO0fPBpXjVjKqJM1AdHnaIgoux8LU2bVEZmzWnPxwGbOjjvxWurEyFfXbvUkYoRQWeau+sONbwMsftP andrew@bedesign.be
@andruby
andruby / clone-web-venture.diff
Last active August 29, 2015 14:20
diff -bur onegame/web/venture onegame-2/web/venture
diff -bur ./app/adapters/session.js ../../../onegame-2/web/venture/app/adapters/session.js
--- ./app/adapters/session.js 2015-05-08 09:50:25.000000000 +0200
+++ ../../../onegame-2/web/venture/app/adapters/session.js 2015-05-08 09:36:43.000000000 +0200
@@ -1,4 +1,5 @@
-import Adapter from './application';
+import Adapter from 'basegame/adapters/application';
export default Adapter.extend({
namespace: 'api',
});
+
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andruby
andruby / schedule.rb
Created June 30, 2016 09:01
Sidekiq pusher
job_type :sidekiq, 'cd :path && bundle exec script/sidekiq_pusher.rb :worker :task'
every 1.hour do
sidekiq "job_name", worker: 'WorkerName'
end