How do I make existing non-bare repository bare?

I started a git local repository, but how can I make this existing repository a bare repository?

  1. ssh to remote server
  2. git clone --bare -l <path_to_repos> <new_dir>
  3. renamed old repository directory
  4. renamed new repository dir to what old repository used to be

Source: https://git.wiki.kernel.org/index.php/GitFaq

Mp3 to png source code

In a previous article I talked about a little rails project to convert mp3 audio files to their graphical representation (waveform) in png format. After few comments asking me to release the source code here it is, but before this I must thank rjp’s cdcover project from where I took some of the code showed here.

If you plan to use this code as it is or in a modified version please let me know so maybe we can contribute to improve the code or just to keep in touch!

Notes

  • the code is written in ruby programming language (great!), you can run it from command line with few modifications or use it as a library in your rails projects
  • to run this code you must install some dependent gems: RMagick (which also depends on ImageMagick libraries) and NArray
  • to enable the conversion from mp3 audio encoding to raw audio format you must install SoX a command line utility described as “the Swiss Army knife of sound processing programs”
  • I’ve embedded some content from sox man pages near the command execution to better explain how sox works

You’ll find all useful links at the bottom of this page.

If you find this code useful please donate!
Click here to lend your support to: Waveform and make a donation at www.pledgie.com !
Read the rest of this entry »

Back to the 8 bits

Do you remember old consoles games music or maybe did you ever play with trackers on DOS or Amiga? Well, I’ve recently discovered Nanoloop!

Nanoloop is a mobile music software that provides all functionality you need to create nice electronic music. With its clear, minimalistic interface it plays almost like a game while still allowing for complex musical structures as well as sheer noise.

Best of all: it works on GameBoy and GameBoy Advanced.

This is an example of what you can produce with it:

It was out of stock but it’s now for sale again so come on and bring your 8 bits soul out!

More informations at http://www.nanoloop.com/
If you don’t know what a tracker software is just take a look at http://en.wikipedia.org/wiki/Tracker_(music_software)

Audiotool… amazing!

Audiotool by Hobnox is an amazing tool to make music online!

Its interface is simple and clear, you have many instrument, sintethyzers, effects. Just put them on the workbench and start composing your song with few clicks.

It remembers me a sort of Reason, but the incredible thing is that it’s a flash movie!
Flash 10 and Action Script 3 made great improvements on audio handling and generation and this is an example of what you can do with them.

Picture 1
Read the rest of this entry »

Gist: a great way to share code snippets

I just don’t want to install plugins on my wordpress blog to do things that someone already do better than these plugins!

Example: code highlighters.

I’ve found a great service from Git, it’s name is Gist and you can use it as a quick repository for your code snippets. You could use it to store anything in a text format, not only code, maybe your grocery list…

Just write down some text, name it and it will be automatically highlighted according to the specified format. Take your notes for yourself (private gists) or share them with your friends with a little embed code.

All your gists will also be versioned, really a nice feature!

Now try it by yourself: http://gist.github.com/

Select all Facebook friends

This little script helps you to select all your facebook friends (to share something or send page suggestions):

Using Firefox and Firebug open a facebook page, click “Suggest to friends”, a popup window with all your contacts will open.
Paste inside the console area the code above than click “run”, all your friends should be now selected!

Update:
There’s an easiest way to run this code, just put it all in a row and prepend the keyword javascript: than paste the object code inside the address input field of the browser and press enter.

Copy and paste inside address bar: