Archive for April 2009

Bignardi spat between Ice Age and Brunetta

5 commenti » Logbook , Various 5 comments »

What you see is a video on YouTube caught and fed to SenzaRete.TV (beta / demo). For more information about the project SenzaRete, contact staff@tetragono.com .

Recycling is organizing the workshop Design Swap Party

Nessun commento » Copincollato , News , Reports No Comments »

Swap Design, locandina della manifestazione organizzata da Atelier del Riciclo

So when the design becomes infected by the spirit of the up-cycling, which means creative reuse of objects in the name of a new sustainable eco-aesthetic devoted to hedonism. And 'in this context that, in the rich festival of events outside room, stands out

DESIGN PARTY SWAP
organized by the Recycling Workshop
Bistro at the Triennale in Milan Bovisa (via Lambruschini 31)
Saturday, April 25 from 18 to 21 hours.

A different way to celebrate the traditional ritual of happy hour from Milan, trading items and sharing the fun with those who cultivate the 'feeling' and the emotion. What can you share? A crystal vase with a pair of designer shoes, a table service with a Chanel-style purses, a juicer (the myth of Philippe Starck, for example) with a kettle for Alessi jewelry or vintage American. The event launches a challenge to the imagination placed at suitable infinite, without limits but those of good taste and high quality.

The family tree of Linux

Nessun commento » Copincollato , News , Open Source No Comments »

L'albero genealogico di Linux What is a synopsis attach very detailed and well made, designed by NPU / Lundqvist to show the evolution in parallel of many Linux distributions exist / existed, and the relationship that often binds them to one another. This is a work that has, in my humble opinion, a great scientific value and allows for the choice of a distro for a given project, even (and I stress also) based on the longevity of the project, its initial nature and number Variants that follow from it. What is now attaching the latest version (release 9.3), but given the nature of the project, invitation to visit periodically to the official website of its maintainer, at http://futurist.se/gldt/ .

Earthquake in Abruzzo: how and where to donate.

Nessun commento » Warnings , Misc No Comments »

Here are the channels provided by the Italian Red Cross and Civil Protection for the Abruzzo earthquake fund-raising pro.

Bank Account

Bank: BNL - Rome Branch Bissolati
C / C: 218020
Payable to: Via Toscana Italian Red Cross, 12 - 00187 Rome
IBAN: IT66C0100503382000000218020
Swift Code: BNLIITRR
Reason: EARTHQUAKE PRO ABRUZZO

Postal Account

Payable to: Via Toscana Italian Red Cross, 12 - 00187 Rome
C / C Zip: 300004
IBAN: IT24X0760103200000000300004
Reason: EARTHQUAKE PRO ABRUZZO

Online Donations

You can also make payments online through the website of the Red Cross at: http://www.cri.it/donazioni/index.php?mode=form

Donate via SMS

Tim, Vodafone, Wind and 3 Italy have decided, in accordance with Civil Defence, to enable the numbering 48580 solidarity to raise funds for earthquake victims of Abruzzo. Just send a simple SMS to 48580 at a cost of one euro, to give help to those who are organizing relief and assistance. From 9 am this morning, you can also call from a landline on 48580 Telecom Italy to donate 2 euros. The Civil Protection Department will provide all the information on how the funds collected from telephone operators. Wind and Tim have indicated their intention to accredit respectively 5 and 10 euros of free traffic to all their mobile customers present, unfortunately, on the strong earthquake struck the Abruzzo region. In addition, the Wind has posted in areas affected by the earthquake five mobile units to ensure the continuity of communication.

Terremoto in Abruzzo

Nature. You show that it was not mind that the life of this universe is a perpetual circuit of production and destruction, related both to himself such a manner that each one serves the other constantly, and the conservation of the world, which provided that cease or either of them, would likewise failing. For in his time would give him anything if he were free from suffering.

