gmail application shortcut on windows 7

here is a quick and easy way to pin a gmail application shortcut into your win7 taskbar using googe chrome.

  1. create a new shortcut by right clicking inside a folder (like desktop or documents) followed by choosing: new > shortcut
  2. use the following string on the location field: “%appdata%\Local\Google\Chrome\Application\chrome.exe –app=https://mail.google.com/mail”
  3. after the shortcut was created, change the icon for shortcut by right clicking on it and choosing properties > change icon (i have downloaded the gmail icon from http://iconexpo.com/2009/02/free-gmail-icon-new-version)
  4. drag the shortcut to the taskbar in order to pin it
  5. click on it, it will first open a new task on task bar but after gmail loads it will merge to the one you have already pinned (which is separated for the normal chrome task on the taskbar)

opportunities

i have stumbled upon a forum post by Pin Wang, which seems to echo my thoughts. here it goes:

What I have realized from my experiences is that getting a promotion to Associate Producer (or whatever position you seek), has a lot less to do with a checklist of things you need to do, and more about how you conduct yourself as a professional. I think the same applies with breaking in as well. There is no shortage of people wanting to work in the industry, but there is definitely a shortage of people who are self-motivated and have high expectations for themselves when it comes to their work. Unfortunately I have encountered quite a few people with the opposite attitude: “grunts” that constantly seek outside guidance on “what to do” and “if its good enough.” Worse (and this is something that several managers have complained to me about), is a sense of “entitlement” when it comes to raises, promotions, recognition, etc. That is, feeling like you deserve something because of the time you have been at a company and that your hidden potential has been squandered on a menial job (which you have achieved mediocrity at).

The truth is that at many companies, and especially in the games industry, you are constantly given the opportunity to “step up” and perform duties or help out with tasks that are outside of your job description. My advice to newcomers is to take those opportunities regardless of how busy you are and whether you get paid for the overtime you may have to put in. Investing in your image as a professional who can get things done, with quality, on time, and with flexibility is, in my opinion, the key factor in advancing in the games industry.

Maybe these are things that apply to any kind of job, but in my conversation with managers (and in my own short experience as project lead for a game mod project), this is definitely the deciding factor. Any number of years of “industry experience” can never trump “can I trust him to do this job well, and can I trust him to do it without constant management?” I think by and large, people who qualify in relation to that question are the ones I’ve seen get promotions.

you can read the full text at the original forum post.

everymark

everymark i have just finished writing my first google chrome extension. took my half a day overall, few of hours here and there, but compared to firefox the red-tape stuff was much easier.

actually it is very simple, you make a new direcotry, and create ‘manifest.json’ description file, it includes all of the extension official stuff, like name, version, description and permissions. it also include pointers to other files – html and javascripts.

that’s it, from here it is plain web: html/css and javascript.

one thing worth mentioning is that if you change the manifest file you need to explicitly reload your extension on your chrome://extensions/ page, otherwise things like permissions are not updated. other stuff like html/javascript files are reloaded each time you invoke your extension, so no need to do nothing on this case.

what i was working on? well, long time ago i have found out that the old school method of cataloging things and then searching them by their location is not very effective, you pay a lot of time on the WRITE side and you pay as well on the READ side, using metaphor from the database world.

the search capability of everything and sublime text projects are far better, just see all the database as one flat list and start filtering it by your search term. so that what i did on my bookmarks, and here is the result:

everymark – ‘everything’ search on my bookmark.

when clicking the icon, a nice popup will appear, populated with a list of all your bookmarks and their links, whenever you start typing search terms the list will shrink to contain only the relevant bookmarks – neat :) – any way enjoy.

everymark-screenshot

btw, for references about writing the extension i have use the following pages:

http://code.google.com/chrome/extensions/devguide.html
http://code.google.com/chrome/extensions/api_index.html
http://code.google.com/chrome/extensions/tut_debugging.html

* * *

revisions:

v1.8.3startup speed improvements on favicons
v1.8.2fixed selection bug on v1.8.1
v1.8.1un-obfuscated
v1.8show full URL as tooltip on hover
v1.7.1show full URL as tooltip on hover
v1.7show sites’ favicons
v1.6.1better visualization on deletion of bookmark
v1.6sort by date, double click to open, tooltip on extension icon
v1.5.1filter bookmarklets (thanks to Darío Macchi), better context menu
v1.5columns can be sorted, revised context menu
v1.4added context menu (right click) with option to delete bookmark
v1.3.1filter groups/folders from the list
v1.3wraps row selection on table edges
v1.2.1supports auto-update
v1.2supports multiple search terms (space separated)
v1.1supports manual selection with arrow keys and launching with enter key
v1.0.2few minor fixes
v1.0.1added extension icons
v1.0initial release

cleaner menus

after installing so and so utilities, you must have found your self right-clicking on windows explorer, only to gaze at an endless list of options each of the ‘wise’ apps has left…

a useful little program to take under control the clutter on the right click menu. to be able to edit or remove entries from the shell context menu on windows explorer, look at the shell menu view or use this direct download link

shell menu view

shell menu view

perl one liners = magic

perla word about the power of unix shell commands: perl one liners, i.e. one line of perl that can save you hours of error-prone hand changes. when i want to do some massive changes in my code this is what i use.

say you need replcae a record name from abc_record to xyz_record, first if you use perl recursivlly it will touch all files and revision control will makr them for commit. you don’t want that. so use grep to filter the relevant files:

grep "#abc_record\b" . -rl

next, do the replace:

perl -i -pe s/"#abc_record\b"/"xyz_record"/g `grep "#abc_record\b" src -rl`

note the use of \b to mark a word boundary.

a more complex replace is if you need to change the code from using a record to use a wrapper function. so for exmaple we have the record:

-record(abc_record, {fld}).

and we want to start use a wrapper module:

-module(rtools).
-export([fld/1]).
 
fld(R) -> R#abc_record.fld.

so we can do it instantly like that:

perl -i -pe s/"\b(\w+)#abc_record\.fld"/"rtools:fld(\1)"/g `grep "#abc_record\.fld" src -rl`

here we have switched from using A#abc_record.fld to record_tools:fld(A)

another trick is to remove complete lines (!), so for exmaple you can get rid of all the -compile(export_all) you have fullishly inserted into your code:

perl -i -nle 'print if !/-compile\(export_all\)/' `grep export_all src -rl`

one safty tip, omit the -i first to try before you actuall change files.

this was just a learn-by-example, more info can be found at:
http://sial.org/howto/perl/one-liner
http://www.unixguide.net/unix/perl_oneliners.shtml

sublime text – the vi modern alternative

i was set for another quest – to find my vi (text editor) modern alternative. for years i have worked with vi, learned to use it as my other hand, it seems there is nothing i can’t do with this old editor. what makes it so special? in one word: customization. the ability to change everything, the ability to have plugins and any key binding you can think of. this lead to current big community which supply many many plugins, themes and extensions.
so, you say… your quest is done. the problem with the vi text editor, and few can argue with it is pretty ugly. well, it has the kind of style of driving a 40 years old pontiac firebird. yes, it has it charisma, but… how do should i put it… time to think of a new toyota :)
moreover have you seen vi on windows? if you didn’t then don’t, it will ruin your day. as i migrated to more dynamic workspace, working both on windows and linux i also wanted a good texteditor for windows.
so, i began to search. i have tried many editors, the only one worth mentioning as a vi windows alternative is the notepad++ which is very fine free editor, with big community and support.
but the quest didn’t end there, it wasn’t what i have looked for, i couldn’t believe that on the 21 century all the editors look like taken from the windows 95 era.
looked some more and found many mention textmate. that’s it i said, but i don’t have mac, and i don’t plan on working with one for the near future, isn’t there something like textmate on windows? well, i googled it, and found three modern text editors which challenged my call.
e-texteditor, intype and sublime text.
first i have checked e. i was surprised – at last! – i said to my self. it had it all, good looking, customizable, and with active community. it also have nice unique features like personal version control. but most importantly it brings the power of textmate community into the windows world. after this optimistic start, the reality was a bit disappointing. it depends on cygwin, which always surprised my with unusual behavior compared to unix shell. it was buggy. unstable (lucky me, i’ve used the version control) and not so customizable on its own. as a details geek, i fought with its theme editor and tried to have a custom search marker to fit my theme, i was exhausted after few hours.
i jumped to intype, it was nice, but seemed dead. the last update at that time (just one year ago) was few month old. next!
enter sublime text. i true wonder. my breath was taken, it was so beautiful, genuine ideas, like multiple selection (you can edit as many line you want in the same time, you must see it to understand), ingeniously wicked project management (no more endless tree-click to find a file, using it is like googling inside your project), and customizable to the bone (extendable with pyhton). i’m home.
it was a true joy, i could customize everything, from the color of the selection to the key binding i was use to. from the theme and font to use and where, to the snippets of the languages i work with. sublime also support textmate snippets and themes.
a year have passed, and i am still learning this magnificent artwork. the developer, jon skinnenr, fires up new versions rapidly. i sometimes feel like i have my own text editor under development in the way jon listen and implement user requests.
the community is very active, great new plugins are coming out each week. there is also a starter site: http://sublime.akalias.net/gettingstarted/index.html
as for linux, i just use samba and edit files like i am on windows. sorry vi, i prefer to drive with the air condition on…

i was set for another quest – to find a vi (text editor) modern alternative. for years i have worked with vi, learned to use it as my other hand, till it seemed there is nothing i can’t do with this old editor. what makes it so special? in one word: customization. the ability to change everything, the ability to have plugins and any key binding to anything you can think of. this lead to the current big community which supply many many plugins, themes and extensions.

so, you say, your quest is done, what’s the problem? the problem with the vi text editor, and few can argue with it, is it’s pretty ugly. it has the kind of style you have when driving a 40 years old pontiac firebird. yes, it has it charisma, but… how should i put it… time to think of a new toyota :)

moreover, have you seen the vi on windows? if you didn’t, then don’t, it will ruin your day. as i migrated to a more dynamic workspace, working both on windows and linux i also wanted a good texteditor for windows.

so, i began to search. i have tried many editors, the only one worth mentioning as a vi windows alternative is the notepad++ which is very fine free editor, with big community and support.

but the quest didn’t end there, it wasn’t what i have looked for, i couldn’t believe that on the 21 century all the editors look like are taken from the windows 95 era.

i’ve looked some more and found many people mention textmate. that’s it, i said. but i don’t have mac, and i don’t plan on working with one for the near future, isn’t there something like textmate on windows? well, i googled it, and found three modern text editors which challenged my call.

e-texteditor, intype and sublime text.

first i have checked e. i was surprised – at last! – i said to my self. it had it all, good looking, customizable, and with active community. it also have nice unique features like personal version control. but most importantly it brings the power of textmate community into the windows world. after this optimistic start, the reality was a bit disappointing. it depends on cygwin, which always surprised my with unusual behavior compared to unix shell. it was buggy. unstable (lucky me, i’ve used the version control) and not so customizable on its own. as a details geek, i fought with its theme editor and tried to have a custom search marker to fit my theme, i was exhausted after few hours.

i jumped to intype, it was nice, but seemed dead. the last update at that time (just one year ago) was few month old (btw, still in alfa phase as i write this after a year). next!

enter sublime text. i true wonder. my breath was taken, it was so beautiful, genuine ideas, like multiple selection (you can edit as many line you want in the same time, you must see it to understand), ingeniously wicked project management (no more endless tree-click to find a file, using it is like googling inside your project), the minimap (you can see a minimized version of your code, keeping your orientation all the time – even on big piles of code), and customizable to the bone (extendable with pyhton). i’m home.

sublime multiple selection

sublime multiple selection

it was a true joy, i could customize everything, from the color of the selection to the key binding i was use to. from the theme and font to use and where, to the snippets of the languages i work with. sublime also support textmate snippets and themes.

a year have passed, and i am still learning this magnificent artwork. the developer, jon skinnenr, fires up new versions rapidly. i sometimes feel like i have my own text editor under development in the way jon listen and implement user requests.

the community is very active, great new plugins are coming out each week. there is also a great starter site and a place for community plugins and extensions.

i can say now that i have found a decent replacement for the vi, a highly customizable, modern text editor, which actually looks cool.

as for linux, i just use samba and edit files like i am on windows. sorry vi, i prefer to drive with the air condition on…

adsweep

here is a new alternative to privoxy solution (which is great btw), which allows to have an adblock script which can be used on google chrome, opera or firefox. there is a nice how-to here. and you can find the official site here. it is called adsweep, and it uses javascript to filter ads on sites you visit.

confusion

“You might be confused. This confusion isn’t a bad thing, it is the decision in disguise” — Scalable Internet Architecture by Theo Schlossnagle

yet another colinux instructions

colinuxi hope this is my last post on colinux and erlang, but although i had written several time about it, i will do it once more, to sum up a little guide to setup a new colinux with the correct way to set erlang on it. i also added few words on adding the nitrogen web framework.

> is used for windows command prompt
$ is used for linux shell prompt

ubuntu 8.04 server

