Skip to content

Instantly share code, notes, and snippets.

@rdoursenaud
rdoursenaud / shinken.conf
Last active November 14, 2015 09:32
Shinken nginx reverse proxy configuration
# Reverse proxy for Shinken 2.0.x on Debian Wheezy
# Place this file under /etc/nginx/sites-available
# Update your server_name
# Don't forget to enable the config and reload nginx
# Enjoy ^^
server {
# IPv4 support
listen 80;
# IPv6 support
listen [::]:80;
#!/bin/bash
# Inplace mode added by Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
INPLACE='0'
max_input_size=0
max_output_size=0
@rdoursenaud
rdoursenaud / deletecontactgroups.gs
Created August 28, 2014 15:08
Google Apps Script - Delete all contact groups
function deleteContactGroups() {
var groups = ContactsApp.getContactGroups();
Logger.log("total: " + groups.length);
for (var i = 0; i < groups.length; i++) {
if (!groups[i].isSystemGroup()){
groups[i].deleteGroup()
Logger.log("deleting: " + groups[i].getName() );
}
}
@rdoursenaud
rdoursenaud / otrs.conf
Created May 20, 2015 08:37
OTRS FCGIWRAP SSL+HSTS NGINX configuration
server {
listen 443 ssl;
listen [::]:443 ssl;
keepalive_timeout 70;
server_name otrs.example.com;
root /opt/otrs/var/httpd/htdocs;
index index.html;
# SSL
@rdoursenaud
rdoursenaud / .multitailrc
Created June 11, 2015 13:18
Multitail configuration for Dolibarr syslog
colorscheme:dolibarr
bright:1
cs_re:yellow,red:.*EMERG.*
cs_re:white,red:.*ALERT.*
cs_re:green,red:.*CRIT.*
cs_re:red:.*ERR.*
cs_re:white,yellow:.*WARNING.*
cs_re:green,yellow:.*NOTICE.*
cs_re:green:.*INFO.*
cs_re:white:.*DEBUG.*
@rdoursenaud
rdoursenaud / markdown.css
Last active August 29, 2015 14:27 — forked from imjasonh/markdown.css
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@rdoursenaud
rdoursenaud / demo.php
Last active February 11, 2016 19:29
Weird PHP7 behavior when calling class property from array key
<?php
// Run with PHP 5.x and 7.x to see the differences.
// SETUP
class Test {
var $property = 1;
}
$array = [
0 => 'property'
@rdoursenaud
rdoursenaud / keybase.md
Last active August 2, 2016 22:05
keybase.md

Keybase proof

I hereby claim:

  • I am rdoursenaud on github.
  • I am rdoursenaud (https://keybase.io/rdoursenaud) on keybase.
  • I have a public key ASCsNpaBh2xvtMNUop2jBO2Ga1LjKg_gOrMjHWHtfXoiGQo

To claim this, I am signing this object:

@rdoursenaud
rdoursenaud / extract.sh
Created October 12, 2016 11:11
Extract a directory based GIT repository to separate repositories keeping all branches and history
#!/bin/sh
# Copyright (C) 2016 Raphaël Doursenaud
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@rdoursenaud
rdoursenaud / gae-test-skip-files.py
Created October 20, 2016 15:25
Test Google App Engine app.yaml skip-files regexes without deploying
#!/usr/bin/env python2.7
# encoding=utf8
#
# Copyright 2007 Google Inc.
# Copyright 2016 Raphaël Doursenaud
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#