~/pim$ php app/console akeneo:batch:job --help
Usage:
akeneo:batch:job [options] [--] <code> [<execution>]
Arguments:
code Job instance code
execution Job execution id
Options:
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
#!/bin/sh | |
# @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4 | |
# @link http://tech.zumba.com/2014/04/14/control-code-quality/ | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed |
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
var CleanWordHTML = function ( str ) | |
{ | |
str = str.replace(/<o:p>\s*<\/o:p>/g, "") ; | |
str = str.replace(/<o:p>.*?<\/o:p>/g, " ") ; | |
str = str.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ; | |
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ; | |
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ; | |
str = str.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ; | |
str = str.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ; | |
str = str.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ; |
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
#! /bin/bash | |
# | |
# backup_redmine.sh | |
# modified by ronan@lespolypodes.com | |
# Inspiration: https://gist.github.com/gabrielkfr/6432185 | |
# | |
# Distributed under terms of the MIT license. | |
# -- VARS | |
DAY=`date +"%Y%m%d"` |
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
#! /bin/bash | |
# | |
# slugify.sh by Ronan | |
# | |
# Distributed under terms of the MIT license. | |
# | |
cd photos | |
for file in *.png; do | |
filename=${file%.*} |
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 | |
namespace Application\Sonata\PageBundle\Block\Service; | |
use Sonata\BlockBundle\Block\BlockContextInterface; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; | |
use Sonata\AdminBundle\Form\FormMapper; | |
use Sonata\AdminBundle\Validator\ErrorElement; |
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
#!/bin/bash | |
# disk-usage from docker-experiments | |
# https://github.com/rsp/docker-experiments | |
# by Rafał Pocztarski - https://github.com/rsp | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 \"image1 image2 ...\"" | |
exit 1 | |
fi |
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
//parent.html | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script> | |
<script type="text/javascript"> | |
window.addEventListener("message", receiveSize, false); | |
function receiveSize(e) { | |
//console.log("parent: message received", e); |
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
#! /bin/bash | |
# | |
# install.sh | |
# Distributed under terms of the MIT license. | |
# Usage: $ install.sh | |
# Need a github-oauth.github.com in your global composer conf | |
LAST_TAG_NAME=$(curl -s https://api.github.com/repos/akeneo/pim-community-standard/tags | python -c 'import sys, json; print json.load(sys.stdin)[0]["name"]') | |
LAST_TAG_URL=$(curl -s https://api.github.com/repos/akeneo/pim-community-standard/tags | python -c 'import sys, json; print json.load(sys.stdin)[0]["zipball_url"]') | |
CURL_URL=$LAST_TAG_URL?access_token=$GITHUB_TOKEN |
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
$.fn.filterNode = function(name) { | |
return this.find('*').filter(function() { | |
return this.nodeName === name; | |
}); | |
}; | |
// example: 'http://www.emsc-csem.org/service/rss/rss.php?typ=emsc&min_lat=10&min_long=-30&max_long=65'; | |
// (EMSC - Last 50 earthquakes in euro mediteranean region) | |
function handleRSS(url) { | |
$.ajax({ |
NewerOlder