qemu

  • direct download – http://www.h6.dion.ne.jp/~kazuw/qemu-win/qemu-0.9.0-windows.zip
  • extract qemu into a new directory c:\linux\qemu
  • start windows command prompt
  • make a 3gb image:
     > fsutil file createnew c:\linux\distro\qemu_ubuntu_3gb 3221257728
  • make a image for a 512mb swap file:
     > fsutil file createnew c:\linux\distro\qemu_swap_512mb 536903168
  • on c:\linux\qemu create the next batch file: install.bat, whith the following content:
    @ECHO OFF
    set qemu_dir=C:\linux\distro
    set hd=%qemu_dir%\qemu_ubuntu_3gb
    set swap=%qemu_dir%\qemu_swap_512mb
    set cdrom=%qemu_dir%\ubuntu-8.04.2-server-i386.iso
    set mem=384
    qemu -hda %hd% -hdb %swap% -cdrom %cdrom% -m %mem% -boot d -L .
    pause
  • run the batch file you have just created: install.bat
  • go through the linux installation, select manually partition when asked, and do the following:
    • create new partitionchoose /dev/sda
    • choose create as: primary partition
    • choose file system: ext3
    • create new partitionchoose /dev/sdb
    • choose create as: primary partition
    • choose file system: linux-swap
  • install, and when you get to the point it asks for restart – you have finished. it takes some time, so be patient.

colinux

  • direct download – http://downloads.sourceforge.net/colinux/coLinux-0.7.3.exe
  • run and install on c:\colinux
  • don’t use or download any of the suggested distributions on the install process
  • download and install unxutils – http://gnuwin.epfl.ch/apps/unxutils/en/install/
  • convert qemu ubuntu image to colinux image
     > cd c:\linux\distro
     > dd if=qemu_ubuntu_3gb of=ubuntu_3gb.img bs=512 skip=63
  • you only need the file ubuntu_3gb.img the other 2 files (qemu_swap_512mb and qemu_ubuntu_3gb) can be removed
  • create new swap file:
     > fsutil file createnew c:\linux\distro\swap_512mb 536870912
  • create a file on c:\linux\distro named ubuntu8.04.conf, and paste the following into it:
    kernel=vmlinux
    sda1="c:\linux\distro\ubuntu-8.04.2-server-i386.ext3.3gb.img"
    sdb1="c:\linux\distro\swap_512mb"
    root=/dev/sda1 fastboot 3
    ro
    mem=384
    eth0=slirp
    eth1=tuntap
  • create a shortcut for colinux-daemon.exe, right click on it and edit its properties, to add the following parameters (on the shortcut target field):
    c:\colinux\colinux-daemon.exe -t nt @c:\linux\distro\ubuntu8.04.conf
  • start this new shortcut, running the colinux the first time
  • edit /etc/network/interfaces and the windows tap connection, see my previous post named colinux
  • install ssh and update:
    $ sudo apt-get install ssh
    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ chsh -s /bin/bash user_name
  • connect using putty to 192.168.37.20:22

compress and backup the colinux image

  • to determine the free space in megabytes
    $ df -m
  • fill image with zeros
    $ dd if=/dev/zero of=foobar bs=1M count='above result less 5'
    $ rm foobar
  • logout, and compress from windows using a compression app, should get around 100MB file

install erlang from source

$ sudo apt-get install build-essential
$ sudo apt-get install libncurses5-dev
$ sudo apt-get install m4
$ sudo apt-get install libssl-dev
$ sudo apt-get install openssl
 
$ cd; mkdir workspace; cd !
$ wget http://www.erlang.org/download/otp_src_R12B-5.tar.gz
$ tar xvfz otp_src_R12B-5.tar.gz
$ cd otp_src_R12B-5
$ ./configure
$ make
$ sudo make install

install some basics

$ sudo apt-get install git subversion ctags vim

setup environment

edit .bash_profile, and add the following at the bottom

export ERL_LIBS=${HOME}/erlang/lib

download and install nitrogen

$ cd; mkdir -p erlang/lib; cd !$
$ git clone git://github.com/rklophaus/nitrogen.git
$ cd nitrogen
$ make

done

nitrogen

i have stumbled upon a very promissing web framwork for erlang. nitrogen, altough very young (first release was around December 2008), it seems exactly what i have looking for. it actually bring the erlang into the web, allowing to develope a true erlang based web app.

nitrogen have several appealing features. the framwork support ajax/comet, which is absolutely a shame how easy it ease to use. it allows defining html templates, with ‘holes’ in it to insert content from the erlang source. but the real benefit is the ability to write those ‘holes’ in erlang modules. those ‘holes’ are filled with elements which are parallel to html structures, and because you are using erlang sytax to describe them, you can use the erlang pattern matching and messaging system in it.

Page 1 of 3

Powered by WordPress & Theme by Anders Norén