Skip to content

Instantly share code, notes, and snippets.

View fprieur's full-sized avatar

Fred Prieur fprieur

  • Ubisoft
  • Montreal
View GitHub Profile
@fprieur
fprieur / ParseSample.java
Created September 21, 2018 22:18 — forked from marcel-dias/ParseSample.java
SnakeYAML Parse Example
package com.marceldias.mars.yaml;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import org.yaml.snakeyaml.TypeDescription;
import org.yaml.snakeyaml.Yaml;
@fprieur
fprieur / CreateJob.sh
Created July 25, 2016 01:20 — forked from stuart-warren/CreateJob.sh
Create a job in Jenkins (or folder) using the HTTP API
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder
@fprieur
fprieur / Jenkinsfile
Created July 25, 2016 00:42 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
#!/bin/sh
BOOT2DOCKER_CERTS_DIR=/var/lib/boot2docker/certs
CERTS_DIR=/etc/ssl/certs
CAFILE=${CERTS_DIR}/ca-certificates.crt
for cert in $(/bin/ls -1 ${BOOT2DOCKER_CERTS_DIR}); do
SRC_CERT_FILE=${BOOT2DOCKER_CERTS_DIR}/${cert}
CERT_FILE=${CERTS_DIR}/${cert}
HASH_FILE=${CERTS_DIR}/$(/usr/local/bin/openssl x509 -noout -hash -in ${SRC_CERT_FILE} 2>/dev/null)
@fprieur
fprieur / iterm2-solarized.md
Created January 21, 2016 00:47 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@fprieur
fprieur / Vagrantfile
Created January 18, 2016 22:10 — forked from anthonysterling/Vagrantfile
Handy Vagrantfile for IE testing with Vagrant.
# Usage: IE={box} vagrant up
#
# Eg. IE=XPIE6 vagrant up
boxes = {
"XPIE6" => "http://aka.ms/vagrant-xp-ie6",
"XPIE8" => "http://aka.ms/vagrant-xp-ie8",
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7",
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8",
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9",
@fprieur
fprieur / gist:6d90389acee1ade2ad20
Created October 30, 2015 18:18 — forked from ehazlett/gist:9241844
OpenShift Origin AWS

OpenShift Origin in AWS

This describes deploying and running OpenShift Origin in Amazon Web Services.

This is based upon the code and installer on 2014-02-26 so YMMV.

We will be using a VPC for deployment in us-east-1 and Route53 for DNS. I will leave the VPC setup as an exercise for the reader.

Prerequisites

  • AWS Account
  • VPC
LINKS:
https://us.pycon.org/2013/about/what-is-pycon/
http://juliaelman.com/blog/2012/mar/13/my-first-pycon/
http://pydanny.blogspot.com/2011/01/why-you-should-go-to-pycon.html
http://jessenoller.com/2011/09/23/pycon-2012-sponsorship-making-the-case-for-sponsorship/
https://us.pycon.org/2013/sponsors/whysponsor/
Goal of this document: Provide a compelling case for why companies should send their employees to PyCon. Ideally tie into stories like this: http://pycon.blogspot.com/2012/09/pycon-us-2013-highlighting-aweber.html and http://pycon.blogspot.com/2012/09/pycon-us-2013-highlighting-dreamhost.html
This document will be converted to markdown/html and posted to the PyCon website and the PyCon blog.
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Syntaxes/CoffeeScript.tmLanguage
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Preferences/CoffeeScript.tmPreferences
@fprieur
fprieur / gist:6009243
Last active December 19, 2015 19:49 — forked from liamdon/gist:2467603
Packages pour sublime text pour CoffeeScript Jade et Stylus

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus

Step 2: Restart Sublime Text 2