Updates from December, 2010 Toggle Comment Threads | Keyboard Shortcuts

  • diegor 12:52 pm on April 9, 2011 Permalink | Reply  

    Flash post: new, again 

    Yesterday I’ve decided to update my site and significant changes are:

    Do you like it? Comment!

     
  • diegor 1:00 pm on March 11, 2011 Permalink | Reply
    Tags:   

    HOWTO: make vim show ending line spaces as characters 

    When you edit a file with vim, it’s useful understand where the line ends especially if there are spaces at the end of the line. Instead checking all lines, you can highlight white spaces. How?

    1. Open Vim from Terminal
    2. type
      :set list
    3. You see an output like the one below
    4. If you want see each space as character, type this command
      :set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
    5. The output should look like below

    Very simple and useful tip! :)

    If you have any doubt, advice or something else, comment this post! :)

    Source: Stackoverflow

     
    • proudlygeek 1:43 pm on March 11, 2011 Permalink | Reply

      Vim is my favourite text editor, i use it pretty anywhere :-)

      I’ll share a useful trick for commenting multiple lines of code:

      1) SHIFT-V to select multiple lines;
      2) Type “:s/^/#”

      Where “^” indicates the beginning of a line and “#” the comment symbol of your choice.

      To decomment a block of code:

      1) Shift-V
      2) Type “:s/^#//”

  • diegor 2:21 pm on February 26, 2011 Permalink | Reply
    Tags:   

    HOWTO: protect a web url with a password 

    Today I show you how to protect with a password a web url. This can be done in several ways (you can find it in Google) and in this post I use Apache2. Follow these steps:

    1. Install Apache2. Most OS have a preinstalled version (OSX has got)
    2. Create a file named “.htpasswd” via “htpasswd”:
      #> htpasswd -c /path/to/.htaccess diegor

      and when the prompt will ask you the password, type it (twice). The file looks like (in this case the password is like the username - DON’T DO IT, NEVER!!):

      diegor:HMAATyF2kQ37E
    3. Put this file to a directory NOT accessible to web server. For example, move it above www root directory
    4. Finally create a file named “.htaccess” in the directory to protect:
      AuthUserFile /path/to/your/safedir/.htpasswd
      AuthGroupFile /dev/null
      AuthName EnterPassword
      AuthType Basic
      
      require user diegor
    5. Restart Apache and go to you protected url via browser. You can’t access until you type your user and password

    That’s it. If you have any issue, comment this post.

     
  • diegor 3:26 pm on February 15, 2011 Permalink | Reply
    Tags:   

    HOWTO: moving Time Machine data to new hard disk 

    If you are using Time Machine feature from OSX maybe you need to move data from you hard disk to a new one avoiding to lose it. There is no official way to do this, but with some trick you can do it easily. Follow these steps:

    1. make sure both drives (could be also a remote hard disk) are connected;
    2. launch “Disk Utility”
    3. in the left column, click on one drive name (NOTE: main drive icon!)
    4. at the right side click on “restore” tab (the last one)
    5. from the left, click and drag the icon of the older hard drive to “source” field
    6. repeat step 5 with the new drive dragging it into “destination” field
    7. best choice is to set “Erase Destination”
    8. click “Restore”
    9. realax for some hours (for 120 GB I waited 5 hours).

    When the process will finish, new drive has the same name of the old one. Rename old drive or give a new name to new drive. Once you changed the name open Time Machine settings and choose new drive.

    That’s it :)

    If you have any trouble, let me know commenting this post.

     
  • diegor 11:26 pm on February 9, 2011 Permalink | Reply
    Tags:   

    HOWTO: change in a minute 

    To improve yourself it’s enough little changes (less than a minute each one). Richard Wiseman wrote about that in “59 seconds“. Below, ten points that italian Wired suggests:

    1. Buy happiness: money spent on concerts make you happier than those used to buy items
    2. Listen to more classical music: classical music relaxes you better
    3. Don’t waste the Sun: Sun and warm weather improve your memory
    4. Sit in the right way: who sits in the right way is more happier than who sits sprawled
    5. Take things easy: a continuos relaxed gait and a strong handshake improve your mood even in a bad moments
    6. Don’t fall in people’s traps: pay attention to people who offer you dark bargain.
    7. Smile more: if you use humor in stress situations you have 40% less to have a heart attack
    8. Use email better: 37% of people lie in phone call, 27% in conversation and only 14% in mail. Use it better
    9. Watch dogs to understand its owners: to understand a person ask him to talk about his dog
    10. Use the unconscious: In vital affair, use your unconscious, the answers are hidden into ourselves.

    So? What do you think about these suggestions? Do you want add another one? Have you read “59 seconds”?

    Like always, comment this post :)

    via: Wired.it

     
  • diegor 1:04 pm on December 18, 2010 Permalink | Reply
    Tags:   

    Hello World 

    Usually when someone (nerd) starts to write a new blog, he begin with an “Hello World“. I have this blog since January 2007 and I always  have been written in italian (my mother tongue).

    Some time ago I decided to write in english and so now I do :) For me this post is like the first of a new blog!

    Besides I also know the spanish, hence you can find some useful post in this language. You can switch among languages using the menu on the right or putting “/it/” or “/es/” after the domain.. et voilà, the site changes language! :P

    Now I explain rapidly the structure and features of my site:

    • the domain ends with .it: yes, i’m Italian but “IT” stands also for Information Technology (like the motto says). In fact i’m going to write post about IT
    • I’m using WPML (WP multiple language) plugin to manage more languages. So there will be three feeds, one per language. Choose what you prefer!
    • all pages are translated by me, so they may have errors (surely they’ll have them).
    • some post (depends by the importance) i could translate in all three (or two) languages
    • in “Curriculum” there will be my CV translated in current language
    • in “HOWTOs” page there will be all how to that I’ll write (obviously in the current language)
    • in “Download“.. oh God, you already know that will be in this page!
    • License” page contains CC 2.5 license
    • in “Who is diegor?” you can find all my data and contacts (and my lovely avatar of course). This page has two sub-page: “Social Networks” where is my 2.0 side and “Quotes

    So, this blog is an ESL (English as Second Language) blog and you (yes, right you!) could fix my errors, suggest or integrate HOWTOs and whatever you want.

    For now, thanks for you patience and.. see you soon! :)

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel

Switch to our mobile site

Powered by Google Talk Widget