Archive for the ‘computers’ Category

 

How to remove duplicate entries in Finder menu

posted by Arkham on April 10th, 2013

Type in console:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \
-kill -r -domain local -domain system -domain user

and then:

killall Finder

Tags:

iTerm2 on Mac OSX: add alt-left, alt-right and alt-backspace behaviour

posted by Arkham on January 9th, 2013

If you want iTerm2 to behave like the other Mac OSX applications, so that alt + left moves the previous word, alt + right moves to the next word and alt + backspace deletes the whole word, add these keyboard shortcuts from iTerm > Preferences > Profiles > Keys:

  • Alt + left: Send Escape Sequence, Esc + b
  • Alt + right: Send Escape Sequence, Esc + f
  • Alt + backspace: Send Hex Code, 0x17

Tags: , , , ,

Ruby 1.9 – Tap my Object

posted by Arkham on October 28th, 2011

Let’ say you need to debug this piece of code:

very_cool_method(egg, sausage)

What would you do? I guess something along the lines of:

spam = very_cool_method(egg, sausage)
p spam

Well, Ruby 1.9 let you do something cooler instead:

very_cool_method(egg, sausage).tap{ |s| p s }

The cool thing about tap is that you can use it to eavesdrop method chains:

very_cool_method(egg, sausage).tap{ |s| p s }.now_make_sandwich_from(bacon)

Hooray! :)

Tags: , , , ,

This relationship is headed…

posted by Arkham on March 2nd, 2010

http://www.youtube.com/watch?v=JVfVqfIN8_c

  • Hey
  • Mom, Dad, this is Ryan.
  • Oh so this is the famous boy we’ve been hearing so much about.
  • Nice to finally meet you Mrs. L33T. And sir.
  • So, Ryan, what Warcraft server do you play on?
  • Is that on umm is that on the computer? Oh you know what, i think i forgot the desert in the car.
  • Who do you think you are bringing his kind into my house!?
  • But dad, he’s a nice guy, really.
  • No he’s a n00b Jessica, a n00b!
  • But ryan and I are perfect together.
  • This relationship is headed for an epic fail, young lady. You’re a L33T damn it, we don’t date n00bs, we pwn them!!
  • Well maybe I don’t want to be a L33T!
  • Your insolence, for the lose!
  • No, maybe I looove that he watches VHS tapes still. And maybe i love that his phone still has a cord.
  • You might as well date someone who plays Aliance.
  • I date whoever I want!
  • Over my level 80 rogue’s temporary dead body!
  • Mr. L33T, I may run around in circles when I play halo, and I might never get a monster kill, well, I can’t even find the space bar half the time. But I know when I find true love, and that is worth more than all the uber gear in the world.
  • Too long, did not listen!

Tags: , , ,

Trust WB-1400T on Archlinux

posted by Arkham on October 16th, 2009

wb-1400t

Run as root:

modprobe gspca_pac207

Enjoy :)

Tags: , ,