Skip to content

Instantly share code, notes, and snippets.

View mondalaci's full-sized avatar

László Monda mondalaci

View GitHub Profile
@mondalaci
mondalaci / banshee.crash
Last active October 6, 2015 13:28
Banshee hangs
[Info 19:32:24.678] Running Banshee 2.4.0: [Ubuntu 12.04 LTS (linux-gnu, x86_64) @ 2012-05-06 11:52:27 UTC]
[Info 19:32:26.423] Updating web proxy from GConf
[Info 19:32:27.564] All services are started 2.412434
[Info 19:32:28.966] AmazonMP3 store redirect URL: http://redir.linuxmint.com/mp3amazonstore/
[Info 19:32:29.459] nereid Client Started
[Info 19:32:29.644] GStreamer version 0.10.36.0, gapless: True, replaygain: False
[Info 19:32:29.717] AppleDeviceSource is ignoring unmounted volume 80 GB LVM2 Physical Volume
(Banshee:12878): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
Exception in Gtk# callback delegate
@mondalaci
mondalaci / olcsokutyuk-email-header.txt
Last active December 14, 2015 02:59
olcsókütyük.hu rendelés email fejléc
Delivered-To: laci@monda.hu
Received: by 10.68.25.5 with SMTP id y5csp86210pbf;
Thu, 17 Jan 2013 13:56:23 -0800 (PST)
X-Received: by 10.14.213.134 with SMTP id a6mr18260271eep.45.1358459782700;
Thu, 17 Jan 2013 13:56:22 -0800 (PST)
Return-Path: <dex@plox.tor.hu>
Received: from plox.tor.hu (shell.tor.hu. [188.227.224.97])
by mx.google.com with ESMTPS id l1si5060755een.177.2013.01.17.13.56.20
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Thu, 17 Jan 2013 13:56:21 -0800 (PST)
@mondalaci
mondalaci / smb-vfs-suspend-fail.dmesg
Last active December 14, 2015 03:29
SMB VFS suspend FAIL!
[111619.545110] PM: Syncing filesystems ... done.
[111619.551863] PM: Preparing system for mem sleep
[111619.551884] Freezing user space processes ...
[111639.560284] Freezing of tasks failed after 20.00 seconds (1 tasks refusing to freeze, wq_busy=0):
[111639.560456] mc D ffff88013fc13b00 0 13456 13408 0x00000004
[111639.560460] ffff880004475be8 0000000000000086 ffff880005614560 ffff880004475fd8
[111639.560463] ffff880004475fd8 ffff880004475fd8 ffff880135db5c80 ffff880005614560
[111639.560466] ffff880004475bc8 ffff880005614560 ffff88013fc14398 0000000000000082
[111639.560469] Call Trace:
[111639.560477] [<ffffffff81127260>] ? sleep_on_page+0x20/0x20
@mondalaci
mondalaci / greasemokney-http.js
Created April 3, 2013 19:34
Greasemonkey snippet for automating HTTP requests
function submit_form(method, action, elements, target)
{
var form = document.createElement('form');
document.body.appendChild(form);
form.method = method;
form.action = action;
for (element_i in elements) {
var element = document.createElement('input');
element.setAttribute('type', 'hidden');
element.setAttribute('name', element_i);
@mondalaci
mondalaci / static-zero-configuration-versioned-caching.nginx
Created April 3, 2013 21:34
Nginx configuration fragment for caching server-side resources forever through a versioned URL scheme.
rewrite ^/static/[^/]+/(.*)$ /$1 last;
location ^~ /static/ {
expires max;
}
@mondalaci
mondalaci / mov2mp4
Last active November 2, 2016 19:55
Convert mov to mp4.
#!/bin/bash
if [[ "$#" -ne "1" ]]; then
echo "Usage: $0 input.mov"
exit
fi
input_mov=$1
output_mp4=${input_mov:0:$((${#input_mov}-4))}.mp4
melt $input_mov -profile hdv_720_30p -consumer avformat:$output_mp4 acodec=libmp3lame ab=128k ar=44100 vcodec=libmpeg4 b=6000k &&
@mondalaci
mondalaci / timestamper.php
Created April 3, 2013 21:54
Prepend datestamps to lines coming from stdin
#!/usr/bin/env php5
<?php
# It's a dead-simple utility that prefixes lines with the current timestamp.
# With Bash it's supposed to be used something like this:
# yourcommand | timestamper | tee whatever.log
while (!feof(STDIN)) {
$line = trim(fgets(STDIN));
print strftime('%Y-%m-%d %H:%M:%S ') . "$line\n";
@mondalaci
mondalaci / proxy-and-extend-google-reader-feed.php
Created April 3, 2013 22:06
Proxy my Google Reader feed and add a link element to it so that the WordPress RSS widget can display a relevant header.
<?php
$shared_items_feed_url = 'http://www.google.com/reader/public/atom/user/04674577121720532529/state/com.google/broadcast';
$shared_items_page_url = 'http://www.google.com/reader/shared/mondalaci';
$source_atom_feed = file_get_contents($shared_items_feed_url);
$insert_pos = strpos($source_atom_feed, '<generator ');
$link_element = "<link href=\"$shared_items_page_url\" />";
$linked_atom_feed = substr($source_atom_feed, 0, $insert_pos) . $link_element . substr($source_atom_feed, $insert_pos);
print $linked_atom_feed;
@mondalaci
mondalaci / openvpn-on-openwrt.sh
Created April 4, 2013 00:54
OpenVPN configuration on OpenWrt
cat >> /etc/firewall << END
iptables -t filter -A input_wan -p udp --dport 1194 -j ACCEPT
iptables -I INPUT 1 -i tun+ -j ACCEPT
iptables -I FORWARD 1 -i tun+ -j ACCEPT
iptables -I OUTPUT 1 -o tun+ -j ACCEPT
iptables -I FORWARD 1 -o tun+ -j ACCEPT
END
/etc/init.d/firewall restart
@mondalaci
mondalaci / postfix-through-gmail.sh
Created April 4, 2013 00:59
SMTP relaying with Postfix through GMail
cat << END >> /etc/postfix/main.cf
smtp_sasl_auth_enable = yes
smtp_use_tls = yes
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
relayhost = smtp.gmail.com
END
echo "smtp.gmail.com youraccount@gmail.com:yourpassword" >> /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd