Skip to content

Instantly share code, notes, and snippets.

🌊
absolutely crushing it

Toby Fleming tobywf

🌊
absolutely crushing it
Block or report user

Report or block tobywf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f8cdc5bdcc99e6228b324daafe0ba113
[06:40:48] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[06:40:48] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 171 mods : cyclopscore@0.11.6,p455w0rdslib@2.0.29,astralsorcery@1.9.1,enderiointegrationforestry@5.0.26,netherportalfix@5.3.13,binniecore@2.5.0.167,universalmodifiers@1.12.2-1.0.9a,rftools@7.54,cofhcore@4.5.2,draconicevolution@2.3.11,thermalinnovation@0.3.0,modnametooltip@1.10.0,endercore@1.12.2-0.5.31,thaumicjei@1.2.1,reborncore@3.8.9.300,jeibees@0.9.0.5,ctm@MC1.12-0.3.0.15,controlling@3.0.6,cookingforblockheads@6.4.40,xnet@1.7.1,placebo@1.4.0,reauth@3.6.0,rangedpumps@0.5,bookshelf@2.3.552,forgelin@1.7.4,ironbackpacks@1.12.2-3.0.8-12,stg@1.12.2-1.2.3,wct@3.9.67,cofhworld@1.2.0,darkutils@1.8.211,betterbuilderswands@0.11.1,morpheus@1.12-3.3.2,ftblib@5.2.0.23,enderioconduitsrefinedstorage@5.0.26,redstonearsenal@2.5.1,guideapi@1.12-2.1.5-60,jeresources@0.8.6.28,thaumcraft@6.1.BETA16,mcmultipart@2.5.1,mcjtylib_ng@3.0.2,enderioconduits@5.0.26,mob_grinding_utils@0.3.6,twil
View gist:0dd1f6c85db9865b25412e52117ad36d
[08:16:14] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: <player_redacted> has made the advancement [The Third 'S' is Silent]
[08:16:14] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: <player_redacted> has made the advancement [Geologically Mechanical]
[08:16:26] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: <player_redacted> has made the advancement [Semi-Autogenous Grinding]
[08:22:25] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: <player_redacted> has made the advancement [Alloys and Enemies]
[08:28:59] [Server thread/WARN] [net.minecraft.server.MinecraftServer]: Can't keep up! Did the system time change, or is the server overloaded? Running 2640ms behind, skipping 52 tick(s)
[08:34:59] [Server thread/FATAL] [net.minecraft.server.MinecraftServer]: Error executing task
java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.jav
@tobywf
tobywf / config.yml
Created Jan 29, 2018
My SVGO configuration file
View config.yml
multipass: true
plugins:
- removeDoctype
- removeXMLProcInst
- removeComments
- removeMetadata
- removeXMLNS
- removeEditorsNSData
- cleanupAttrs
- minifyStyles
@tobywf
tobywf / make-test-repo.sh
Created Jan 25, 2018
A script to generate a test repo with two feature branches for the git merge vs git rebase tutorial
View make-test-repo.sh
#!/bin/bash
set -eux
create_commit() {
git checkout "$1"
echo "$2" > src.txt
git commit -am "$2"
git log --graph --pretty=format:'%s %C(yellow)%d%Creset'
sleep 2 # make the commits distinctive in time
@tobywf
tobywf / clean_old_lambda_versions.py
Last active Jun 28, 2019
A quick script to remove old AWS Lambda function versions
View clean_old_lambda_versions.py
from __future__ import absolute_import, print_function, unicode_literals
import boto3
def clean_old_lambda_versions():
client = boto3.client('lambda')
functions = client.list_functions()['Functions']
for function in functions:
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions']
for version in versions:
@tobywf
tobywf / generate-newline-csvs.py
Last active Aug 19, 2017
Generate CSV files with all permutations of common line endings
View generate-newline-csvs.py
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from itertools import product
import sys
try:
encoding = sys.argv[1]
except IndexError:
encoding = 'utf-8'
@tobywf
tobywf / unicode-csv-excel.py
Created Aug 19, 2017
Generate a UTF-8 comma separated value (CSV) file that Excel reads reliably (Python 3, obvs)
View unicode-csv-excel.py
import csv
with open('test.csv', 'w', encoding='utf-8-sig', newline='') as fp:
writer = csv.writer(fp)
writer.writerow(['Row', 'Emoji'])
for i, emoji in enumerate(['🎅', '🤔', '😎']):
writer.writerow([str(i), emoji])
@tobywf
tobywf / unicode-csv-excel-legacy-python.py
Created Aug 19, 2017
Generate a UTF-8 comma separated value (CSV) file that Excel reads reliably (Legacy Python 2, shame)
View unicode-csv-excel-legacy-python.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from backports import csv
from io import open
with open('test.csv', 'w', encoding='utf-8-sig', newline='') as fp:
writer = csv.writer(fp)
writer.writerow(['Row', 'Emoji'])
for i, emoji in enumerate(['🎅', '🤔', '😎']):
writer.writerow([str(i), emoji])
@tobywf
tobywf / boto3-gzip.py
Last active Jun 20, 2019
GZIP compressing files for S3 uploads with boto3
View boto3-gzip.py
from io import BytesIO
import gzip
import shutil
def upload_gzipped(bucket, key, fp, compressed_fp=None, content_type='text/plain'):
"""Compress and upload the contents from fp to S3.
If compressed_fp is None, the compression is performed in memory.
"""
@tobywf
tobywf / build-dvisvgm.sh
Last active May 5, 2019
Build dvisvgm and kpathsea on macOS
View build-dvisvgm.sh
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
PREFIX="${1:-/usr/local/dvisvgm}"
TEX="$(kpsewhich -var SELFAUTOLOC)"
echo "$PREFIX, $TEX"
brew install automake freetype ghostscript potrace
You can’t perform that action at this time.