Skip to content

Instantly share code, notes, and snippets.

View heristop's full-sized avatar
🥷

Alexandre Mogère heristop

🥷
View GitHub Profile
pipeline {
agent any
options {
buildDiscarder(logRotator(daysToKeepStr: '1'))
}
stages {
stage('Deploy CronJobs') {
steps {
@heristop
heristop / openshift-gitflow-pipeline.jenkinsfile
Last active February 13, 2023 11:16
OpenShift Gitflow sample with Jenkins pipeline
pipeline {
agent any
options {
buildDiscarder(logRotator(daysToKeepStr: '4'))
}
stages {
stage('Configure env') {
steps {
@heristop
heristop / KpiComparatorBehavior.php
Last active August 29, 2015 14:18
[SonataAdmin] Create a KPI block with progress bar #AdminLTE #propel
<?php
/**
* This file is part of TaladStatsBundle.
*
*/
class KpiComparatorBehavior extends Behavior
{
public function queryMethods($builder)
@heristop
heristop / sonata_edit.js
Last active August 29, 2015 14:18
[SonataAdmin] Show the save button on scroll down
$(document).ready(function() {
/** Update button **/
if (null !== location.pathname.match(/\/edit/)) {
$(window).scroll(function() {
if ($(window).height() + $(window).scrollTop() > $(document).height() - 10 || $(this).scrollTop() < 100) {
$('#save-button').fadeOut();
}
else {
$('#save-button').fadeIn();
@heristop
heristop / autoTranslate.php
Last active July 1, 2016 06:40
Use Google Translate API through YQL
<?php
trait autoTranslate
{
protected
$lang1,
$lang2
;
protected function translate($text)