Skip to content

Instantly share code, notes, and snippets.

View skwashd's full-sized avatar
👨‍💻
planning, coding, reviewing

Dave Hall skwashd

👨‍💻
planning, coding, reviewing
View GitHub Profile
@skwashd
skwashd / .travis.yml
Created June 29, 2016 13:05
Incrementally improve your Drupal code
language: php
sudo: false
php:
- 5.6
install:
# Remove xdebug to make composer faster.
- phpenv config-rm xdebug.ini
@skwashd
skwashd / README.md
Last active January 15, 2022 15:29
Auto starting minecraft server in a docker container on Ubuntu 16.04

The better way to do this

During a twitter conversation with itzg, he suggested that I use [docker's built in --restart="unless-stopped" runtime flag] (https://gist.github.com/itzg/36e59186f6195a445f1f1fa2b0087ea9). That worked a treat and means I don't need to maintain an extra service.

My old way of doing it

This is only retained for historic record. Don't follow these steps.

If you want to run a minecraft server in a docker container on Ubuntu 16.04 and have it automatically start at boot, follow these steps:

@skwashd
skwashd / node--blog.tpl.php
Created May 7, 2016 18:11
preprocessor example
<div>
<?php print $name_of_var; ?>
</div>
@skwashd
skwashd / errors
Created April 28, 2016 14:32
DrupalVM with centos7 box
==> mfdev: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/etc/init.d/rpcbind restart; /etc/init.d/nfs restart
Stdout from the command:
@skwashd
skwashd / binary-counter-parts.md
Created April 27, 2016 17:21
Parts list for building a binary counter on a breadboard
@skwashd
skwashd / audit.py
Last active April 27, 2016 16:05
Audit your github pushes
#!/usr/bin/env python
import pprint
import requests
from datetime import datetime
# GitHub Organisation
org = 'my_org'
# GitHub API token
@skwashd
skwashd / .gitignore_global
Last active August 23, 2022 08:55
Global .gitignore configuration for PHP and Python developers
# Save this file as ~/.gitignore_global
# Add the following entry to ~/.gitconfig
#
# [core]
# excludesfile = /Users/dave/.gitignore_global
#
# Compiled source #
###################
*.class
@skwashd
skwashd / github-status.sh
Created January 28, 2016 03:10
Check github status
#!/bin/sh
wget -qO - https://status.github.com | sed -n "s/.*status\-icon\-\(.*\)\.png.*/\1/p"
# red = down
# orange = issues
# green = good
@skwashd
skwashd / Dockerfile
Created November 16, 2015 01:14
Dependencies for Pycrypto on Iron Worker
FROM iron/python:2-dev
RUN apk update && apk upgrade
RUN apk add openssl
RUN apk add alpine-sdk
RUN apk add autoconf
RUN apk add python-dev
@skwashd
skwashd / composer.json
Created November 13, 2015 23:15
Example of composer-patches 2.x composer.json file
{
"require": {
"cweagans/composer-patches": "dev-master",
"drupal/drupal": "8.0.*@dev"
},
"config": {
"preferred-install": "source"
},
"repositories": [{
"type": "vcs",