Skip to content

Instantly share code, notes, and snippets.

View ChoiZ's full-sized avatar

François LASSERRE ChoiZ

View GitHub Profile
@ChoiZ
ChoiZ / SimpleImage.class.php
Created December 3, 2012 18:02
Update SimpleImage.class.php
<?php
/* [...] */
//
// Save an image
//
// $filename - the filename to save to (defaults to original file)
// $quality - 0-100 percent for PNG or JPG
//
@ChoiZ
ChoiZ / mkdir.php
Created December 3, 2012 18:06
mkdir safe
<?php
/**
* makedir
*
* @param mixed $rep
* @access public
* @return void
*/
function makedir($rep) {
@ChoiZ
ChoiZ / placeholder.css
Last active December 10, 2015 19:59
Create a placeholder with jQuery and xhtml
.placeholder {
color:#ccc;
}
ace.require("ace/lib/net").loadScript("https://raw.github.com/ajaxorg/ace-builds/master/src-min-noconflict/keybinding-vim.js", function() {
e = document.getElementById("ace-editor").env.editor;
e.setKeyboardHandler(ace.require("ace/keyboard/vim").handler);
})

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@ChoiZ
ChoiZ / vim.md
Last active August 29, 2015 14:00 — forked from mattratleph/vimdiff.md
Vim Diff / Visual Block

vim cheat sheet

##vimdiff commands

]c :        - next difference
[c :        - previous difference
do          - diff obtain
dp          - diff put
zo          - open folded text

zc - close folded text

@ChoiZ
ChoiZ / migration.php
Last active August 29, 2015 14:03
Script de Migration IP Online VM sous proxmox
<?php
/*
* Script de configuration des nouvelles IP Online pour les VM utilisant proxmox.
*/
$eth = array('eth0','eth0:0','eth0:1','eth0:2','eth0:3','eth0:4','eth0:5','eth0:6','eth0:7'); // ça devrait aller pour 1 seule vm ? ;)
$ipfo = array();
$ipmaster = array();
/*
@ChoiZ
ChoiZ / deefuzzer.yaml
Last active August 29, 2015 14:14
deefuzzer 0.7 config file
deefuzzer:
log: /log/station.log
m3u: /m3u/station.m3u
stationdefault:
control: {mode: 0,
port: 16001}
jingles: {dir: /m3u/jingles,
mode: 0,

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@ChoiZ
ChoiZ / git.md
Last active January 18, 2016 13:27
Usefull git commands

Usefull git commands

Add a specific commit to current branch:

git cherry-pick commit-hash

Merge commits

Merge the last 2 commits:

git rebase -i @~2

(old git version you must use HEAD instead of @) git rebase -i HEAD^2