Just another web 3.0 blog :: prev - next

--- FFmpeg group files by encoding ---

destinationFOlder=~/desktop #list files recursively within folder, group them by specs x=`find . -type f -size +20M`;rm *.list;for i in $x;do ffprobe -hide_banner -loglevel fatal -show_error -show_format -show_streams -print_format json $i >info.txt; j=`php -r '$x=file_get_contents($argv[1]);if(!trim($x))die;$x=json_decode($x,1);if(!$x)die;$x=[$x["format"]["format_name"],$x["streams"][0]["codec_name"],$x["streams"][0]["width"],$x["streams"][0]["height"],$x["streams"][0]["r_frame_rate"]];echo preg_replace("~[^a-z0-9.-_]+~i","",implode("-",$x));' info.txt`; ');" onmouseout="HT()">$i);$ef=end($ef);if(substr($ef,0,2)!="dd"){$i2=str_replace($ef,"dd".date("Ymd-His",filemtime($i))."-drn-".preg_replace("~[^a-z0-9.-_]+~i","",$ef),$i);rename($i,$i2);die($i2);}die($i);' $i $j`; echo ">$i>$j";echo "file '$i'" >> $j.list; done; #-- then foreach list concat those files x=`find . -name *.list`; for list in $x; do php -r '$list=$argv[1];$x=explode(" ",file_get_contents($list));asort($x);file_put_contents($list,trim(implode(" ",$x)));' $list reOrdersList;ffmpeg -y -f concat -hide_banner -loglevel error -safe 0 -i $list -c copy -acodec copy $destinationFOlder$list.mp4;done; #final cleanup assemby files php -r '$x=explode(" ",file_get_contents($argv[1]));foreach($x as $v){$v=trim(str_replace(["file ","./"],"",$v),chr(39));unlink($v);echo" del:".$v;}' movmp4m4a3gp3g2mj2-h264-4096-2160-240001001.list cleanupFilesUsedToBeConcatOnceOk

--- Docker Alpine Php Fpm Apache Mysql Selenium Chrome Standalon ---

Docker Image : PHP74

standalone alpine php fpm apache mysql selenium chrome headless

- Easy to configure autonomous Plug & Play virtual machine : - - Dedicaced for high performance / not that much memory avaible so available ram goes straight into caches - 1 single static php-fpm thread to get a single CPU core !! - No shutdown if any apache / php / mysql service stopped - /home folder is rsynced with the mapped "home2" folder for better php performance - Mysql data persists in volume : /z/mysql/1 - One single static phpFpm thread ( in order to tune the performance ) - Standalone selenium server + headless Chrome for behat / integration tests - Empty memory usage ( with php, apache, mysql, selenium started is : 144 Mo ) - #Recipe : #to build the image docker build -t php74 .; #put it up with volumes and linked files docker-compose up -d php; #enter the machine docker exec -it php bash; #re-start the services ( in cache of apache.conf, php.ini, init.sh modifications ): docker exec -it php bash init.sh; #know what's going on docker exec -it php top To remove intermediate containers created : docker rm -f $(docker ps -aq);

--- Annecy vue aérienne Albigny ---

--- Css sprites dynamic updates ---

Replaces the previous 2007 version, faster, accurate, easy to change + spritesgenerator ( don't miss the run button ) :

--- phpoo++ notfound classes ---

#-notfound.class.php class notfound{ public $data=[];#fs, mais individuelles #appels functions not set function __call($name,$args){ #die("__CALL:".$name.":".print_r(compact('args'),1)); $name=strtolower($name); if(array_key_exists($name,$this->data))return $this->data[$name];#obj->name(); #failsafe for _ method differences $name=strtolower(str_replace('_','',$name)); $matches=[$name,'get'.$name,'set'.$name]; foreach($matches as $method) if(method_exists($this,$method))return $this->$method($args); #aliases $aliases=['gettitre'=>'getnom']; foreach($aliases as $souhait=>$exists) if($name==$souhait && method_exists($this,$exists))return $this->$exists($args); #getters, setters not found $reste=substr($name,3); if(substr($name,0,3)=='get')return $this->$reste; if(substr($name,0,3)=='set')$this->$reste=reset($args); #global namespaces functions if(in_array($name,['ajoutsessionpubaffiliation','create_centre_fiches_offre_fiche']))return; if(function_exists($name))return call_user_func(''.$name,$args[0]); #$f=__FILE__.':'.__LINE__;die('
        return $this;#anyways
    /*private function __construct(){}*/
    function __construct($p=[]){
        if(is_array($p))foreach($p as $k=>$v)$this->$k=$v;#register those parameters if passed
        #$class=static::class;if(!isset(static::$instances[$class]))static::$instances[$class]=$this;else static::$additional[$class][]=$this;
    }#register him anyways, la seconde construction ne sera pas bindée..


function load1($classname) {/*__autoload*/
  static $loaded;if(is_array($loaded)&& in_array($classname,$loaded))return;
  $f = "./". $classname .".php";
  if(is_file($f)){require_once($f);}#but the globals remains nested here forever ..
      eval("class {$classname} extends notfound{};");#;echo',nf:'.$classname;

--- PCRE php regex ---

PCRE php regex

--- Any brighter day yet ---

.. I has been a while .. a real long time since I haven't expressed in written thought in English, perhaps I would feel ashamed of my poor vocabulary or whatever some people say .. 2014 - 2015 have really been shitty years, like being throught a 600 days ++ storm .. No here it is : PHP7-FPM, brand new server, no more errors, all projects cleared, looks like a brand new shinny road ahead .. might be naive, as I'm expecting lots of good things to come for 2016

--- Back office developer Annecy ---

Développement de sites internets, back office, symfony sur Annecy : Back office developer Annecy#

--- webcam annecy haute savoie ---

Quelle météo fait -il en station ? http://a74.fr/z/webcam.php

--- mobius cam fpv oven solder ---

Mobius cam fpv oven trick : http://www.rcgroups.com/forums/showthread.php?t=1904559&page=968 Crashed mobius could lead to weird electronics behaviour due to "cracked" soldering, putting it 5 min @ 190° in the oven might "repair" those connections, as well as "fully compromise the whole electronics". Procedure known as motherboard reflow.

Developpeur php Geneve - php - rando - trip - india - web - php - dev - eco - science - astro - shop - annecy