Skip to content

Instantly share code, notes, and snippets.

View vandorjw's full-sized avatar

Joost van Dorp vandorjw

View GitHub Profile
@vandorjw
vandorjw / jenkins.tf
Last active November 30, 2018 14:38
Simple local Jenkins
$ sudo snap install microk8s
$ microk8s.enable dns dashboard ingress
$ nap alias microk8s.kubectl kubectl
$ kubectl config view --raw > $HOME/.kube/config
Download terraform: https://www.terraform.io/downloads.html
class Storage {
/*
* This class exists to handle caching data between a page refresh.
*
* Usage example for setData:
*
* >> let myData = {"brand": "Example Brand", "brand_slug": "example_brand"}
*
* >> let store = new Storage('1', 'brands')
* >> store.setData(myData)
/*
Simple Proxy server using Chrome-Puppeteer.
Can be used by Webspiders to render the HTML elements
on dynamic websites.
*/
const puppeteer = require('puppeteer')
const http = require('http')
const validUrl = require('valid-url');
const url = require('url')
const port = 3000
#!/usr/bin/env groovy
import groovy.json.*;
import java.nio.file.Files;
/**
* GitHubRelease
*/
class GitHubRelease {
String githubToken
#!/usr/bin/env python
import os
import sys
import imaplib
import email
import email.header
import datetime
import boto3
#!/usr/bin/env python3
from datetime import datetime
from ftplib import FTP
from functools import partial
import hashlib
import logging
import os
import sys
import boto3
from botocore.errorfactory import ClientError
@vandorjw
vandorjw / docker-jenkins-us-east-2.json
Last active May 23, 2017 14:24
packer config to create aws ami with docker and jenkins pre-installed
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-2",
The air smells of rhubarb, occasional
Roses, or first birth of blossoms, a fresh,
Undulant hurt, so body snaps and curls
Like flower. I step through snow as thin as script
Watch white stars spin dizzy as drunks, and yearn
To sleep beneath a patchwork quilt of rum.
I want the slow, sure collapse of language
Washed out by alcohol. Lovely Shelley,
I have no use for measured, cadenced verse
If you won’t read. Icarus-Iike, I’ll fall
#!/bin/bash
# -- ********************************************************************************
# -- Description: Example case statements
# -- Version: 0.1
# -- ********************************************************************************
case "$1" in
hello)
echo 'hello'
;;
# file: ~/.profile
case $- in
*i*)
# Interactive session. Try switching to bash.
if [ -z "$BASH" ]; then # do nothing if running under bash already
bash=$(command -v bash)
if [ -x "$bash" ]; then
export SHELL="$bash"
exec "$bash"