Skip to content

Instantly share code, notes, and snippets.

View bgaillard's full-sized avatar

Baptiste Gaillard bgaillard

View GitHub Profile
Basic
=====
[Shift]+[Mod]+[Enter] - launch terminal.
[Mod]+[b] - show/hide bar.
[Mod]+[p] - dmenu for running programs like the x-www-browser.
[Mod]+[Enter] - push acive window from stack to master, or pulls last used window from stack onto master.
[Mod] + [j / k] - focus on next/previous window in current tag.
@bgaillard
bgaillard / jenkins-cleanup-old-builds.groovy
Last active July 12, 2021 00:55
Jenkins - Cleanup old builds
import com.cloudbees.hudson.plugins.folder.*;
/**
* Utility function used to delete old builds associated to a Jenkins project.
*
* @param item the current Jenkins item to process, this can be a Folder or a Project
* @param numberOfBuildsToKeep the total number of builds to keep. Please note that one more build could be
* kept if the firt "numberOfBuildsToKeep" builds are all in failed state.
*/
def deleteOldBuilds(item, numberOfBuildsToKeep) {
@jaymecd
jaymecd / php-7_missing_extensions.md
Last active January 29, 2017 09:50
PHP-7: Misssing Extensions

PHP-7: Misssing Extensions

NB! all actions are done on alpine:3.4 within php:7.0.7.

NB! After installation, do not forget to update php.ini with extension={NAME}.so records.

Install build dependencies:

$ apk update
@bgaillard
bgaillard / backup-glacier.sh
Created November 3, 2015 14:47
Backup utilities
#!/bin/sh
########################################################################################################################
# Amazon Glacier Backup Script
#
# Copyright @ 2015 GoMoob
# http://www.gomoob.com
# contact@gomoob.com
#
# Authors :
@aranega
aranega / catsoo.md
Last active April 6, 2017 07:55
CatsooLang documentation

CatsooLang Documentation (under construction...)

What is CatsooLang?

CatsooLang is a little Domain Specific Langage (DSL) that allows you to handle models in a textual programming way into http://www.genmymodel.com. You can handle very low level feature of your model. CatsooLang interpreter is evaluated on the client side only, there is no intensive communication with server (there is some, we will come back on this later). Here is some details about the language:

  • dynamic typed,
  • adhoc polymorphic (function overloading) and type constraints/bounds,
@RudyLu
RudyLu / facebook_strophe.html
Created May 24, 2013 04:58
The sample code of using Strophe.js to connect to facebook chat
<html>
<head>
<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="strophe-102.js" type="text/javascript"></script>
<script src="facebook.js" type="text/javascript"></script>
<script>
var BOSH_SERVICE = 'http://island.csie.org:8273/xmpp-httpbind'
var connection = null;
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@didip
didip / supervisord-example.conf
Created January 30, 2011 05:10
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon