Skip to content

Instantly share code, notes, and snippets.

ip6_gw=beef:fac3::1
ip6_vhost=beef:fac3::2
irc_ports=6667:6669
interface=eth0
echo 1 irc6 >> /etc/iproute2/rt_tables
ip -f inet6 route add default via $ip6_gw table irc6 dev $interface src $ip6_vhost
ip -f inet6 rule add fwmark 1 table irc6
ip6tables -t mangle -I OUTPUT -o $interface -p tcp --dport $irc_ports --syn -j MARK --set-mark 1
$ tx push -s
Pushing translations for resource quassel.master:
Pushing source file (po/quassel.pot)
Resource does not exist. Creating...
Cannot get type for resource. Please, add it in the .tx/config file.
TypeError: cannot concatenate 'str' and 'NoneType' objects
$ cat .tx/config
[main]
host = https://www.transifex.net
// ==UserScript==
// @match https://*/sgdadmin/*
// ==/UserScript==
var a = document.all;
for (var i = 0; i < a.length; i++) {
var e = a[i];
if(e.id.match("Form:")) {
e.hidden = false;
}
$ git reset --hard; echo ===; git diff; echo ===; tx pull -l de -f; echo ===; git diff
HEAD is now at c83924a fix plurals in some translations and a typo in ChannelListDlg
===
===
Pulling translations for resource quassel.master (source: po/quassel.pot)
-> de: po/de.po
Done.
===
diff --git a/po/de.po b/po/de.po
index a1024a0..2614b51 100644
$ /usr/bin/lconvert -i cs.po -of ts -o /usr/src/quassel-build/po/cs.ts; echo $?
0
$ /usr/bin/lconvert -i ./cs.po -of ts -o /usr/src/quassel-build/po/cs.ts; echo $?
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
0
$ /usr/bin/lconvert -i $PWD/cs.po -of ts -o /usr/src/quassel-build/po/cs.ts; echo $?
Removed plural forms as the target language has less forms.
$ tx push -t
Pushing translations for resource quassel.master:
Pushing 'el' translations (file: po/el.po)
Pushing 'fr' translations (file: po/fr.po)
Pushing 'pt_BR' translations (file: po/pt_BR.po)
Pushing 'tr' translations (file: po/tr.po)
Skipping 'de' translation (file: po/de.po).
Pushing 'it' translations (file: po/it.po)
Pushing 'hu' translations (file: po/hu.po)
Pushing 'ja' translations (file: po/ja.po)
@AlD
AlD / reset_changed_hostkeys.sh
Created January 20, 2012 10:59
NeDi - remove changed hostkeys from known_hosts
#!/bin/sh
mysql nedi --column-names=false -Be '
SELECT INET_NTOA(d.ip)
FROM messages m
JOIN devices d
ON m.source = d.name
WHERE m.time > UNIX_TIMESTAMP() - 86400
AND m.info LIKE "%hostkey changed%";
' | (
$r->add_shortcut(resource => sub {
my ($r, $name) = @_;
# Generate "/$name" route
my $resource = $r->route("/$name/:action")->to("$name#");
# POST /foo/bar -> {controller => 'foo', action => 'bar'}
$resource->post->to();
# GET /foo/bar -> {controller => 'foo', action => 'bar_form'}
WATCHPATH=/watch/this
IFS=$'\t'
/usr/bin/inotifywait -mrqe create -e moved_to --format "%w${IFS}%e${IFS}%f" $WATCHPATH |
while read BASEPATH ACTIONS OBJECTPATH; do
case "$ACTIONS" in
*ISDIR*)
echo $BASEPATH $ACTIONS $OBJECTPATH
;;
esac
@AlD
AlD / heat.sh
Created December 29, 2011 15:31
;-)
#!/bin/bash
# target temperature
ttemp=22
# heating slope
slope=5
############################################