Icelandic. Cotesta hear the same reasoning to all philosophers. But because what is destroyed, suffering, and what destroys it, does not enjoy, and just go is likewise destroyed, tell me what no philosopher can tell me: who benefits or who likes Cotesta unhappy life of the universe, preserved with damage and with the death of all the things that make it up?

Automate smbpasswd by bash

Nessun commento » Open Source , Shell , System , Tips & Tricks No Comments »

It will happen to you - to have music in my head ... - are to restore a number of Samba users after a server upgrade or migrate from one server to another. I found an old script that does all the dirty work by loading a text file to recreate the list of users with their passwords.

Its operation is simple: it comes in a few words of a few lines of bash that automate the interaction with smbpasswd.

The script consists of a first executable that allows the following syntax:

multi_smbpasswd.sh -o [add/del] -f [nome del file]

In practice, to recreate all the users listed in the Samba configuration file utenti.conf:

multi_smbpasswd.sh -o add -f utenti.conf

To delete all users listed in the Samba configuration file utenti.conf:

multi_smbpasswd.sh -o del -f utenti.conf

Here is the code multi_smbpasswd.sh:

 
 # / Bin / bash

 ################################################## ########

 # # This script is here to make adding / subtracting users # #

 # # To the smbpasswd file easyer etc.. 
 # #

 ################################################## ########


 NO_ARGS = 2

 E_OPTERROR = 65


 operation = 0
    
 # 1 = add
    
 # 2 = the
    
 # 0 = error.

 fillel = 0
    
 # 1 = good file and file location.
    
 # 0 = error


 ################################################## #######

 # # Parameters: # #

 # #-O [options] = The operation to preform. 
 # # Options are

 # # As follows: # #

 # # Add = add users to the system # #

 # # = Delete the users from the system. 
 # #

 # #-F [FILE_LOCATION] = The files that the user names # #

 # # Are stored in. 
 # # Must Provide

 # # The complete location of the # #

 # # File. 
 # #

 ################################################## #######


 # Nothing to protect outselfs passing from the script.

 "$#" -eq " $NO_ARGS " ] if 
["$ #"-eq "$ NO_ARGS"]

 then # Script needs at least 3 options passed to it, Otherwise error out and do nothing.
  
 echo "Usage: $ 0 - [switch] [option / FILE_LOCATION]"
  
 exit $ E_OPTERROR

 fi


 o:f: Option while getopts o: f: Option

 do
  
 " in case 
"$ option" in
    
 o)
      
 # Check the options and fill the var operation.
      
 " $OPTARG " == "add" ] if 

["$ OPTARG" == 
"add"]
      
 then
        
 # We are going to add the users.
        
 operation = 1
      
 " $OPTARG " == "del" ] elif 

["$ OPTARG" == 
"in"]
      
 then
        
 # We are deleting the users.
        
 operation = 2
      
 else
        
 # Error out, causes They Did not pass the right options.
        
 operation = 0
        
 echo "option Invaild operation!"
        
 exit $ E_OPTERROR
      
 fi
    
 ;;
    
 f)
      
 # Check the option to see if the file exsists and That It is the ninth zero.
      
 -f " $OPTARG " ] if 
[-f 
"$ OPTARG"]
      
 then
        
 -s " $OPTARG " ] if 
[-s 
"$ OPTARG"]
        
 then
          
 ilel = 1
          
 " filelocation = 
"$ OPTARG"
        
 else
          
 ilel = 0
         
 echo "File is of zero length! You need to have a list of users in the file!"
          
 exit $ E_OPTERROR
        
 fi
      
 else
        
 ilel = 0
       
 echo "File Is not there! You Must Provide a valid file location!"
        
 exit $ E_OPTERROR
      
 fi
    
 ;;
    
 
*)
      
 break
    
 ;;
  
 esac


 done

 $OPTIND - 1 ) ) shift $ 
(($ OPTIND - 
1))


 $operation == 1 ] if 
