February 2012
2 posts
Failed to load module "globalmenu-gtk" after...
If you get:
Gtk-Message: Failed to load module "globalmenu-gtk"
every time you launch an app, you have left a Gnome Shell module, which is no longer present on your system, in your GTK_MODULES environment variable. In my case, I enabled the Global Menu extension in Gnome Tweak Tool and then uninstalled Gnome Shell. To fix, I rmed the /etc/profile.d/globalmenu.sh file and rebooted.
Diff'ing images in Git
I use Git on the command-line usually, but lately I’m using more and more of git-cola. It’s compact, keyboard-friendly, regularly updated, features a clean UI with main focus on staging and diffs. It was while working in git-cola merging over 100+ files from two different branches that I discovered quite a few overlapping image files. The diff panel was useless and it’s not like...
January 2012
2 posts
Not enough random bytes available.
Please do some other work to give the OS a chance to collect more entropy! (Need more bytes)
I decided to upgrade pacman on Arch Linux recently. I was advised to run [sudo] pacman-key --init after the update had finished. Sounds simple enough, just one extra command I need to copy -> paste to get me going again. Wrong. It turns out gpg will go about generating a very strong key (did not...
pacman -Syu barfs error: XYZ: signature is unknown...
Things kept getting better and better. Following the recent pacman upgrade, I was now facing issues with regards to package signatures. I had already successfully completed the keyring initialisation and I was a bit stumbled as to what exactly I was doing wrong.
You remember all those /etc/config saved as /etc/config.new messages. Yes, as it turns out these are important. Given you haven’t...
October 2011
1 post
Ubuntu 11.10: Replace the Default (and Annoying)...
Switching to Ubuntu 11.10 is painful, ugly and time consuming… but more on that some other time.
I was quite surprised to see most of the theme control options are now gone. The Appearance panel has no colour tweaks and I hate the default orange scheme. Luckily, there is a way to change it in Gtk3:
$ sudo apt-get install dconf-tools
$ dconf-editor
Browse to org.gnome.desktop.interface....
April 2011
2 posts
Compass Magick Tutorial - Part 2
There is more to Compass Magick than gradients and borders. In the second part of the tutorial series, we will go through the steps to create a simple 3-state button with an icon.
Recap of Part 1
In Part 1 we completed the tutorial with a simple button-like shape:
We generated the shape using linear gradients, corners and borders from Magick:
// intro.scss
$theme1: red;
$theme2:...
Compass Magick Tutorial - Part 1
Introduction
We have all been there - you release a cool new website with all the goodies of CSS3 just to find several weeks later your Customer wants you to support Internet Explorer as well. It seems solid backgrounds don’t cut it.
There are also cases where CSS3 isn’t the right solution, whether you have custom shapes or other elements of your design you end up creating images...
February 2011
1 post
Yoke: a drop-in, quick and dirty alternative to...
In local development, I tend to create separate pieces of JavaScript for every controller, model, view, etc. I loved the idea of Sprockets — grab all these files and stitch them together. While it worked well for a while (on the command-line), I got fed up with how slow it runs, especially on Ruby under Cygwin.
So, what to do? Node.js of course. Why? It’s fast, it’s super-easy...
December 2010
1 post
A quick and dirty way to use namespaces in...
There you have it — should work both in the browser and on the server.
November 2010
1 post
3 tags
Extract changed files from Git and prepare a...
So, you have moved over to Git. Well done! You have big plans for your future deployment process — it is going to be automated and thoroughly tested… but you still have to support your existing legacy products. If you are like me, you most likely started with simple FTP copies (oh, this takes me back). I moved over from SVN and TortoiseSVN was my primary choice for a desktop client....
October 2010
2 posts
Vim 7 on Red Hat Enterprise Linux (RHEL)
Following my last post I moved on to installing Vim 7.x as the one that comes with RHEL 4 is pretty outdated (6.x).
Vim 7.2 from SVN
Tested on RHEL 4 i386:
$ cd ~
$ svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
$ cd vim7
$ ./configure --prefix=/usr --with-features=huge --disable-gui --without-x --enable-rubyinterp --enable-cscope --enable-multibyte
$ make && make install
$...
Git on Red Hat Enterprise Linux (RHEL) 4 i386
I have been struggling with this for a while now. There is no yum to begin with and up2date doesn’t help much either (no git-* packages). Here is a quick solution:
$ cd ~
$ wget http://packages.sw.be/git/git-1.7.3-1.el4.rf.i386.rpm
$ wget http://packages.sw.be/git/perl-Git-1.7.3-1.el4.rf.i386.rpm
$ rpm -ivh --nodeps git-1.7.3-1.el4.rf.i386.rpm perl-Git-1.7.3-1.el4.rf.i386.rpm
$ git...
September 2010
1 post
MinTTY at your fingertips
How often do you need to get in and out of your terminal as quickly as possible? I use Cygwin for Linux emulation under Windows and MinTTY as my terminal of choice. MinTTY is great as it supports semi-transparent backgrounds and fullscreen mode (and lots more, be sure to check out the homepage). It is so tiny I don’t mind having a copy of it running at all times, however it bugs me when I...
August 2010
10 posts
cd with bookmarks and auto-completion for Zsh
If you are like me, you do a lot of terminal work and cd is your friend (or enemy). I was getting really tired to cd /home/stan/projects/important-project/src/ every time I launch my shell. It’s bad enough when you have one project to work on, but as things get scattered, you tend to do more directory traversing than actual coding.
Up until recently I was using go-tool. From the...
Building and using node.js on Windows (32 and... →
I have been going through the existing GitHub page for building node.js on Cygwin/Windows adding my own comments/steps and missing packages. I believe this is now a full set of instructions that should get you cracking pretty quickly from scratch.
Building and using node.js on Windows (32 and 64-bit) through Cygwin
Alternative Cygwin terminal & shell
I just realised many, if not most, Cygwin users stick with their default terminal which is the Cygwin Bash Shell. I never understood why this is the default with each installation. It is no better than Command Prompt — horizontal window resizing is out of the question, custom fonts are limited and mouse support is, well… missing.
Terminal
If you have used PuTTY to connect to remote...
If you need more than 3 levels of indentation, you’re screwed anyway, and should...
– Linus Torvalds (via fooyeahcode) (via seanmonstar)
node-paperserve - Quick and dirty web server from...
Install
$ npm install paperserve
Usage
paperserve [path-to-serve]
-p, --port [PORT] set the port to listen on, default 8000
-q, --quiet turn off any logging, default false
-h, --help display this help message
Here’s what the output looks like:
>>> paperserve: running on port 8000, serving from...
Cygwin, CoffeeScript & Growl for Windows...
Let’s start by adjusting where node.js looks for libraries. We will need this later on when we use the newly implemented -r command-line switch in CoffeeScript. Open up your shell init file, in my instance ~/.zshrc:
$ vim ~/.zshrc
and add a line in there:
export NODE_PATH="/cygdrive/d/Workspace/public/coffee-script/.coffee_libraries:$NODE_PATH"
The path can be anywhere on your system...
Styling XUL applications like web pages
If you don’t know of XUL applications there are many out there in the wild. You are probably using a Mozilla XUL-based app without even realising it.
I am a Komodo Edit user myself and I love the platform. I have posted several extensions if my words are not enough to prove it.
The greatest weakness of XUL apps in my book is how static they feel. They are not as dynamic and rich as HTML...
Oh what a tangled web we weave,
When first we practise to deceive!
– Sir Walter Scott, Marmion, Canto vi. Stanza 17.
Scottish author & novelist (1771 - 1832)
Get my Coffee, Compass and web server in the...
This is a simple bash script I run from my project’s working directory to get CoffeeScript, Compass and a simple web server running. Any changes to *.(coffee|scss) files will be compiled on the fly. Remember to check the console every now and then if you think you’ve made an whoopsy:
You need an empty compass.config.rb file to be present. Mine usually has some goodness in...
In need of a simple web server
I was hacking away on an AJAX application and needed to do some XMLHttpRequest goodness. Needless to say, working with the file:// protocol has become very restrictive lately so I was in a need of a simple web server - this meant no configuration, no support, no hassle whatsoever:
$ python -m SimpleHTTPServer &
and your working directory is now accessible over at http://localhost:8000/