This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rewrite ^/static/[^/]+/(.*)$ /$1 last; | |
location ^~ /static/ { | |
expires max; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script makes Konsole tab names always reflect the hostname of the current host. | |
# | |
# You're supposed to rename this script as "ssh" and put it into a | |
# directory that precedes /usr/bin in your $PATH, like /usr/local/bin | |
if [ "x$KONSOLE_DCOP_SESSION" = "x" ]; then | |
exec ssh $* | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 HOSTNAME NOTIFICATION-SCRIPT-URL" | |
echo "Ping HOSTNAME and if it's down then WOL it and send a notification mail to the admin." | |
echo "NOTIFICATION-SCRIPT-URL?host=HOSTNAME will be fetched to send the actual mail." | |
echo "Example: $0 mybox http://mydomain.com/notifyme.php" | |
exit | |
fi | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$accepted_languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); | |
$primary_language = $accepted_languages[0]; | |
if ($pos=strpos($primary_language, ';') !== false) { | |
$primary_language = substr($primary_language, 0, $pos+1); // Throw away quality value. | |
} | |
if ($pos=strpos($primary_language, '-') !== false) { | |
$primary_language = substr($primary_language, 0, $pos+1); // Throw away dialect. | |
} |