This is a doubty useful tips-'n-tricks blog page. Feel free to use and spread the following contents. There is also a dedicated section for
|
how-to_
Flushare la cache del DNS negli Ubuntu recenti
# systemd-resolve --flush-caches |
Move Google Keep notes between 2 Google accounts
Easy but not quite fast way to move all or some note from google account A to Google account B
|
Customizzazioni Debian Linux per Consip Acer TravelMate P236-M-5789
Il touchpad ha bisogno di qualche customizzazione da mettere in /etc/X11/xorg.conf.d/synaptics.conf Allego un esempio del file che uso io ma sono parametri assolutamente personalizzabili. Section "InputClass" Identifier "Touchpad" # required MatchIsTouchpad "yes" # required Driver "synaptics" # required Option "MinSpeed" "0.1" Option "MaxSpeed" "0.8" Option "AccelFactor" "0.075" Option "TapButton1" "1" Option "TapButton2" "2" # multitouch Option "TapButton3" "3" # multitouch Option "VertTwoFingerScroll" "1" # multitouch Option "HorizTwoFingerScroll" "1" # multitouch Option "VertEdgeScroll" "1" Option "HorizEdgeScroll" "1" Option "CoastingSpeed" "4" Option "CornerCoasting" "1" Option "CircularScrolling" "1" Option "CircScrollTrigger" "7" Option "EdgeMotionUseAlways" "1" Option "LBCornerButton" "8" # browser "back" btn Option "RBCornerButton" "9" # browser "forward" btn EndSection Per ulteriori informazioni sui parametri basta usare il manuale del driver synaptics: $ man synaptics Per vederne l'effetto run-time è possibile usare i seguenti comandi $ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ELAN0501:00 04F3:3010 Touchpad id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Sleep Button id=8 [slave keyboard (3)] ↳ HD WebCam id=9 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)] ↳ Acer WMI hotkeys id=12 [slave keyboard (3)] |
Extract matching packets from freeRADIUS radius accounting detail
Dirty but working-with-large-files script to multiline grep out interesting lines from detail files. Usage examples: callingstationid extraction: $ cat detail | grepradacct "00:0e:ff:ab:cd:ef" username extraction:
#!/bin/sh GREPSTRING=$1 if [ $2 ]; then echo Results in $2 >&2 cat $2 |\ awk -F'\n' 'BEGIN {RS='\n\n'; ORS='\t'; OFS='\t';} { for (i=1; i<=NF; i++) print $i } { print "\n\n" }' |\ grep -a "$GREPSTRING" |\ awk -F'\t' 'BEGIN {OFS='\n';} {print "\n" $1; for (i=2; i<=NF; i++) print "\t" $i "" }' else cat - |\ awk -F'\n' 'BEGIN {RS='\n\n'; ORS='\t'; OFS='\t';} { for (i=1; i<=NF; i++) print $i } { print "\n\n" }' |\ grep -a "$GREPSTRING" |\ awk -F'\t' 'BEGIN {OFS='\n';} {print "\n" $1; for (i=2; i<=NF; i++) print "\t" $i "" }' fi |
IPv6 l337 subnetting
Searching for meaningful subnet numbers for a new IPv6 /48 range subnetting, I tried to do an automatic extraction of 4 characters (/64 subnet) word in my language that can translate somehw in an IPv6 l337 address. So I searched for and downloaded my language wordlist and then using the following command: $ cat italian_words | grep ^....$ | grep -Ev "h|k|m|p|n|u|v|w|x|y" | while read word; do echo -n "$word "; echo $word | tr gijloqrstz 9111002572; done I gota a comprehensive list of usable terms: ... roba 20ba rogo 2090 rosa 205a rose 205e saio 5a10 sala 5a1a sale 5a1e sali 5a11 salo 5a10 sazi 5a21 scia 5c1a scie 5c1e seco 5ec0 seda 5eda sede 5ede sedi 5ed1 sedo 5ed0 sega 5e9a sego 5e90 sera 5e2a sere 5e2e ... |
Keyboard input from serial RS232 barcode scanners or badge (magnetic card) readers
After strolling a little bit too much around google I finally found something easy dirty and useful to connect serial input to Xinput. These packages are not easy to find in the net, so i decided to post them here.As it is hard to compile (dependencies, errors, a lot) I found a precompiled debian/ubuntu package here http://dl.stackfoundry.org/softwedge/ All yu have to do is to type this in a terminal inside your X session. All input will be instantly available on the focused window. softwedge -c /dev/ttyS0 Obviously substitute ttyS0 with your favourite serial emulated port such as rfcomm0 (bluetooth) or ttyUSB0 (usb serial dongle).
|
Google Earth wrong coordinates (misplacing search result)
It happens that there is a bug/incompatibility between Qt libraries and Google Earth in a way that comma are interpreted as point and viceversa in locale environments where comma is used to separate decimals and point as a thousand separator. So let's reset locale settings for numbers only before starting Google Earth:Find the bash executable of GE : in my system /opt/google/earth/free/googleearth Just before the last line LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./googleearth-bin "$@" put export LC_NUMERIC=us_US.UTF-8 Re-execute GE and enjoy!
|
Keyboard Layout not working?
Tired of faulty Ubuntu UIs, I found this useful, simple and straight command to switch keyboard layout in X: Give it in a terminal window inside the user X session, tested with Gnome and Cinnamon desktop. |
Enable IPv6 Accounting in FreeRADUIUS
Postgres DB: add a column for IPv6 accounting This magnificent database uses the same data type for IPv4 and v6 addresses :) FreeRADIUS: raddb/sql/postgresql/dialup.conf add proper IPv6 lines accounting_stop_query = "UPDATE ${acct_table2} \ |
FreeRADIUS Acct-Unique-Session-Id fix
Some WLCs (wireless lan controllers) use the same session ID tracking for a session across multiple access points (NAS-Port).
as key. |
1-10 of 35