Command-T - Fast file navigation for VIM
Ingenious, fast way to find your files:
Command-T - Fast file navigation for VIM : vim online.
I use the following mappings:
" Set leader key to comma let mapleader = "," " Command-T shortcuts nnoremap <silent> <Leader>t :CommandT<CR> nnoremap <silent> <Leader>b :CommandTBuffer<CR>
Bring up the finder with ,t or "comma-t". Use …
Quick Tip: CSS 100% Height
Scoping ExtJS CSS
Git undo, reset or revert?
Also useful:
git rm -r --cached *
That will recursively remove every file from the index (files staged for commit).
Temporarily Disable PostgreSQL Triggers
To temporarily disable all triggers in a PostgreSQL session, use this:
SET session_replication_role = replica;
That disables all triggers for the current database session only. Useful for bulk operations, but remember to be careful to keep your database consistent.
To re-enable:
SET session_replication_role = DEFAULT;
Disable a Single Trigger
To disable just …
Ubuntu 12.04 Active Directory Authentication
Update 2015-06-16:Ubuntu 14.04 Active Directory Authentication
Authenticating Linux users against Active Directory has traditionally been hard. There's a multitude of HOWTOs on how to do it, and every one of them seems to do it a bit differently. This is because environments and goals vary, and there are …
Checking PostgreSQL Disk Usage
This query sums total disk space used by the table including indexes and toasted data for the 20 largest tables:
SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND …
Why WordPress Asks for Connection Info
Why WordPress Asks for Connection Info
You can also add this to wp-config.php to get rid of the FTP prompt in case you have write permissions but WordPress does not understand it correctly:
define('FS_METHOD', 'direct');
Apache HTTP authentication against WordPress password database
The stock mod_auth_mysql package in Ubuntu is not able to authenticate against the phpass password hashes stored in the WordPress database.
There seems to be a patch lying around to enable phpass authentication in mod_auth_mysql. Its inclusion in mod_auth_mysql has been requested a long time ago, and again more recently …