Per project configuration in Vim

Do you wish .vimrc were more modular? ...

March 29, 2018 · 2 min · ArtBIT

Upside Down

Convert text to appear upside-down with this simple JavaScript function. ...

April 19, 2013 · 1 min · ArtBIT

GIT alias forkbomb

So, you like forkbombs? ...

September 4, 2012 · 1 min · ArtBIT

MySQL hints

Just a collection of MySQl tips that I always seem to be looking up on the net. ...

August 27, 2012 · 1 min · ArtBIT

Basic Geometric Shapes in pure CSS

Here are a couple of examples of how to create basic geometric shapes by using nothing but pure css. Square +      ```css .square { width: 100px; height: 100px; } ``` Circle +      ```css .circle { width: 100px; height: 100px; -moz-border-radius: 50px; -webkit-border-radius: 50px; border-radius: 50px; } ``` Oval +      ```css .oval { width: 160px; height: 100px; -moz-border-radius: 80px / 50px; -webkit-border-radius: 80px / 50px; border-radius: 80px / 50px; } ``` Triangle Up +      ```css ....

May 28, 2012 · 2 min · ArtBIT

Bash Emacs Mode Shortcuts - Quick Reference

I always forget these shortcuts, and I always spend a couple of minutes on google trying to find the one I need. I’ve decided it’s best to have them here, for personal reference, and for anyone else who might find them useful. <Ctrl-u> Clear the line you’re typing <Ctrl-r> Search the history by typing letters <Ctrl-w> Delete previous word (<Alt+Backspace> Works too) <Ctrl-a> Goto beginning of the line <Ctrl-e> Goto end of the line <Ctrl-b> Move back one character....

March 18, 2012 · 2 min · ArtBIT

Handy Bookmarklets

Here’s a couple of bookmarklets that I use regularly when developing web apps. I’ll add more to the list as I go. Adds the specified javascript file to the current page. javascript:(function(){var%20sUrl=prompt('Enter the URL for the script file to inject:');if(sUrl){var%20s=document.createElement('script');s.setAttribute('src',sUrl);document.getElementsByTagName('body')[0].appendChild(s);alert('Script%20injected!');}})(); Adds the specified css stylesheet file to the current page. javascript:(function(){var%20sUrl=prompt('Enter%20URL%20to%20Stylesheet');if(sUrl){var%20s=document.createElement('link');s.setAttribute('href',sUrl);s.setAttribute('rel','stylesheet');s.setAttribute('type','text/css');document.getElementsByTagName('head')[0].appendChild(s);alert('Stylesheet%20injected!');}})(); Parses the page and shows the list of all the colors used on the page. javascript:(function(){s=document.body.appendChild(document.createElement('script'));'fs';s.language='javascript';void(s.src='');})()

January 13, 2012 · 1 min · ArtBIT

Obscure JavaScript

My colleague, pasted an interesting javaScript idiom to our developer chat, some time ago, and it immediately caught my attention. If you cast an array literal to a number, prepending it with a ‘+’ operator, it will evaluate to 0. var a = +[]; // a is 0 Heh, something so logical, yet obscure, immediately inspired me to take this a bit further. ...

September 13, 2011 · 3 min · ArtBIT