Skip to content

Instantly share code, notes, and snippets.

@pboehm
pboehm / lg.conf
Last active April 9, 2018 08:24
Lirc configuration for my Logitech sound system and LG TV
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(usb_irtoy) on Fri Jul 24 16:29:16 2015
#
# contributed by
#
# brand: LG TV
# model no. of remote control:
@pboehm
pboehm / gist:fae14346f03132ef2ba6
Created February 16, 2015 09:23
Fix IntelliJ scrolling flicker on OSX 10.10
defaults write com.jetbrains.intellij AppleShowScrollBars -string Always
$ git diff module/plugins/hooks/ExtractArchive.py
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index ddec831..8b8041f 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -254,7 +254,7 @@ class ExtractArchive(Hook):
success = False
if not plugin.checkArchive():
- plugin.extract(progress, pw)
javascript:(function(e){e.setAttribute("src","http://192.168.11.234:8888/target/target-script-min.js#anonymous");document.getElementsByTagName("body")[0].appendChild(e);})(document.createElement("script"));void(0);
@pboehm
pboehm / gist:66c8bd0c1f029e2ffee5
Created October 6, 2014 10:43
Streaming von Pulseaudio über VLC
# get the audio device
$ pacmd list-sources | awk '/name:.+\.monitor/'
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor>
name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
$ cvlc pulse://alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor --sout '#transcode{acodec=mpga,ab=392,channels=2}:standard{access=http,dst=0.0.0.0:8080/pc.mp3}'
# stream is now available under 0.0.0.0:8080/pc.mp3
@pboehm
pboehm / flickr
Last active August 29, 2015 14:06
Flickr downloader using flickrit
# run 8 wgets downloading one link at a time
curl http://flickrit.pboehm.org/photos/phboehm | \
python -c 'import json, sys; data = json.loads(sys.stdin.read()); links = [e["url_o"] for e in data ]; print "\n".join(links)' | \
xargs -n 1 -P 8 wget
# using jq
curl http://flickrit.pboehm.org/photos/phboehm | jq ".[] .url_o" | xargs -n1 -P 8 wget
@pboehm
pboehm / gist:11099324
Last active August 29, 2015 14:00
Performance improvements in django-data-migration 0.2.0
This includes some small benchmark results for the preformance improvements introduced in
django-data-migration 0.20. The migrations are from the blog-testapp which is included in
the repo, only updated to use real data.
############# FOR AUTHOR, COMMENTS
# WITHOUT PREFETCH
» time ./manage.py migrate_this_shit
Migrating <class 'blog.data_migration_spec.AuthorMigration'>
Migrating element 2961/2961
@pboehm
pboehm / flickr-photos
Created January 24, 2014 21:07
Loads the last photos from your public Flickr Timeline ... Replace the id in the API Url with your own ID.
<style type="text/css" media="all">
.flickr_image_container {
margin-bottom: 30px;
position: relative;
}
.flickr_image_container img {
position: relative;
left:0;
@pboehm
pboehm / .gitignore
Last active December 29, 2015 17:19
*.swp