I hereby claim:
- I am tobywf on github.
- I am tobywf (https://keybase.io/tobywf) on keybase.
- I have a public key whose fingerprint is 90A8 0C6B 788D 1574 F349 AA29 B0BF 051F 9B20 2065
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| cask 'meldmerge' do | |
| version 'osx-9' | |
| sha256 '324e096e0253e8ad4237f64a90cdda200fe427db8cf7ebc78143fc98e2d33ebc' | |
| url "https://github.com/yousseb/meld/releases/download/#{version}/meldmerge.dmg" | |
| name 'Meld' | |
| homepage 'https://yousseb.github.io/meld/' | |
| app 'Meld.app' | |
| binary "#{appdir}/Meld.app/Contents/MacOS/Meld", target: 'meld' |
| from decimal import Decimal, ROUND_CEILING, ROUND_FLOOR | |
| ONE = Decimal(1) | |
| def round_up(number, quantum): | |
| """Round a decimal number up to the nearest multiple of quantum""" | |
| return (number / quantum).quantize(ONE, rounding=ROUND_CEILING) * quantum | |
| #!/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 |
| 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. | |
| """ |
| # -*- 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]) |
| 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]) |
| # -*- 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' |
| 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: |
| #!/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 |