Questo blog nasce da una semplice necessità: tenere nota di tutte le cose che faccio. A me è capitato molte volte di trovarmi davanti ad un problema già affrontato e mi rendevo conto che non avevo minimamente preso appunti di come lo avessi risolto. Quindi dovevo ristudiarmi la cosa da capo (o quasi, qualcosa rimane sempre nella nostra memoria).
lunedì 26 ottobre 2015
martedì 22 settembre 2015
UBUNTU - DU (Disk usage)
Per vedere le dimensioni di tutti i file e le cartelle al livello 1 ( non entra nelle sottocartelle)
To show dimension of each file and folder at level 1 (not entering inside subfolders)
du -h -d 1 -t 1G
-h stands for "human readable" (show M for megabytes, G for gigabytes and so on)
-d deep of the folder search
-t threshold size (file bigger than 1 GB)
To show dimension of each file and folder at level 1 (not entering inside subfolders)
du -h -d 1 -t 1G
-h stands for "human readable" (show M for megabytes, G for gigabytes and so on)
-d deep of the folder search
-t threshold size (file bigger than 1 GB)
venerdì 11 settembre 2015
ANDROID - Reboot phone via ssh for ZTE MD SMART (MIMOSA MINI)
Need rooted phone
reboot -f
" -f " stands for force , without my phone refuse to reboot
reboot -f
" -f " stands for force , without my phone refuse to reboot
mercoledì 12 novembre 2014
UBUNTU - How to add a missing configuration to Ubuntu 14.04 with xrandr
Hello,
the problem was that, I made a fresh install of Ubuntu 14.04 on a Dell Optiplex 860 , with a AOC e943fws monitor that have a 1360x768 resolution at 60Hz.
The default configuration offers me only 1024x768 or 800x600 resolutions.
I spotted was possible to add the missing resolution with xrandr in this way.
give cvt with resolution and frequency
me@box:~$ cvt 1360 768 60
# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz
Modeline "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
Then give xrandr --newmode omitting "Modeline" word on the command
It gives You no output.
me@box:~$ sudo xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
then add new mode to our current output , for me was VGA1
me@box:~$ sudo xrandr --addmode VGA1 1360x768_60.00
Now giving xrandr I obtain this output with the new resolution listed
me@box:~$ sudo xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 32767 x 32767
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0*
800x600 60.3 56.2
848x480 60.0
640x480 59.9
1360x768_60.00 59.8
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Now we can change the resolution
webstation1@webstation1:~$ sudo xrandr --output VGA1 --mode 1360x768_60.00
And for me that works fine.
At this point You will find the new resolution also in Monitor settings.
Bye
the problem was that, I made a fresh install of Ubuntu 14.04 on a Dell Optiplex 860 , with a AOC e943fws monitor that have a 1360x768 resolution at 60Hz.
The default configuration offers me only 1024x768 or 800x600 resolutions.
I spotted was possible to add the missing resolution with xrandr in this way.
give cvt with resolution and frequency
me@box:~$ cvt 1360 768 60
# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz
Modeline "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
Then give xrandr --newmode omitting "Modeline" word on the command
It gives You no output.
me@box:~$ sudo xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
then add new mode to our current output , for me was VGA1
me@box:~$ sudo xrandr --addmode VGA1 1360x768_60.00
Now giving xrandr I obtain this output with the new resolution listed
me@box:~$ sudo xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 32767 x 32767
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0*
800x600 60.3 56.2
848x480 60.0
640x480 59.9
1360x768_60.00 59.8
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Now we can change the resolution
webstation1@webstation1:~$ sudo xrandr --output VGA1 --mode 1360x768_60.00
And for me that works fine.
At this point You will find the new resolution also in Monitor settings.
Bye
martedì 18 marzo 2014
Create AP with UBUNTU
You need to create infrastructure (Access Point mode) wireless hot-spot rather Ad-hoc hot-spot. In linux(ubuntu) i used ap-hotspot and which works for me(i got connected WP8 and Android 4.4, dont know about iPhones).
For installation
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install ap-hotspot
Then configure it as
sudo ap-hotspot configure
It will asks for interfaces, Access point name(which can be anything you want to see as wifi_hotspot name), password(which is your wifi_hotspot security key).
Now, if you able to configure successfully and dont get any kind of Unsupported wifi errors(if you get that simply means, your wifi_card doesnt support infrastrucutre Access point wifi_hotspot, so can do nothing on it), then procceed.
So just now start your hotspot as
sudo ap-hotspot start
If you want to stop then
sudo ap-hotspot stop
If you wanna see all available commands
sudo ap-hotspot
You don't see this hot-spot running in any indicator or something, i am still finding it how to determine status checking of it.
I am using is from last few weeks, and no bugs(no side-effects too) yet. I am using Gnome-Ubuntu 13.10 amd64 sharing eth0 to my WP8.
SOURCE : http://www.unixmen.com/create-infrastructure-wifi-access-point-connect-android-devices/SOURCE : http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html
lunedì 10 febbraio 2014
BlackBerry Pearl 9105, Bold 9900 ,how to extract contacts without software....
Pair Your BB with an other phone using bluetooth (I used an android one).
If You have Italian Language Menu (like me)
Go in, "Gestione Connessioni" > "Opzioni Bluetooth" > Select the paired phone or pc > "Trasferisci Rubrica"
If You prefer English Language Menu
Go in, "Manage Connections" > "Bluetooth Options" > Select the paired phone or pc > "Transfer Contacts"
In this way the BB will send to the paired phone / pc a file Phonebook.vcf with all Your contacts.
You can then import this file in gmail from the pc for example or use it for other tasks, since it is a text file that You can read and edit with a simple text editor.
Probably should work for other BB models.
Edit.
I did the same procedure for a BB Bold 9900 ant it works flawlessly , the difference is that with this phone it creates a vcf file for every contact entry.
Bye
If You have Italian Language Menu (like me)
Go in, "Gestione Connessioni" > "Opzioni Bluetooth" > Select the paired phone or pc > "Trasferisci Rubrica"
If You prefer English Language Menu
Go in, "Manage Connections" > "Bluetooth Options" > Select the paired phone or pc > "Transfer Contacts"
In this way the BB will send to the paired phone / pc a file Phonebook.vcf with all Your contacts.
You can then import this file in gmail from the pc for example or use it for other tasks, since it is a text file that You can read and edit with a simple text editor.
Probably should work for other BB models.
Edit.
I did the same procedure for a BB Bold 9900 ant it works flawlessly , the difference is that with this phone it creates a vcf file for every contact entry.
Bye
mercoledì 22 gennaio 2014
UBUNTU - How to kill several process with the same string in their name
new post
sudo kill -9 $( pgrep sshd )
sshd is the command to kill, easier then the old post
old post
Simply open Your terminal ctrl+alt+T an type
fem@ordinateur:~$ ps -ef | grep ingularity | awk '{print$2}' | xargs kill -9
Let's analyze the code....
fem@ordinateur:~$ ps -ef | grep ingularity
give the output of current processes filtering them with the "ingularity" string.
fem@ordinateur:~$ ps -ef | grep ingularity | awk '{print$2}'
Then pipe the output to awk that extract the pid and print them (the second column only).
fem@ordinateur:~$ ps -ef | grep ingularity | awk '{print$2}' | xargs kill -9
Then pipe again sending to xargs and kill to terminate the pid found
Bye
sudo kill -9 $( pgrep sshd )
sshd is the command to kill, easier then the old post
old post
Simply open Your terminal ctrl+alt+T an type
fem@ordinateur:~$ ps -ef | grep ingularity | awk '{print$2}' | xargs kill -9
Let's analyze the code....
fem@ordinateur:~$ ps -ef | grep ingularity
give the output of current processes filtering them with the "ingularity" string.
fem@ordinateur:~$ ps -ef | grep ingularity | awk '{print$2}'
Then pipe the output to awk that extract the pid and print them (the second column only).
fem@ordinateur:~$ ps -ef | grep ingularity | awk '{print$2}' | xargs kill -9
Then pipe again sending to xargs and kill to terminate the pid found
Bye
Iscriviti a:
Post (Atom)