Skip to content

Instantly share code, notes, and snippets.

View cdekok's full-sized avatar

Chris de Kok cdekok

  • Picturae
  • the Netherlands
View GitHub Profile
@cdekok
cdekok / docker-reverse-proxy
Created August 29, 2017 07:37
Docker reverse proxy for localhost dns
exists()
{
command -v "$1" >/dev/null 2>&1
}
if exists dnsmasq; then
echo 'Your system already has dnsmasq installed skipping install'
else
echo 'brew install dnsmasq'
brew install dnsmasq
FROM ubuntu:16.04
MAINTAINER BDLSS, Bodleian Libraries, Oxford University <calvin.butcher@bodleian.ox.ac.uk>
ENV HOME /root
# Update packages and install tools
RUN apt-get update -y && apt-get install -y build-essential wget cmake make git apache2 libapache2-mod-fcgid openssl libssl-dev autoconf libfcgi0ldbl libtool libjpeg-turbo8 libjpeg-turbo8-dev libtiff5-dev libpng12-0 libpng12-dev libmemcached-dev memcached liblcms2-2 liblcms2-dev libgomp1 libpthread-stubs0-dev liblzma5 liblzma-dev libjbig-dev libjbig0 libz80ex1 libz80ex-dev pkg-config
# Download and compile openjpeg2.1
WORKDIR /tmp/openjpeg
@cdekok
cdekok / # php70-mongodb - 2016-11-17_13-30-20.txt
Created November 18, 2016 07:55
php70-mongodb (homebrew/php/php70-mongodb) on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for homebrew/php/php70-mongodb on macOS 10.11.6
Build date: 2016-11-17 13:30:20
@cdekok
cdekok / gist:b67895f7648404dc2778
Last active August 29, 2015 14:24
Change domain wp_options table in Wordpress
<?php
/**
* Script te replace domain in serialized arrays in Wordpress
* a simple sql replace is not enough :(
**/
if (PHP_SAPI !== 'cli') {
exit('CLI ONLY');
}
{
"name": "example-js-app",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "browserify -t reactify -r react -r ./src/mediabank > ../php-app/js/bundle.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"use strict";
var gulp = require('gulp');
var gutil = require('gulp-util');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var watchify = require('watchify');
var browserify = require('browserify');
var livereload = require('gulp-livereload');
@cdekok
cdekok / Dockerfile.php-5.5
Created September 1, 2013 16:38
PHP 5.5 / Apache 2.4 Dockerfile
# Build file for lamp server
# To build:
# 1) Install docker (http://docker.io)
# 2) Build: sudo docker build -t chris/php-5.5 .
# 3) Run: sudo docker run -i -t -v /var/www:/var/www chris/php-5.5 /bin/bash
# with the -v you can add a mount in 0.7 you should be able to use -h to provide a static ip
FROM base:ubuntu-12.10
MAINTAINER Chris de Kok <chris.de.kok@gmail.com>
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }