Skip to content

Instantly share code, notes, and snippets.

View pstadler's full-sized avatar

Patrick Stadler pstadler

View GitHub Profile
### Keybase proof
I hereby claim:
* I am pstadler on github.
* I am ps (https://keybase.io/ps) on keybase.
* I have a public key whose fingerprint is 6DDF F549 C7E4 555F FDC1 F6FA 31DB BB1F 6949 DA68
To claim this, I am signing this object:
pstadler@Daedalus ~/GitHub/candy-node (nodester) » nodester app logs candy
nodester info Showing logs for: candy
New PID: 26749
chroot_runner
chroot_runner
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
// Note: e459fbe is not using submodules and listening on the correct port
pstadler@Daedalus ~/GitHub/candy-node (nodester) » git push nodester nodester:master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 285 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Syncing repo with chroot
remote: From /node/git/pstadler/3619-98032a8fe1c930289895a23f543c29c1
@pstadler
pstadler / plex-recently-added.sh
Last active October 11, 2015 11:08
Geektool: Plex Media Server - show 10 recently added movies
#!/bin/bash
curl --ipv4 --silent "http://localhost:32400/library/sections/1/recentlyAdded?X-Plex-Container-Start=0&X-Plex-Container-Size=10" | grep -o 'title="\([^"]*\)"' | sed -e 's/title="//' -e 's/"//' | perl -MHTML::Entities -ne 'print decode_entities($_)'
@pstadler
pstadler / ej.sh
Created October 19, 2012 13:03
ejabberd control script
function ej {
EJABBERD_HOME=/usr/local/ejabberd-commercial
EJABBERD_CTL=$EJABBERD_HOME/sbin/ejabberdctl
case "$1" in
restart)
$EJABBERD_CTL stop && $EJABBERD_CTL stopped; $EJABBERD_CTL start
;;
reload)
$EJABBERD_CTL update $2
@pstadler
pstadler / guacamole.md
Created October 31, 2013 08:53
Guatemalan Guacamole

Guatemalan Guacamole

by @AlexRRR

{
  "Ingredients": {
  	"Notes": "For about 4",
  	"Avocados": 4,
 "Lime": 1,
# Autocompletion for homebrew-cask.
#
# This script intercepts calls to the brew plugin and adds autocompletion
# for the cask subcommand.
#
# Author: https://github.com/pstadler
compdef _brew-cask brew
_brew-cask()
@pstadler
pstadler / bosh-proxy.go
Created January 5, 2014 14:58
Simple BOSH proxy written in Go
// Simple BOSH proxy written in Go
//
// See: https://github.com/pstadler/candy-go
package main
import (
"fmt"
"io"
"net/http"
@pstadler
pstadler / geocoder.js
Last active March 14, 2016 16:07
Simple on-demand lazy loader for the Google Maps Geocoding service
/**
* Geocoder is a simple on-demand lazy loader for the Google Maps Geocoding service
*
* Usage: `Geocoder.call(function (geocoder) {});`
*/
var Geocoder = (function (self) {
var _geocoder = null;
self.call = function (cb) {
// available
@pstadler
pstadler / pow-and-apache.md
Last active November 16, 2016 19:39
Running Pow and Apache

Running Pow and Apache

Pow is a tool for mapping your web apps and their ports to a .dev domain locally. This guide shows how to setup Pow to run alongside Apache.

# Setup user home (http://localhost/~USERNAME/)
echo "<Directory \"/Users/$USER/Sites/\">
  Options Indexes MultiViews FollowSymLinks
  AllowOverride All
 Order allow,deny