Monday, November 5, 2018

[bash] speedtest cli to multiple servers in one location


LOCATION=Dublin
for SERVER in `speedtest --list | grep -E "$LOCATION" | cut -f1 -d \)`; do speedtest --secure --server $SERVER; done



if you would like to install speedtest command line version...

# debian/ubuntu:
apt install python3-pip
pip3 install speedtest-cli
speedtest


Friday, October 12, 2018

Adding PGP key for your repo Debian/Ubuntu


gpg --keyserver pgpkeys.mit.edu --recv-key insert_key_here
gpg -a --export insert_key_here | sudo apt-key add -

source: https://help.ubuntu.com/community/SecureApt

UPDATE:
another solution:

#!/bin/bash

# samu 2010-01-01
# (c) 2010 Samuele ~redShadow~ Santi
# redshadow&hackzine.org - http://www.hackzine.org
# Under Gnu GPL v3

KEYID="$1"

echo "Registering APT key $1..."
gpg --keyserver pgp.mit.edu --recv-keys "$KEYID"
gpg --export --armor "$KEYID" | apt-key add -

Source: https://wiki.hackzine.org/sysadmin/debian-register-apt-repo-key.html

ANOTHER UPDATE:
above didnt work with error message:

gpg: keyserver receive failed: No keyserver available
gpg: WARNING: nothing exported
gpg: no valid OpenPGP data found.


so another try:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
which eventually worked

Not sure what happened as the first command used to work for me in the past.

Friday, December 1, 2017

[SOLUTION] disable notifications peeking in samsung galaxy s6/s7/s8

Details available here: https://forum.xda-developers.com/android/general/howto-4-to-disable-heads-notifications-t3197660

Long story short is you need to run this command:
adb shell settings put global heads_up_notifications_enabled 0

You need to have adb installed and connected mobile with USB cable

Keywords:
disable notifications peeking in samsung galaxy s6/s7/s8
disable notifications baloon in samsung galaxy s6/s7/s8
disable notifications bubble in samsung galaxy s6/s7/s8

Sunday, October 22, 2017

Tuesday, December 1, 2015

How to replace in google spreadsheet any character with carriage return

Solution shamelessly copied from https://stackoverflow.com/questions/7528169/find-replace-with-newline-on-google-spreadsheet

IF you are trying to use the Ctrl+F to find and replace well you can't. at least I dont know how.

but if you have a cell say A1 that contains the following : "stack,overflow" then if you type this in A2 it should work: =SUBSTITUTE(A1, ",", char(10))

https://support.google.com/docs/bin/static.py?hl=en&topic=25273&page=table.cs

you can then copy the content of A2 and in A3 right click -> Paste Special... -> Values Only.

Thursday, October 31, 2013

[SOLUTION] Windows XP SP3 doesnt detect SD HC card

Found problems reading my SD HC card in Samsung nc10 running windows xp sp3.
Service pack 3 should have all necessary patches installed so after some research found info about possible problem with extended fat32 support. After installing following patch all problems gone. Looks like the problem was related to missing exFAT support in my case. Hope this helps anyone struggling with this issue.

http://www.microsoft.com/en-ie/download/details.aspx?id=19364

Microsoft knowledge base article KB955704
filename: WindowsXP-KB955704-x86-ENU.exe

Install this update to add support for the exFAT file system format.



Wednesday, January 25, 2012

[SOLUTION] screen -r : Cannot open your terminal ‘/dev/pts/0′ – please check.

as seen on http://blog.hbcom.info/archives/430

when trying to re-attach screen while sudo-ing you see:
$ screen -r
Cannot open your terminal '/dev/pts/0' - please check.


Solution:
Before starting screen type:
script /dev/null
And after that you can type:
screen -r
Only drawback is that you need to type one additional exit for script to terminate.