Skip to content

Instantly share code, notes, and snippets.

View cazacugmihai's full-sized avatar

Mihai Cazacu cazacugmihai

View GitHub Profile
var performance = (function () {
var my = {};
// Wrap a function body in this to return a copy that instruments itself
// If you want this to be useful, you should give your profiled function a name,
// otherwise it will be identified as "", which is less than useful.
my.profile = function (func) {
return function () {
var start = new Date().getTime(),
time,
@tecoholic
tecoholic / ubuntu.sh
Created May 24, 2011 08:10
Useful Ubuntu Commands
# Package to install, to get an open terminal in Right-Click context menu.
sudo apt-get install nautilus-open-terminal
# To move window controls in your Ubuntu from left to right…
gconftool-2 --type string --set /apps/metacity/general/button_layout "menu:minimize,maximize,close"
# To switch back
gconftool-2 --type string --set /apps/metacity/general/button_layout "close,maximize,minimize:menu"
# Repeat last command with sudo
sudo !!