Skip to content

Instantly share code, notes, and snippets.

View tsbits's full-sized avatar
👾

Olivier Destenay tsbits

👾
View GitHub Profile
@tsbits
tsbits / gist:3869bc4d5d9e36f754ab
Created May 11, 2014 11:42
Create sample user on WordPress
//This script creat a lot of 'fake' users for your WordPress
//Usefull for developper
//This is a modified version of that script : http://wpengineer.com/2054/create-users-automatically-in-wordpress/
//Add this to the functions.php file of your theme then visite the dashboard.
function fb_wp_insert_user(){
for ($i = 1; $i <= 100; $i++) {
$user_data = array(
'ID' => '',
'user_pass' => wp_generate_password(),
@tsbits
tsbits / gist:11111001
Created April 20, 2014 10:46
Config default Apache OSX
In /etc/apache2/users/username.conf
<Directory "/www">
Options FollowSymLinks Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
@tsbits
tsbits / gist:9213759
Created February 25, 2014 17:33
JS - Detect iOS Version
function iOSversion() {
if (/iP(hone|od|ad)/.test(navigator.platform)) {
// supports iOS 2.0 and later: <http://bit.ly/TJjs1V>
var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
}
}
var version = iOSversion();
@tsbits
tsbits / Step to prepare JSON for the Frame player
Last active December 31, 2015 12:39
Video to frame player video
//FFMPEG PART
ffmpeg -i "path/to/the/video.ext" -an -f image2 -q:v 8 "path/to/destination/folder/%d.ext"
-> -q:v n ( quality : n = int 1 -> 32 where 1 is best than 32 )
//FRAME PLAYER PART ( http://vagnervjs.github.io/frame-player/ )
cd converter
node app.js x y folder/to/imgs/ json/video.json
-> x : startImgNumber, y : endImgNumber