Skip to content

Instantly share code, notes, and snippets.

View phaus's full-sized avatar
🦓

Philipp Haussleiter phaus

🦓
View GitHub Profile
@phaus
phaus / gist:3313756
Created August 10, 2012 11:52
Patching SAVON to work with pk12 Certs
# Here is the patching to make the savon gem (https://github.com/rubiii/savon) work with pk12 certs
# if i found the time, i will create a patch and make a pull request :-)
module HTTPI
module Auth
# = HTTPI::Auth::SSL
#
# Provides SSL client authentication.
class SSL
@pkcs12
@phaus
phaus / bundle.js
Created February 10, 2020 14:23
resulting dist/bundle.js
(function () {
'use strict';
let BLANKS = [undefined, null, false];
function simpleLog(type, msg) {
console.log(`[${type}] ${msg}`); // eslint-disable-line no-console
} // returns a function that invokes `callback` only after having itself been
// invoked `total` times
function awaitAll(total, callback) {
@phaus
phaus / dalmatinerfe.log
Created July 17, 2018 23:30
dalmatinerfe errors
==> /data/dalmatinerfe/log/console.log <==
2018-07-17 23:29:23.562 [info] <0.659.0> Application lager started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.568 [info] <0.659.0> Application cowboy started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.568 [info] <0.659.0> Application epgsql started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.569 [info] <0.659.0> Application dflow started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.579 [info] <0.659.0> Application ddb_connection started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.590 [info] <0.659.0> Application pgapp started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.590 [info] <0.659.0> Application dqe_idx_ddb started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.591 [info] <0.659.0> Application dqe_fun started on node 'dalmatinerfe@192.168.168.233'
2018-07-17 23:29:23.591 [info] <0.659.0> Application sqlmig started on node 'dalmatinerfe@192.168.168.233'
@phaus
phaus / checkGC.sh
Last active September 27, 2016 12:02
check for OBJC_IMAGE_SUPPORTS_GC macOS Sierra compatibility
#!/bin/bash
checkFile(){
FILE=$1
OTOOL=`which otool`
TAIL=`which tail`
IFS='/' read -ra ADDR <<< "$FILE"
unset APP
for i in "${ADDR[@]}"; do
if [[ ! "${i-}" = $'\n' ]]; then
@phaus
phaus / openldap.json
Last active June 13, 2016 20:16
that zone worked
{
"alias": "ldap",
"hostname": "ldap",
"brand": "lx",
"kernel_version": "3.10.0",
"cpu_shares": 20,
"max_physical_memory": 512,
"quota": 5,
"image_uuid": "07b33b7a-27a3-11e6-816f-df7d94eea009",
"resolvers": [
@phaus
phaus / gitlab.json
Created June 13, 2016 20:12
failed to login after zone setup
{
"alias": "gitlab",
"hostname": "gitlab",
"brand": "lx",
"kernel_version": "3.10.0",
"max_physical_memory": 1024,
"cpu_shares": 40,
"quota": 64,
"image_uuid": "07b33b7a-27a3-11e6-816f-df7d94eea009",
"resolvers": [
@phaus
phaus / Vagrantfile
Last active February 14, 2016 14:41
DVD Indexer
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = "dvdindex"
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "dvdindex"
@phaus
phaus / 2fact.js
Last active January 21, 2016 10:23
run a Docker Container on SmartOS
{
"alias": "2fact",
"brand": "lx",
"kernel_version": "3.13.0",
"docker": true,
"cpu_shares": 1000,
"zfs_io_priority": 1000,
"max_physical_memory": 1024,
"quota": 10,
"nowait": true,
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "9"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsisas1068"
memsize = "2048"
mem.hotadd = "TRUE"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Virtuelle Festplatte.vmdk"
ide1:0.present = "TRUE"
@phaus
phaus / output
Created November 8, 2013 23:18
Reading Binary Files with node.js
$ ./readMul.sh
size: 3072, maxID: 256
[ 813, 9, 15 ]
Alchemy 0
[ 1408, 9, 13 ]
Anatomy 0
[ 1395, 13, 13 ]
Animal Lore 0
[ 1372, 21, 13 ]
Item Identification 0