Skip to content

Instantly share code, notes, and snippets.

View wouterds's full-sized avatar
:octocat:
Hello world!

Wouter wouterds

:octocat:
Hello world!
View GitHub Profile
@wouterds
wouterds / config.txt
Last active May 30, 2017 11:47
Pi Zero W Overclocking
# 10% overclock
arm_freq=1100
over_voltage=8
sdram_freq=500
sdram_over_voltage=2
force_turbo=1
boot_delay=1
@wouterds
wouterds / generate-dev-certificate.sh
Last active May 2, 2017 12:35
Script to generate self signed certificate working with Chrome 58+
#!/bin/bash
if [ ! -d "./ssl" ]; then
mkdir ./ssl
fi
# Hostname
HOSTNAME=$1
# Fallback to "server" if no hostname provided
@wouterds
wouterds / Math.php
Created January 31, 2017 14:33
PHP math util to get Fibonacci number for given index and test given number against Fibonacci sequence.
<?php
class Math
{
/**
* Is given number a perfect square?
*
* @param int $n
* @return boolean
*/
@wouterds
wouterds / build_nginx.sh
Last active November 19, 2017 13:14 — forked from MattWilcox/build_nginx.sh
Fetch, build, and install the latest nginx with the latest OpenSSL for RaspberryPi
#!/usr/bin/env bash
# names of latest versions of each package
export VERSION_PCRE=pcre-8.39
export VERSION_OPENSSL=openssl-1.0.2d
export VERSION_NGINX=nginx-1.9.7
# URLs to the source directories
export SOURCE_OPENSSL=https://www.openssl.org/source/
export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
@wouterds
wouterds / ruby-version-premailer-bug.md
Last active April 20, 2016 16:23
Premailer bugs when using ruby versions <= 2.0

Ruby version premailer bug

Ruby 2.3 (correct)

Information

Screenshot 1

Screenshot 2

@wouterds
wouterds / install-php7.sh
Last active March 20, 2016 22:38
PHP 7.0.4 (release) on Debian 8 (works on Raspbian Jessie)
#!/bin/bash
set -e
PHP_VERSION=7.0.4
# Dependencies
apt-get update
apt-get install -y \
@wouterds
wouterds / install-node-9.4.sh
Last active January 17, 2018 22:39
Install node 9.4 on Raspberry Pi
#!/usr/bin/env bash
VERSION=v9.4.0
ARCH=armv6l
wget https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-${ARCH}.tar.gz
tar xf node-${VERSION}-linux-${ARCH}.tar.gz
rm -f node-${VERSION}-linux-${ARCH}/*
pushd node-${VERSION}-linux-${ARCH}/
sudo cp -R * /usr/local/
@wouterds
wouterds / install-nginx-1.9.9.sh
Last active February 24, 2017 01:10
Install nginx 1.9.9 on Raspberry Pi
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.9.9
export VERSION_PCRE=pcre-8.38
export VERSION_LIBRESSL=libressl-2.3.1
export VERSION_NGINX=nginx-$NGINX_VERSION
# URLs to the source directories
export SOURCE_LIBRESSL=ftp://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
<?php
namespace Demo;
use League\Flysystem\Filesystem;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@wouterds
wouterds / mdb2sql.sh
Last active October 27, 2015 19:49 — forked from turicas/mdb2sql.sh
Convert a MDB (Access) file to SQL
#!/bin/bash
# Convert a MDB file (Access) to SQL
# Needs mdbtools[http://mdbtools.sourceforge.net/]
# run 'aptitude install mdbtools' on Debian/Ubuntu
# Created by Álvaro Justen <https://github.com/turicas>
# Modified by Gabriel Florit to run on Mac OS X
# License: GPLv2
mdb=$1
sql=$2