Stupidaapple

Apple’s simplicity ridiculous. La semplicità dei prodotti Apple porta a volte a complicazioni estreme.

  • Sto installando, per la prima volta e più per capriccio che per altro, Snow Leopard sul mio MacBook pro. A parte l’eccessiva semplicità, che mi ha fatto ripetere l’installazione tre volte data la difficoltà nel reperire l’opzione per formattare il disco rigido, mi sovviene la seguente questione: perchè ci sono tutte le lingue possibili ed immaginabili installate per default? Il tutto costa 1.2Gb di spazio, tempo di installazione e sono completamente inutili, a me serve solo l’inglese. Comunque si risolve con monolingual.
  • È tanto complicato far definire all’utente la funzione del tasto “lock” dell’iPad? Ancora utile quando bloccava la rotazione dello schermo … completamente idiota la funzione “mute” (anche perchè basta tener schiacciato 1s il tasto per abbassare il volume e va in “mute” lo stesso). A me servirebbe che il tasto controllasse lo stato della WLAN.
  • Pages (il Word di Apple): per default usa la lingua impostata sul sistema, nel mio caso EN-USA. Scrivo documento in italiano, voglio il correttore ortografico: ceppa! Se io uso un sistema EN-USA, so scrivere solo in inglese, punto. Al massimo posso scrivere pezzetti in altre lingue. Conclusione: non è possibile settare la lingua di un documento diversamente da quella del sistema! … ridicolo.
VN:F [1.9.10_1130]
Rating: 0 (from 0 votes)

Ubuntu 10.10 pkgs index update fail

roga@stratonembo:~$ sudo apt-get update
Hit http://ch.archive.ubuntu.com maverick-updates/multiverse i386 PackagesFetched 3,892B in 2s (1,806B/s)
Reading package lists... Done
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. 
GPG error: http://extras.ubuntu.com maverick Release: The following signatures couldn't be verified because the public key is not 
available: NO_PUBKEY 16126D3A3E5C1192
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/maverick/Release
W: Some index files failed to download, they have been ignored, or old ones used instead.
roga@stratonembo:~$

To fix the problem:

roga@stratonembo:~$ sudo apt-get --reinstall install ubuntu-extras-keyring
roga@stratonembo:~$ sudo apt-get update
VN:F [1.9.10_1130]
Rating: 0 (from 0 votes)

bash t&t

  • cp test{,.bak}
  • sudo netstat -plantu
  • remove leading spaces: sed ‘s/^[ \t]*//’
VN:F [1.9.10_1130]
Rating: 0 (from 0 votes)

perl – read Data::Dumper(variable)

#!/usr/bin/perl
# Reuse data dumped with Dumper(%var)
# $VAR1 = '$VAR1 = {
#           \'Man\' => \'Bill\',
#           \'Dog\' => \'Ben\',
#           \'Woman\' => \'Mary\'
#         };

use Data::Dumper;
use strict;

# read the whole file into a variable
my $data;
{
  local $/=undef;        # If the $/ variable is undefined, the <...> operator will read
                         # the entire file all at once
  open FILE, "$ARGV[0]" or die "Couldn't open file: $!";
  $data = <FILE>;         # This reads the whole file
  close FILE;
}

$data =~ s/\$VAR1 = //;   # Remove the $VAR1 =
my $h = eval($data);      # spread in the code

print $h->{Man}."\n";          # output is "Bill"

me@host:~/$ cat data.dump
$VAR1 = {
          'Man' => 'Bill',
          'Dog' => 'Ben',
          'Woman' => 'Mary'
        };
me@host:~/$ ./test.pl data.dump
Bill
VN:F [1.9.10_1130]
Rating: 0 (from 0 votes)

nomi impossibili

Succedono a volte (tipo

[root@fwadm-eng1 admtj60]# tar xvf eventiaziiextsiu_20100518.tgz 

) cose strane:

[root@fwadm-eng1 admtj60]# ls -li
total 270532
2485595 drwxr-xr-x    7 root     root         4096 May 18 13:43 backup
2485591 -rw-r--r--    1 root     root     276741810 May 18 10:50 eventiaziiextsiu_20100518.tar.gz
2485593 drwxr-xr-x    3 root     root         4096 May 18 11:06 ??-?????vS?9?=?6?ʶ4?h?z??6?9iî¤??

Domanda: “Come si cancella l’ultima directory?”

[root@fwadm-eng1 admtj60]# rm "???=m??n&?-+E??#r=a?{,SUzr??U?????\6?????j?g??"
rm: cannot lstat `???=m??n&?-+E??#r=a?{,SUzr??U?????\\6?????j?g??': No such file or directory

Ovvero: una sonora pernacchia elettronica.

Soluzione: eliminare quello che viene trovato per inode.

[root@fwadm-eng1 admtj60]# ls -li
total 270532
2485595 drwxr-xr-x    7 root     root         4096 May 18 13:43 backup
2485591 -rw-r--r--    1 root     root     276741810 May 18 10:50 eventiaziiextsiu_20100518.tar.gz
2485593 drwxr-xr-x    3 root     root         4096 May 18 11:06 ??-?????vS?9?=?6?ʶ4?h?z??6?9iî¤??
[root@fwadm-eng1 admtj60]# find . -xdev -type d -inum 2485593 -exec rm -r {} \;
find: ./¥-°Ë°ÎvSú9=è6«Ê¶4hÙzÐ6´9iã: No such file or directory
[root@fwadm-eng1 admtj60]# ls -li
total 270528
2485595 drwxr-xr-x    7 root     root         4096 May 18 13:43 backup
2485591 -rw-r--r--    1 root     root     276741810 May 18 10:50 eventiaziiextsiu_20100518.tar.gz

strange but true.

VN:F [1.9.10_1130]
Rating: 0 (from 0 votes)
Go back to top