Skip to content

Instantly share code, notes, and snippets.

View johnhamelink's full-sized avatar
🔨
Building

John Hamelink johnhamelink

🔨
Building
View GitHub Profile
# the key you get from http://www.hitbox.tv/settings/youruser/livestreams
HITBOX_KEY="youruser?key=xxxxx"
# top-left corner of capture window
CAPTURE_POS="250,200"
# width/height of capture window
CAPTURE_SIZE="1050x600"
# Audio bitrate
BITRATE="128k"
# Ensure pulseaudio has the loopback module enabled
@johnhamelink
johnhamelink / git-pre-push-hook-install.sh
Last active January 29, 2021 08:13 — forked from ssaunier/git-pre-push-hook-install.sh
Made the echo command output colour on a Linux terminal, removed karma and added a crunchbang
cd /path/to/your/repo
curl https://gist.githubusercontent.com/johnhamelink/577b8613ae82d2b3037b/raw/ad71fb72a1b86ee9a90ac62eccc4a55367578625/pre-push.sh > .git/hooks/pre-push
chmod u+x .git/hooks/pre-push
No route matches {:controller=>"users/cms", :action=>"neighbourhood_attractions_destroy"}
- <td><%= link_to 'Destroy', cms_neighbourhood_attractions_delete_path(:id => attraction.id), method: :delete, data: { confirm: 'Are you sure?' } %></td>
-------------------------------
routes.rb:
delete "admin/neighbourhood_attractions/delete/:id" => "users/cms#neighbourhood_attractions_destroy", :as => :cms_neighbourhood_attractions_delete
----------------------------------
@johnhamelink
johnhamelink / bootstrap.js
Created May 7, 2011 17:30 — forked from kof/bootstrap.js
bootstrap file for mongoose models
var fs = require('fs'),
m = require('mongoose');
fs.readdirSync(__dirname).forEach(function(filename) {
var schemaName = filename.replace(/\.js$/, ''),
Schema = require('./' + schemaName);
m.model(schemaName, Schema);
});