[$ operation == 
1]

 then
  
 # We are adding the users.
  
 $ ( cat " $filelocation " ) for i in $ 
(cat 
"$ filelocation")
  
 do
    
 " $i " | cut -d ':' -f1 ) username = $ (echo 
"$ i" | 
cut-d 
':'-f1)
    
 " $i " | cut -d ':' -f2 ) password = $ (echo 
"$ i" | 
cut-d 
':'-f2)
    
 # Create a new unix user before smbpasswd
    
 useradd $ username
    
 smb-add-passwd $ username $ password
  
 done

 $operation == 2 ] elif 
[$ operation == 
2]

 then
  
 # We are deleting the users out of the system.
  
 $ ( cat " $filelocation " ) for i in $ 
(cat 
"$ filelocation")
  
 do
    
 " $i " | cut -d ':' -f1 ) username = $ (echo 
"$ i" | 
cut-d 
':'-f1)
    
 # Remove the smbpasswd unix user before
    
 userdel $ username
    
 $ smbpasswd-x username
  
 done

 fi


 exit 0 

It's not all though. Because they can run the script calls an external procedure as simple as it deals with input values ​​taken from the configuration file in the standard input of smbpasswd. Here is the code of the script smb-passwd-add:

 
 #! / Usr / bin / expect -

 # Wrapper to make passwd (1) be non-interactive

 # Username is passed as 1st arg, passwd as 2nd

 # Executable only by root


 lindex $argv 1 ] set password [Lindex $ argv 
1]

 bin / smbpasswd -a [ lindex $argv 0 ] spawn / usr / bin / smbpasswd-a [Lindex $ argv 
0]

 expect "password:"

 send 
"$ password \ r"

 expect "password:"

 send 
"$ password \ r"

 expect eof 

Warning! As you have noticed this second script is based on expect, which should be installed if you want to work.

Finally, here is an example of the file utenti.conf:

utente1:wfwiourfhowirf
utente2:eiuewhifuhwef
utente3:dkjfwskfjhwekj
utente4:woeifjwoerifffj

The original is located at this address:

http://www.programmingforums.org/thread6522.html

I added just a couple of lines for a rough synchronization between users Samba and Unix users.

I hope you can help!

Howto mailto: little guide to mailto links

2 commenti » Beginners , Tips & Tricks 2 comments »

Here's a real argument scacciafiga (*): the correct syntax for mailto links, or links that recall those details our favorite email client and the "forced" to create a new email to a recipient, and also with a certain object - wanting - some default text.

The mailto link have a very basic syntax is very simple:

<a href="mailto:info@example.com?subject=subject&cc=cc@example.com"> mail link </ a>

The arguments can be passed to a mailto link are as follows:

mailto: the recipient, or the list of recipients separated by commas
& Cc = address CC (carbon copy, aka: copy) or CC addresses separated by commas
& Bcc = address the BCC (blind carbon copy, aka: blind carbon copy) or BCC addresses separated by commas
& Subject = the subject of the message ... that someone called - wrongly - the subject (note: replace spaces with% 20)
& Body = the body of the message (Note: replace newlines with% 0A)

Some examples

Simple mailto link:

 
 <a href="mailto:info@example.com"> click here </ a> 

Mailto link with subject:

 
 <a href="mailto:info@example.com?subject=Test%20di%20invio"> click here </ a> 

Mailto link with multiple recipients:

 
 <a href="mailto:info@example.com,email@example.com"> click here </ a> 

Mailto link with CC:

 
 <a href="mailto:info@example.com?cc=email2@example.com"> click here </ a> 

Mailto link with the proposed body of the message on multiple lines and BCC:

 
 <A 
 here </ a> 

For those not familiar with these things, remember that the parameters are passed by entering a question mark immediately after the recipient's email address and that the parameters are conoctenati under the symbol &.

Happy mailing!

(*) For the City and the Lazio region: scacciafica ;)