Profile of humancoder

Snippets posted by humancoder

Update git repos oneliners

Update all the git repos in one directory in one line. A git-svn and git-pull example.

Added on: 08 June 2011 and tagged with: update bash git

CodeIgniter Google Javascript Library Helper

A pretty useless helper actually, but included in CI core can make a big difference. http://code.google.com/apis/ajaxlibs/documentation/index.html for more info. Usage: Put it in the system/helpers/ directory under the CI root In controller file simply: $this->load->helper('googlejs'); In view: <?=load_gjs("jquery", "1.2.6", true);?> [library]/[version]/<compressed/uncompressed> The output will be like this: <script language="Javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

Added on: 03 January 2011 and tagged with: codeigniter helper php

svn2git

Transform a svn checkout into a git remote

Added on: 03 January 2011 and tagged with: git python svn

Streaming mp3 to Apple Airport

http://nanocrew.net/software/justeport/

Added on: 01 December 2010 and tagged with: bash

Autoresize iframe to it's height

This script autoresizes an iframe from within it's body. This is useful when you don't have access to the parent.

Added on: 25 November 2010 and tagged with: html iframe javascript

Django UUID model field

Can be used as a primary_key

Added on: 04 November 2010 and tagged with: django django-fields python

repozo

Create repozo deltas and recover them. The first line can be used in a cronjob

Added on: 04 November 2010 and tagged with: repozo zope2

python setyp.py sdist SVN Revision

Extract an SVN revision number from `git log` and then invoke `python setup.py sdist`

Added on: 04 November 2010 and tagged with: bash egg python

Launch remote control selenium

Launch selenium remote control with a custom firefox profile.

Added on: 04 November 2010 and tagged with: selenium testing

Linkify

Create links from strings that start with http(s)://

Added on: 04 November 2010 and tagged with: javascript utils

JQuery persistent forms

Store/populate form fields data using HTML5 localStorage

Added on: 04 November 2010 and tagged with: html5 javascript jquery localStorage

Rename files using pattern

A useful snippet that allows you to rename files using a pattern

Added on: 04 November 2010 and tagged with: bash utils

Caps Lock mod

This disables Caps Lock and transforms it into Ctrl. Also the last line disables mouse acceleration

Added on: 17 May 2010 and tagged with: bash hacks keyboard

Directory watcher daemon

You can use this script to watch some directories, for some specific files. If something changes the make an action... for example I reload the ZServer.

Added on: 11 February 2010 and tagged with: directory-watcher python reload zope

MyISAM to InnoDB and latin1 to utf8

Switch from MyISAM to InnoDB and from latin1 to utf8 easy and painlessly.

Added on: 19 January 2010 and tagged with: bash mysql sed

SVN Auto Commit

This is a dirty hack to use SVN as FTP with version control. You don't want to do that unless you don't care about the benefits of the version control system. On slower systems it tends to consume way to much resources.

Added on: 19 January 2010 and tagged with: bash cron svn

PHP Shell

It's a small (size) and easy to use webshell on PHP, coded for security testing purposes. Intends to make web-shell experience similar to real Xwindow terminal emulator (gnome-terminal, putty).

Added on: 16 January 2010 and tagged with: php security web-shell

Simple template Class

A very very simple html template php4

Added on: 16 January 2010 and tagged with: php template template-class

MySQL create user and database

These sql statements should be executed by root. Adds a user + database + flushes privileges.

Added on: 14 January 2010 and tagged with: mysql mysql-hacks sql