Don't bother like my brother

Just another WordPress weblog

 

OpenFrameworks ofProject tab completion September 1, 2010

Filed under: IT, code, interesting, tips — Artem @ 11:26 am

I prefer to do many things in console and am used to tab completion in programs. It felt uncomfortable to type the plugin and project names in ofProject, especially when you have many of them. So I have created a small script that looks into appropriate directories and then autocompletes the names when you press tab.

_ofProject()
{
 local cur prev

 COMPREPLY=()
 cur="${COMP_WORDS[COMP_CWORD]}"
 prev="${COMP_WORDS[COMP_CWORD-1]}"
 opts="add"
 local ADDON_DIRS=$(ls -l /home/alius/Code/openframeworks/addons/ | grep '^d' | awk '{ print $8 }')
 local APP_DIRS=$(ls -l /home/alius/Code/openframeworks/apps/myApps/ | grep '^d' | awk '{ print $8 }')

 case "${prev}" in
    add)
        COMPREPLY=( $(compgen -W "${ADDON_DIRS}" -- ${cur}))
        return 0
        ;;
    *)
        COMPREPLY=( $(compgen -W "${APP_DIRS}" -- ${cur}))
        return 0
        ;;
 esac
}
complete -F _ofProject ofProject

What you need is just change the paths and place this script into /etc/bash_completion.d/ as ofProject

 
 

Quote August 19, 2010

Filed under: IT, interesting — Artem @ 11:31 am

“If I plug the machine into a d/port with two monitors connected, it posts on one monitor and the OS X desktop loads on the other. Now that’s almost as messed up as Barack Obama winning a Nobel Peace Prize.”

By leppy700m at insanelymac.com

 
 

Android Secret Codes July 6, 2010

Filed under: IT, interesting, tips — Artem @ 11:41 pm

There are some secret codes that you can dial in you Android dialer app. All these codes have the following mask: *#*#SOME_NUMBERS#*#*

  • *#*#4636#*#* - Testing application, which has phone information and some settings (imei, network name, type, location, etc), battery information including history, and usage statistics
  • *#*#8351#*#* - Turn on voice dial logging
  • *#*#8350#*#* - Turn off voice dial logging
  • *#*#7262626#*#* - FieldTest application
  • *#*#225#*#* - Calendar information
 
 

Ad world March 28, 2010

Filed under: interesting — Artem @ 5:45 pm

The world we live in

 
 

Temperature November 26, 2009

Filed under: interesting — Artem @ 2:11 am

I never thought of that:

Temperature is a quantity that determines the number of thermodynamically possible states of a system within an energy range.

 
 

Bacterial orchestra November 10, 2009

Filed under: interesting — Artem @ 12:54 am

Project’s page. It would be fun to have one cell.

 
 

Thefuntheory again October 30, 2009

Filed under: interesting — Artem @ 3:59 pm

New project from the Stockholm guys thefuntheory.com

 
 

The fun theory October 24, 2009

Filed under: interesting — Artem @ 6:11 pm

Very interesting project in one of the Stockholm metro stations. I wish we had something similar up here.

 
 

The Pirate Bay presents October 14, 2009

Filed under: interesting — Artem @ 12:22 am

NASTY OLD PEOPLE

This is Mette’s story. Member of a neo-Nazi gang, her day job is to take care of four seniors that all are just waiting to die. Her life becomes a journey into a burlesque fairytale, where the rules of the game are created by Mette herself. Mette is indifferent about her way of life, until she one night assaults a man, kicking him senseless. Waking up the day after, she realizes that something is wrong, and accompanied by the crazy oldies, she longs for respect and love. Together, they create a world of their own. A world you never knew existed.

BEHIND THE SCENES
In the autumn of 2007 Hanna Sköld took a private bank loan of 10 000 euro to make her debut feature film “Nasty Old People”. Now she continues to ignore the middle men in the film industry by distributing it together with the film collective RåFILM’s Luffarbion, aka Vagabond Cinema, and the file sharing site The Pirate Bay. In addition, she releases it under a creative commons license so that anyone can download, share or remix the film.

The movie page nasty old people and the torrent is on The Pirate Bay

If you like this movie, please support it.

 
 

Sounds really interesting October 2, 2009

Filed under: interesting — Artem @ 2:23 pm

Created a circular mashup of 4 trance tracks. “Circular” meaning if you play the mashup on repeat, it will seemlessly continue as if the mashup is infinitely long. The mashup is structured to utilize the keys of each individual track to form an overall musical key progression, one which returns to it’s root (so, it is also musically circular). The effect is pretty cool, give it a try.

Caustik – Mashups – Forever (Circular Mix)

I listened to it for almost 20 minutes until it came to my mind that I was listening to the same thing in a loop. The author’s blog