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 / .Xmodmap
Created February 5, 2014 20:59
Make Apple CMD/Command key an additional CTRL/Control key in X11
View .Xmodmap
! 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
@munen
munen / gist:8972845
Created February 13, 2014 10:24
WP search placeholder
View gist:8972845
searchField = jQuery("#s");
if (window.location.pathname.substr(0,3) == '/en') {
searchField.prop("placeholder", "Search");
} else {
searchField.prop("placeholder", "Suche");
}
@munen
munen / gist:09875847835ddce2d5a0
Created April 29, 2014 20:37
encode wav failure
View gist:09875847835ddce2d5a0
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 / linux
Created May 2, 2014 18:30
flash messages linux
View 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 / mac
Created May 2, 2014 18:30
messages mac
View 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
View gist:12dfa90d603aa868ea18
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 / clear_domains
Created December 14, 2014 13:50
Permutate a list of keywords and find free domains
View clear_domains
lom-atelier
lom
malort
maltherapie
mal-therapie
kunsttherapie
kunst-therapie
begleitetes-malen
malatelier
mal-atelier
@munen
munen / nop_battle_entry.clj
Created December 16, 2010 13:33
My 'nop' battle entry
View nop_battle_entry.clj
(comment
"We were doing a 'nop' battle in IRC today. First it was manual typing of 'nop's,
but quickly we got certain scripts running.
Learning clojure, I thought I could come over the top easily. And I did. I
defined a lazy cycling sequence containing 'nop', then I tried to get the last
entry of that list.
Unfortunately this didn't just burn my CPU (as I expected), but it also allocated
so much memory in seconds, that my X got shutdown by kernel.
@munen
munen / memcpy_demo
Created February 14, 2011 13:26
memcpy demo
View memcpy_demo
#include <stdio.h>
int main() {
char source[] = "Foobar123";
char * target;
target = (char *) malloc(sizeof(source));
memcpy (target, source+1, sizeof(source));
// prints: "oobar123"
@munen
munen / compress_image.sh
Created May 1, 2011 19:45
Script for compressing images. Saves me about 25-30% of space with no visible difference. Measured on pictures from my 10MP camera.
View compress_image.sh
#!/bin/bash
# Script for compressing images. Saves me about 17% of space with no visible
# difference. Measured on > 250 pictures from my 10MP camera.
for image in "$@"
do
# Make exif tag in jpg - set's the file's creation date.
jhead -mkexif $image
convert -resize 80% -quality 85 $image $image