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:3136032
Created July 18, 2012 12:49
Change the default location for screenshots on OSX
  • mkdir /Full/Path/To/Folder.
  • defaults write com.apple.screencapture location /Full/Path/To/Folder.
  • Log out and log back in.

Note: You have to put in the path properly. Using ~ to indicate your home folder will not work. The path must be entered starting from the root of the hard drive. For example, if you wanted to save them to a secondary partition, your path would start with /Volumes/SecondPartition/.

Source :

http://hints.macworld.com/article.php?story=20050824073301844

@aurels
aurels / gist:3136024
Created July 18, 2012 12:47
Install PHP on OSX
@aurels
aurels / gist:3136015
Created July 18, 2012 12:46
Install Postgres on OSX
$ brew install postgres
+ instructions à la fin de l'install
http://samsoff.es/posts/running-rails-local-development-with-nginx-postgres-and-passenger-with-homebrew
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<?php
$url = "https://rendez-vous-digital.pro/api/public/albums.json?api_key=MY_API_KEY_HERE&artists_scope=all&page=1&artists=281";
$raw_data = file_get_contents($url);
$data = json_decode($raw_data);
?>
@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