Skip to content

Instantly share code, notes, and snippets.

View NoodlesNZ's full-sized avatar

Nick Le Mouton NoodlesNZ

View GitHub Profile
@NoodlesNZ
NoodlesNZ / ca.pp
Created May 29, 2018 03:03
Puppet EPP
define openvpn::ca (
String $country,
String $province,
String $city,
String $organization,
String $email,
String $common_name = 'server',
Optional[String] $group = undef,
Integer $ssl_key_size = 2048,
Integer $ca_expire = 3650,
@NoodlesNZ
NoodlesNZ / Jenkinsfile
Created April 11, 2017 23:08
PHP Pipeline
pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout scm
sh 'rm -rf build/{logs,pdepend}'
@NoodlesNZ
NoodlesNZ / build.xml
Last active August 29, 2015 14:24
Jenkins phpcs
<?xml version="1.0" encoding="UTF-8"?>
<project name="projectname" default="build">
<!-- Check for checkstyle report from previous build -->
<available file="${basedir}/build/logs/checkstyle.xml" type="file"
property="phpcs.checkstyle.exists"/>
<target name="build"
depends="prepare,lint,tools-parallel"/>
### Keybase proof
I hereby claim:
* I am noodlesnz on github.
* I am noodlesnz (https://keybase.io/noodlesnz) on keybase.
* I have a public key whose fingerprint is 34B4 71EE A0AA 960C AAAC D014 D0D6 D57B F3A1 DFB5
To claim this, I am signing this object:
@NoodlesNZ
NoodlesNZ / gist:4fb1f50b4825215f2192
Last active August 29, 2015 14:21
GPT missing tag
googletag.pubads().addEventListener('slotRenderEnded', function(event) {
if(!document.getElementById(event.slot.getSlotId().getDomId())){
console.log('missing div ' + event.size);
//send to logging ajax
}
});
@NoodlesNZ
NoodlesNZ / kibana.init
Created March 6, 2015 02:59
Kibana init script
#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Kibana 4"
NAME=kibana
DAEMON=/home/kibana/bin/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
LOG=/var/log/kibana.log
#!/bin/sh
#
# /etc/init.d/logstash-forwarder
#
# Starts and stops logstash-forwader as a "daemon".
#
# chkconfig: 2345 30 70
# description: Starts and stops logstash-forwarder as a daemon.
# The name of this service
@NoodlesNZ
NoodlesNZ / optimize_jpeg.pl
Last active December 28, 2015 20:19
Updated to use threads
#!/usr/bin/perl
#
# Lossless optimization for all JPEG files in a directory
#
# This script uses techniques described in this article about the use
# of jpegtran: http://www.phpied.com/installing-jpegtran-mac-unix-linux/
#
use strict;
@NoodlesNZ
NoodlesNZ / extract.pl
Created October 2, 2013 02:56
Extract from mysqldump. Based on http://www.mariusv.com/extract-one-table-from-mysql-dump/ but edited for our backup style (schema and data separate)
#!/usr/bin/perl -w
##############################################################################
##
## Disclaimer:
## This program is provided with no warranty of any kind, either expressed or
## implied. It is the responsibility of the user (you) to fully research and
## comprehend the usage of this program. As with any tool, it can be misused,
## either intentionally (you're a vandal) or unintentionally (you're a moron).
## THE AUTHOR(S) IS(ARE) NOT RESPONSIBLE FOR ANYTHING YOU DO WITH THIS PROGRAM
## or anything that happens because of your use (or misuse) of this program,