I hereby claim:
- I am MartinBrugnara on github.
- I am martinbrugnara (https://keybase.io/martinbrugnara) on keybase.
- I have a public key whose fingerprint is AD35 1834 ABDA BFF7 4C13 C034 3093 1A1F F36D D5E9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
if [ "$#" -ne 1 ]; then | |
echo "Usage $0 tntpage.htm" | |
exit 1 | |
fi | |
cat "$1" | grep 'showtopic' | sed -e "s/.*href=['\"]\([^\"']*?showtopic=[^\"']*\)['\"].*/\1/" \ | |
| grep '^http' | grep index | xargs -n 1 curl \ | |
| grep 'magnet:?' | sed -e "s/.*href=['\"]\(magnet:?[^\"']*\)['\"].*/\1/" |
description "Syncthing deamon" | |
start on (starting ufw) | |
stop on [!023456] | |
env STNORESTART=yes | |
env HOME=/srv/sync | |
respawn |
max=`cat /sys/class/backlight/intel_backlight/max_brightness` | |
req=$1 | |
if [ $req -le 5 ]; then | |
req=5 | |
fi | |
if [ $req -ge 100 ]; then | |
req=100 | |
fi | |
next=$[$max * $req / 100] |
# Note remove only the first occurrence | |
# TODO: let xargs remove all occurence | |
# $1 should be a valid ls selector | |
function rml(){ | |
ls -l $1 | grep -- '->' | sed -e's/.*-> //' | xargs -I % rm "%" -v | |
rm $1 | |
} |
If you, like me, does'not accept anymore that NetworkManager change/lose you DNS configuration... | |
And if you doesn't know what this line is for... | |
This trick should fix your problem! | |
file: | |
/etc/NetworkManager/NetworkManager.conf | |
line 3: | |
dns=dnsmasq |
[program:btsync] | |
command=/usr/local/btsync/btsync --nodaemon --config /usr/local/btsync/sync.conf | |
user=<%= btuser %> | |
redirect_stderr=true | |
stdout_logfile=/tmp/btsync.log | |
stdout_logfile_maxbytes=1MB | |
stdout_logfile_backups=3 |
var SEARCH_MODE = 1; | |
$("#search-input").keyup(function(){ | |
if($(this).val() != ""){ | |
// hide all rows | |
$("#search-table :not(thead, tfoot) tr").hide(); | |
if(SEARCH_MODE==0){ | |
// Mode 0: Require at least one word per row | |
var search_string = $.map($(this).val().split(/[^a-zA-Z0-9]/), function(e, i){ | |
return "#search-table td:contains-ci('"+e+"')"; |