Skip to content

Instantly share code, notes, and snippets.

View bhison's full-sized avatar

Tim Bhison bhison

  • Bristol, UK
View GitHub Profile
@bhison
bhison / ScaleGrid.cs
Last active April 24, 2023 08:26
Unity3D: Scale cell size of Grid Layout Group
// Scale your grid layougt in Unity3D
// -- Add this to a gameobject with a Grid Layout Group and you can make the cell size change with resolution, by percentage of screen width.
// -- Updates as you change resolution or width percentage in editor.
// -- Runs once on play, Fix will need to be called if resolution is changed in game.
// -- Script will need expansion if you want to use non-square cells.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@bhison
bhison / .block
Created April 15, 2019 11:55
d3 canvas stuff
license: mit
@bhison
bhison / .block
Last active April 15, 2019 16:48
d3 canvas tutorial from scratch
license: mit
@bhison
bhison / aws-lambda-unzipper.py
Last active August 6, 2021 10:34 — forked from msharp/aws-lambda-unzipper.py
unzip archive from S3 on AWS Lambda, in place, retain contentType
import os
import sys
import re
import boto3
import zipfile
#Expand on this based on which filetypes you expect to recieve
mimeTypes = {
".html": "text/html",
".png": "image/png",