Skip to main content

Posts

Showing posts from 2011

Putty: tango color scheme

You have to create a .reg file and merge it into the registry. The content of the reg file should be: [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\ aldebaran ] "Colour0"="238,238,236" "Colour1"="255,255,255" "Colour2"="47,47,47" "Colour3"="46,52,54" "Colour4"="0,0,0" "Colour5"="0,255,0" "Colour6"="0,0,0" "Colour7"="46,52,54" "Colour8"="164,0,0" "Colour9"="204,0,0" "Colour10"="78,154,6" "Colour11"="115,210,22" "Colour12"="237,212,0" "Colour13"="252,233,79" "Colour14"="32,74,135" "Colour15"="52,101,164" "Colour16"="117,80,123" "Colour17"="173,127,168" "Colour18"="245,

Linux: mount a Windows share with CIFS

When you are a web developer and developing a software run on a Linux platform you might end up running your dev pc with Windows with a Linux virtual machine client. Then comes the question: how to share the source code transparently with the virtual machine and the host? Here's a possible setup: Windows 7 host, Ubuntu server in a VMware Player. On the host I share (with the simple Windows share, Samba if you like) my web development directory with all of the sources I would like the Linux server to use as well. Then I mount that share on through a bridged or host-only network interface on the Linux server with the following two choices: 1. Modify /etc/fstab . Add the following line: //192.168.x.x/hostdir /opt/clientdir cifs username=hostuser,password=hostuserpass,uid=1000,gid=1000,file_mode=0666,dir_mode=0777,noserverino,rw,iocharset=utf8 0 0 2. If you do not have the share served all the time or in some cases it is dynamically available then use this shell script instead

World of Warcraft: disable the red error text

If you don't want any error messages at all (without an addon) use these commands: /run SLASH_UI_ERRORS_OFF1 = "/erroff" /erroff This will disable the red text and the error sounds and speech. If you want to selectively disable errors, define /erroff and /erron somewhere: /run SLASH_UI_ERRORS_OFF1 = "/erroff" /run SLASH_UI_ERRORS_ON1 = "/erron" then make macros for the abilities you want to spam like this: #showtooltip /erroff /cast SomeSpell /erron

jQueryfier bookmarklet

This bookmarklet adds the latest jQuery to the current page if no jQuery exists yet. If jQuery would conflict with other library then it will tell you what caller to use. jQueryfy this page

Google Bookmark bookmarker bookmarklet ^_^

If you are logged in to your Google account and familiar with Google Bookmarks, then here is a bookmarklet for you: Bookmark this How to use: Drag the above link onto your bookmark toolbar. When you are on a page that you would like to bookmark in Google Bookmarks, push the bookmark. That's all.

Firefox 3 about:config settings

These settings are my favourite ones: browser.cache.disk.enable = false //I have enough memory browser.cache.memory.enable = true browser.cache.memory.capacity = 10240 //256MB //I wish to limit the memory consumption browser.cache.disk.parent_directory = /tmp   //when I use tmpfs on Linux for the /tmp directory browser.download.manager.scanWhenDone = false //I do not use an antivirus software network.http.keep-alive = false network.http.proxy.keep-alive = false network.http.max-connections = 64 network.http.max-connections-per-server =32 network.http.max-persistent-connections-per-proxy =16 network.http.max-persistent-connections-per-server = 12 network.http.pipelining = true network.http.pipelining.maxrequests = 8 network.http.proxy.pipelining = true network.http.request.max-start-delay = 0 content.notify.interval = 500000 content.notify.ontimer = True content.switch.threshold = 250000 browser.sessionhistory.max_total_viewers = 3 browser.sessionstore.interval =

Regular expression: IPv6

/^([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4}):([a-fA-F0-9]{1,4})$/