This file contains 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
/** | |
* http://usejsdoc.org/ | |
*/ | |
(function(){function r(e){return Function("data,subst",n(t(e)))}var e={PATH:1,SELECTOR:2,OBJ_PRED:3,POS_PRED:4,LOGICAL_EXPR:5,COMPARISON_EXPR:6,MATH_EXPR:7,CONCAT_EXPR:8,UNARY_EXPR:9,POS_EXPR:10,LITERAL:11},t=function(){function u(e){r=e.split(""),i=0,s=null,o=r.length;var n=a(),u=P();return u.type!==t.EOP&&z(u),n}function a(){var t=f(),n;while(k("|"))P(),(n||(n=[t])).push(f());return n?{type:e.CONCAT_EXPR,args:n}:t}function f(){return k("(")?l():h()}function l(){M("(");var t=a();M(")");var n=[],r;while(r=c())n.push(r);return n.length?t.type===e.PATH?(t.parts=t.parts.concat(n),t):(n.unshift(t),{type:e.PATH,parts:n}):t}function c(){if(k("["))return v();if(k("{"))return m();if(k("("))return l()}function h(){L()||z(P());var t=!1,n;k("^")?(P(),t=!0):O()&&(n=P().val.substr(1));var r=[],i;while(i=p())r.push(i);return{type:e.PATH,fromRoot:t,subst:n,parts:r}}function p(){return A()?d():c()}function d(){var n=P().val,r=_(),i;if(k("*")||r.type===t.ID||r.type===t.STR)i=P().val;return{type |
This file contains 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 | |
use VDB\Spider\PersistenceHandler\FileSerializedResourcePersistenceHandler as DefaultFileSerializedResourcePersistenceHandler; | |
use Symfony\Component\Finder\Finder; | |
use VDB\Spider\PersistenceHandler\FilePersistenceHandler; | |
use VDB\Spider\Resource; | |
use VDB\Spider\PersistenceHandler\PersistenceHandlerInterface; | |
class FileSerializedResourcePersistenceHandler extends DefaultFileSerializedResourcePersistenceHandler implements PersistenceHandlerInterface{ | |
private $filePrefix=''; |
This file contains 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 | |
use GuzzleHttp\Client; | |
$productUrlPatterns = ["https?://www.ysl.com/fr/shop-product/.*_cod(.*)\.html.*"]; | |
require __DIR__ . '/../vendor/autoload.php'; | |
$headers= [ | |
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36' | |
,'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' | |
,'Accept-Encoding'=> 'gzip, deflate, sdch' | |
,'Upgrade-Insecure-Requests' => 1 | |
,'Accept-Language' => 'fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4,de;q=0.2' |
This file contains 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 | |
$start = microtime(true); | |
use Symfony\Component\DomCrawler\Crawler; | |
use VDB\Spider\Discoverer\XPathExpressionDiscoverer; | |
use VDB\Spider\Downloader\Downloader; | |
use VDB\Spider\QueueManager\InMemoryQueueManager; | |
use VDB\Spider\Spider; | |
use Guzzle\Http\Client as GuzzleClient; | |
use VDB\Spider\RequestHandler\GuzzleRequestHandler; | |
use VDB\Spider\StatsHandler; |
This file contains 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
swagger: '2.0' | |
info: | |
version: v1 | |
title: CMN Api | |
description: >- | |
> Welcome to the _CoachMeNow (*CMN*) API_ Documentation. | |
The document expose self-describing data types (User, Media, Address, etc.) and | |
associated "CRUD resources" useful to access these data. |
This file contains 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
$(document).ready(function() { | |
$.ajaxSetup({ | |
cache: true | |
}); | |
$.getScript('//connect.facebook.net/en_US/sdk.js', function() { | |
FB.init({ | |
appId: 'YOUR APPID', //281707958585235 | |
version: 'v2.8' // or v2.1, v2.2, v2.3, ... | |
}); | |
updateFeeds({privacy:{value:'SELF'}}); |
This file contains 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
(function(){function r(e){return Function("data,subst",n(t(e)))}var e={PATH:1,SELECTOR:2,OBJ_PRED:3,POS_PRED:4,LOGICAL_EXPR:5,COMPARISON_EXPR:6,MATH_EXPR:7,CONCAT_EXPR:8,UNARY_EXPR:9,POS_EXPR:10,LITERAL:11},t=function(){function u(e){r=e.split(""),i=0,s=null,o=r.length;var n=a(),u=P();return u.type!==t.EOP&&z(u),n}function a(){var t=f(),n;while(k("|"))P(),(n||(n=[t])).push(f());return n?{type:e.CONCAT_EXPR,args:n}:t}function f(){return k("(")?l():h()}function l(){M("(");var t=a();M(")");var n=[],r;while(r=c())n.push(r);return n.length?t.type===e.PATH?(t.parts=t.parts.concat(n),t):(n.unshift(t),{type:e.PATH,parts:n}):t}function c(){if(k("["))return v();if(k("{"))return m();if(k("("))return l()}function h(){L()||z(P());var t=!1,n;k("^")?(P(),t=!0):O()&&(n=P().val.substr(1));var r=[],i;while(i=p())r.push(i);return{type:e.PATH,fromRoot:t,subst:n,parts:r}}function p(){return A()?d():c()}function d(){var n=P().val,r=_(),i;if(k("*")||r.type===t.ID||r.type===t.STR)i=P().val;return{type:e.SELECTOR,selector:n,prop:i}}f |
This file contains 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
; extract basename without ext | |
(define (drop-ext str) | |
(unbreakupstr (butlast (strbreakup str ".")) ".") | |
) | |
(define (maxsize img) | |
(max (car (gimp-image-width img)) (car (gimp-image-height img))) | |
) | |
(define (offsets img) |
This file contains 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
(define (drop-ext str) | |
(unbreakupstr (butlast (strbreakup str ".")) ".") | |
) | |
; extract basename without ext | |
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |
( define ( script-fu-whitenbackground | |
sourceDirectory targetDirectory ) | |
( let* | |
( |
NewerOlder