Skip to content

Instantly share code, notes, and snippets.

View djvdorp's full-sized avatar

Daniel van Dorp djvdorp

View GitHub Profile
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@djvdorp
djvdorp / gist:1b3de9b2f915acc74c5b
Last active August 29, 2015 14:12 — forked from shakalaca/gist:4942cfb8a4869325cdc9
Howto: compile mkbootimg/mkbootfs/make_ext4fs on OS X
mkdir source
mkdir bin
# clone source
cd source
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/libselinux
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/core
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/external/zlib
git clone --branch android-4.3_r3 https://android.googlesource.com/platform/system/extras
# set public key
# update VM
sudo apt-get update
# JAVA installation
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java7-installer && sudo apt-get install oracle-java7-set-default
# install git
sudo apt-get install git zip ant
@djvdorp
djvdorp / php-fpm-cli
Last active August 29, 2015 14:26 — forked from muhqu/php-fpm-cli
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@djvdorp
djvdorp / Vagrantfile
Created February 12, 2016 13:17 — forked from halcyonCorsair/Vagrantfile
A json file for chef-solo, and the equivalent Vagrantfile to setup koha
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
@djvdorp
djvdorp / 95-lolcat
Created February 18, 2016 12:34 — forked from dorentus/95-lolcat
dynamically generated /etc/motd using fortune, cowsay & lolcat,save it as /etc/update-motd.d/95-lolcat.Google `pam_motd` or `update-motd` for more details of dynamically generated message-of-the-day.
#!/bin/bash
# see: http://blog.tomtung.com/2009/11/cowsay-fortune
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed
# https://github.com/busyloop/lolcat
# https://github.com/dorentus/mruby-lolcat-bin
#
# requires `fortune`, `cowsay`,
# and ruby gem `lolcat` or its mruby version equivalent
export LANG="en_US.UTF-8"
@djvdorp
djvdorp / htpasswd.py
Created March 1, 2016 09:27 — forked from guerrerocarlos/htpasswd.py
Python script for generating htaccess passwords
#!/usr/bin/python
"""Replacement for htpasswd"""
# Original author: Eli Carter
import os
import sys
import random
from optparse import OptionParser
# We need a crypt module, but Windows doesn't have one by default. Try to find
@djvdorp
djvdorp / nginx-custom-build.sh
Created March 25, 2016 12:50
Build Ubuntu or Debian packages for nginx with custom patches, configs, and name suffixes in one command
#!/bin/bash
# Author: Alexander Rodin <rodin.alexander@gmail.com>
# License: MIT
BUILD_DIR=build
while getopts "hp:s:r:b:o:c:n" opt; do
case $opt in
h)
echo "Usage: $0 [options]"
@djvdorp
djvdorp / .golang-example-gitlab-ci.yml
Created April 12, 2016 09:29 — forked from mikeatlas/.golang-example-gitlab-ci.yml
Example Go GitLab CI setup (no root/sudo required)
# See docs/examples
# http://doc.gitlab.com/ce/ci/quick_start/README.html
# http://doc.gitlab.com/ce/ci/yaml/README.html
# GitLab CI template for Go tests. Note this installs
# a new working copy of Go in a non-standard path such
# that sudo/root is not needed for the install stage.
# note that this particular install-environment stage
# is overly verbose in order to debug anything tricky
@djvdorp
djvdorp / README.md
Created August 30, 2016 08:03 — forked from actionjack/README.md
How to Review Changes between Cloud Foundry Releases

How to Review Changes between Cloud Foundry Releases

This gist decribes a recommended way to review the differences between Cloud Foundry releases so they can be applied to our environments.

There are multiple ways listed to check the differences but typically you want to

  • Use git diff to see what has changed between release branches
  • Check the spec files to see the default options of the items that have been introduced or changed
  • Generate two Cloud Foundry manifests from each release and compare the two using spiff diff