Skip to content

Instantly share code, notes, and snippets.

View njt1982's full-sized avatar
Converting Coffee into Code

Nicholas Thompson njt1982

Converting Coffee into Code
View GitHub Profile
@njt1982
njt1982 / nicks-bedrock-tweaks-downloader.sh
Last active September 3, 2022 22:42
Script for "bookmarking" my favourite https://bedrocktweaks.net/resource-packs downloads
#!/bin/bash -x
PACKS=(
"aesthetic:different_stems"
"terrain:circular_sun_and_moon"
"variation:variated_bookshelves"
"peace_and_quiet:quieter_bees"
"peace_and_quiet:quieter_cows"
"peace_and_quiet:quieter_ghasts"
"peace_and_quiet:quieter_sheep"
@njt1982
njt1982 / phpbrew.sh
Last active June 24, 2022 09:28
Building PHP 5.6 and 7.x on OSX Mojave and Catalina (with Homebrew for dependencies)
# Switch out 5.6 for required version
phpbrew install -j $(nproc) 5.6 +default +mysql +fpm +gd \
+bz2="$(brew --prefix bzip2)" \
+curl="$(brew --prefix curl-openssl)" \
+zlib="$(brew --prefix zlib)"
# PHP 7.2 needed some tweaks (the mirror and the X11 thing (which helps GD compile))
@njt1982
njt1982 / log_since_last_tag
Created April 24, 2017 15:19
Git Log Since Lat Tag
#!/bin/bash
if [ -z "$1" ]
then
TAG=$(git describe --abbrev=0 --tags)
else
TAG="$1"
fi
if [ -z "$2" ]
then
@njt1982
njt1982 / # percona-server - 2016-12-19_13-11-47.txt
Created December 19, 2016 13:24
percona-server on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for percona-server on macOS 10.11.6
Build date: 2016-12-19 13:11:47
@njt1982
njt1982 / dump.sql
Last active June 12, 2016 23:39
Stock Drupal 7.43 SQL Dump
-- MySQL dump 10.13 Distrib 5.7.11-4, for osx10.11 (x86_64)
--
-- Host: localhost Database: drupal_d7
-- ------------------------------------------------------
-- Server version 5.7.11-4
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
# See: https://github.com/drush-ops/drush/blob/master/examples/example.make.yml
core: "7.x"
api: 2
projects:
drupal:
version: ~
defaults:
@njt1982
njt1982 / gist:dd1c533142639aed7d25
Created March 18, 2015 12:47
VarnishADM Reload helper

Basically:

  • Switch to a different conf (you cannot discard / reload an active conf)
  • Discard it
  • Reload it into a name
  • Use that name
vcl.use boot
vcl.discard reload01
@njt1982
njt1982 / clean-settings.sh
Created January 7, 2015 12:38
Drupal - Make Clean Settings.php file
#!/bin/sh
grep -vE '^(#|\/| \*)' default.settings.php | sed '/^\s*$/d' > settings.php
@njt1982
njt1982 / Borked Internet
Created October 26, 2014 21:07
Pings aren't great...
$ ping google.co.uk
PING google.co.uk (74.125.230.127): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
64 bytes from 74.125.230.127: icmp_seq=1 ttl=54 time=4025.251 ms
64 bytes from 74.125.230.127: icmp_seq=2 ttl=54 time=3040.001 ms
64 bytes from 74.125.230.127: icmp_seq=3 ttl=54 time=2103.742 ms
@njt1982
njt1982 / keybase.md
Created October 20, 2014 15:34
KeyBase.io proof

Keybase proof

I hereby claim:

  • I am njt1982 on github.
  • I am njt1982 (https://keybase.io/njt1982) on keybase.
  • I have a public key whose fingerprint is 907A 2485 7EF0 D11C F390 FF7E 4C6F CE31 94FB E84B

To claim this, I am signing this object: