This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# a bash script (need imagemagick >6.8.3-10, zip, unzip, unrar) who will convert pictures for pocketbook with an inteligent minimal weight | |
# create UNARCHIVED folder | |
# create TRANSFORMED folder | |
# create OUTPUT folder | |
# | |
# for archive file | |
# unarchive in new folder in UNARCHIVED with name file - ext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void printRS(ResultSet rs) throws SQLException { | |
List<String> header = new ArrayList<>(); | |
Map<Integer, Integer> max = new HashMap<>(); | |
// generate header map | |
ResultSetMetaData meta = rs.getMetaData(); | |
for (int i = 1; i <= meta.getColumnCount(); i++) { | |
String collumn = meta.getColumnName(i); | |
// compute max column width |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: Purexo | |
* Date: 08/03/17 | |
* Time: 10:45 | |
*/ | |
namespace VillageBundle\Utils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handlerStorage = { | |
get(target, key) { | |
const value = target.getItem(key); | |
try { | |
return JSON.parse(value); | |
} catch (e) { | |
return value; | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Default Parameters | |
pattern="*.svg" | |
output="./svgtopng-output" | |
x=false | |
width="128" | |
y=false | |
height="128" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CandiBox 1 - AutoSave | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Purexo | |
// @require https://gist.githubusercontent.com/purexo/0d27aad481158047ae852dc10d779cd9/raw/bc931c67e74d5d9d9d205ea456bc52d64f94e124/SimpleEventManager.js | |
// @include http://candies.aniwey.net/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* SimpleEventManager is a simple API for create and listen Event | |
* It's a superset of DOM Event listening API | |
* | |
* Example : | |
let event = new SimpleEventManager(function(lastState) { | |
// watched variable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Particule { | |
class Color extends Sup.Color { | |
static random () { | |
let Random = Sup.Math.Random; | |
return new Color( | |
Random.integer(0, 100) / 100, | |
Random.integer(0, 100) / 100, | |
Random.integer(0, 100) / 100 | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Sound { | |
export interface contructorSoundController { | |
MUSIC_PATH: string; | |
SOUND_PATH: string; | |
// musics['category']['nom'] = 'relative/path/from/MUSIC_PATH' | |
// tableau associatif de tableau associatif | |
musics: { | |
[index: string]: { | |
[index: string] : string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author : Purexo | |
* @description : Binding localStorage API to extend the key -> value functionnality with JSON api | |
* when setItem, data is stringify | |
* when getItem, data is parsed | |
* @usage : | |
* ls.setItem('key', data) | |
* ls.getItem('key', data) | |
* ls.removeItem('key') | |
* ls.key('index') |
NewerOlder