Skip to content

Instantly share code, notes, and snippets.

View munen's full-sized avatar

Zen Monk Alain M. Lafon munen

View GitHub Profile
@munen
munen / mac
Created May 2, 2014 18:30
messages mac
POST http://voicerepublic-staging.sky.ungleich.ch/open/1 net::ERR_INTERNET_DISCONNECTED voicerepublic-staging.sky.ungleich.ch/open/1:1
Flash: NetConnection.Connect.Failed on stream t2268-u9 in state live at Fri May 02 2014 20:29:25 GMT+0200 (CEST) livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
[Blackbox]: Publishing mic to t2268-u6 livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
subscriptions: t2268-u9, t2268-u88 livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
[Blackbox]: Subcribe to stream: t2268-u88 livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
2
The page at 'https://staging.voicerepublic.com/venues/1/talks/2268' was loaded over HTTPS, but displayed insecure content from 'http://voicerepublic-staging.sky.ungleich.ch/fcs/ident2': this content should also be loaded over HTTPS.
2268:1
POST http://voicerepublic-staging.sky.ungleich.ch/fcs/ident2 net::ERR_INTERNET_DISCONNECTED voicerepublic-staging.sky.ungleich.ch/fcs/ident2:1
The page at 'https://staging.voicerepublic.com/venues/1/talks/2268' wa
@munen
munen / linux
Created May 2, 2014 18:30
flash messages linux
Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) 2268:1
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. application-4e82b8d1c050c31c3a4333aca885071c.js:5375
Loading Faye client... livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
Initializing BlackboxService... livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
Embed SWF on #flashContent livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
Push subscribing to Faye channel '/t2268/public' onto promise chain. livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
Faye client loaded. Instanciating Faye client... livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
Instanciated Faye client. livepage-b3c16f0ccd44b6512b6d23737b24204d.js:10007
Subscribing to Faye channel /t2268/public... live
@munen
munen / gist:09875847835ddce2d5a0
Created April 29, 2014 20:37
encode wav failure
CmdRunner> sox -V1 106-untrimmed.wav 106.wav trim 550312 =552415
Next strategy: m4a
***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
CmdRunner> avconv -v quiet -y -i 106.wav -b:a 64k -strict experimental 106.m4a
Error running strategy Audio::Strategy::M4a: postconditions not met for Audio::Strategy::M4a in /home/app/app/shared/recordings: 106.m4a
Next strategy: mp3
***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
@munen
munen / gist:8972845
Created February 13, 2014 10:24
WP search placeholder
searchField = jQuery("#s");
if (window.location.pathname.substr(0,3) == '/en') {
searchField.prop("placeholder", "Search");
} else {
searchField.prop("placeholder", "Suche");
}
@munen
munen / .Xmodmap
Created February 5, 2014 20:59
Make Apple CMD/Command key an additional CTRL/Control key in X11
! clear CMD of it's regular task, whatever that might be
clear mod4
! configure CTRL and CMD to act as left Control
keycode 133 = Control_L NoSymbol Control_L
keycode 37 = Control_L NoSymbol Control_L
! use CTRL and CMD to act as left Control
add control = Control_L
// By default Datatables uses the sType 'html' for its cells and sorting.
// Therefore the sort mechanism for this sType is overwritten here as seen here:
// http://datatables.net/development/sorting#type_based
din5007Relacement = function(x) {
x = x.replace("ä", "a");
x = x.replace("ö", "o");
x = x.replace("ü", "u");
x = x.replace("ß", "ss");
return x;
@munen
munen / FindTranslation.vim
Last active December 22, 2015 01:59
Vimscript / Ruby function to find a key in a nested yaml key/value pair (i.e. a Rails translation)
function! FindTranslation(pat)
let s = ""
ruby << EOF
pat = VIM::evaluate 'a:pat'
pat = pat.gsub("\.", ":\\\\\\n\ *")
s = "normal! gg/#{pat}/e+1\\<cr>"
VIM::command "let s = \"#{s}\""
VIM::command "execute s"
EOF
endfunction
# -*- coding: utf-8 -*-
from flask import Flask
from flask.helpers import url_for
from flask import request
import json
import re
app = Flask(__name__)
# helper method to extract parameters. reqest to api has the following format:
@munen
munen / hange_remote_origin.sh
Created March 9, 2013 12:31
Change github username from 'preek' to 'munen' in repository
echo "Showing old remote origin"
git remote -v
echo "--------"
NEW_REMOTE=$(git remote -v | head -n1 | awk '{print $2}' | sed -e 's/preek/munen/')
git remote set-url origin $NEW_REMOTE
if (( $? ));
then echo "failed to set new remote, please adjust manually";
else echo "succeeded in setting new remote";
fi
echo "--------"