Skip to content

Instantly share code, notes, and snippets.

View aurels's full-sized avatar

Aurélien Malisart aurels

View GitHub Profile
@aurels
aurels / gist:2687088
Created May 13, 2012 09:07
ICS On HTC Desire
http://www.sandvold.as/instructions.htm
Rooter :
Factory Reset
Rooter avec Unrevoked 3.2.1 (merde avec les versions plus récentes).
Installer la ROM :
Mettre le zip à la racine de la carte SD et le renommer en "update.zip".
SELECT * INTO OUTFILE '/tmp/sales.csv' FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' FROM cloud.sales WHERE 1;
LOAD DATA INFILE '/tmp/sales.csv' INTO TABLE sales CHARACTER SET UTF8 FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"';
User must have the "FILE" permission set.
/^[a-z]([a-z0-9]|_){1,248}[a-z0-9](?!_ids?)$/
@aurels
aurels / gist:1724876
Created February 2, 2012 17:59
JS must have
if(typeof console === "undefined") {
console = { log: function() { } };
}
// Reduce
if (!Array.prototype.reduce)
{
Array.prototype.reduce = function(fun /*, initial*/)
{
// Saved searches -----------------------------------------
prependNoSavedSearchOption: function(array){
array = array.reverse();
array.push({
name: "[Aucune recherche sélectionnée]"
});
return array.reverse();
aurels@zouls:pagesmed (op-pictures) $ cucumber --drb
Using the default profile...
Disabling profiles...
@http://www.pivotaltracker.com/story/show/16172393 @account
Feature: Admins confirm user accounts
In order to help users with email problems
As an Admin
I confirm user accounts
Background: Logged in # features/account/admins_confirm_user_accounts.feature:7
@aurels
aurels / gist:1149400
Created August 16, 2011 15:50
Change hostname
sudo hostname mydomain.tld
@aurels
aurels / gist:1106934
Created July 26, 2011 14:52
Starting MongoDB after a crash on Ubuntu (+repair)
sudo rm /var/log/mongodb/mongod.lock
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
sudo service mongodb start
@aurels
aurels / gist:1029263
Created June 16, 2011 13:51
FTP only user setup
sudo apt-get install pure-ftpd
sudo adduser blop
# add /bin/false to /etc/shells
# edit /etc/passwd to set /bin/false as shell
# edit /etc/pam.d/pure-ftpd to force the use of /etc/ftpallow
# add user blop to /etc/ftpallow
# Chroot everyone
@aurels
aurels / gist:822700
Created February 11, 2011 17:19
Recursive and readable disk usage for a directory
du -hx --max-depth 1 /var