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:
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+"')"; |
[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 |
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 |
# 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 | |
} |
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] |
description "Syncthing deamon" | |
start on (starting ufw) | |
stop on [!023456] | |
env STNORESTART=yes | |
env HOME=/srv/sync | |
respawn |
#!/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/" |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# matrix.rb | |
# MB version (heavily broken) | |
# class MatrixArgumentError < ArgumentError; end | |
# class MatrixRuntimeError < RuntimeError; end | |
class Matrix |
# /etc/udev/rules.d/85-yubikey.rules | |
# https://stackoverflow.com/questions/13699241/passing-arguments-to-shell-script-from-udev-rules-file#14982520 | |
# https://askubuntu.com/questions/635266/use-of-yubikey-neo-for-login-2fa-and-lock-screen#635267 | |
# Bus 001 Device 012: ID 1050:0407 Yubico.com | |
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", RUN+="/usr/local/bin/yubikey_lock.sh '%E{ID_SERIAL}' '%E{ID_MODEL_ID}'" |