Skip to content

Instantly share code, notes, and snippets.

View Axiol's full-sized avatar

Arnaud Delante Axiol

View GitHub Profile
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@Axiol
Axiol / script.js
Created November 21, 2012 23:50
Preview the image from an input file
// Call this function on the onchange event of the input
function prevVisu(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e){
$("div#visuForm").html("<img class='img-polaroid' src='" + e.target.result + "' alt='Preview du visuel'>");
};
reader.readAsDataURL(input.files[0]);
}
}
@Axiol
Axiol / database.php
Last active December 10, 2015 09:28
Use multiple database configuration depending of the adress you access the service
<?php
public $local = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '',
'login' => '',
'password' => '',
'database' => '',
'prefix' => '',
'encoding' => '',
@Axiol
Axiol / .bash_profile
Last active December 23, 2015 12:39
My bash config
alias ls="ls -G"
alias please="sudo"
alias reload_profile=". ~/.bash_profile"
alias gits="git status"
alias gita="git add ."
alias gitc="git commit -am"
alias fuck="sudo $(history -p \!\!)"
# ANSI color codes
RS="\[\033[0m\]" # reset
@Axiol
Axiol / Monokai.terminal
Created December 24, 2013 17:10
My OS X terminal setup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECkw
LjA3ODQzMTM3MjU1IDAuMTE3NjQ3MDU4OCAwLjA5ODAzOTIxNTY5ABACgALSEBESE1ok
Y2xhc3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJj
@Axiol
Axiol / Preferences.sublime-settings
Created January 6, 2014 08:00
My Sublime Text settings
// Installed Packages
//
// * AdvancedNewFile
// * Base16 Color Schemes
// * Emmet
// * Sass
// * SublimeCodeIntel
// * Theme - Soda
// * Theme - Spacegray
@Axiol
Axiol / keymap.c
Last active October 22, 2017 23:42
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the