Skip to content

Instantly share code, notes, and snippets.

View hchoang's full-sized avatar
🏠
Working from home

Cat Hoang hchoang

🏠
Working from home
View GitHub Profile
@hchoang
hchoang / convert.py
Created February 8, 2026 13:27
Convert JPG image to be printable on Fujifilm Instax SQ20
# test on
import PIL.Image
from PIL import ImageOps
# Load the user's image
img_path = 'file.jpg'
img = PIL.Image.open(img_path)
# 1. Determine target square size based on the largest dimension
# This ensures we don't cut anything off.
@hchoang
hchoang / install_lamp_16.sh
Created December 10, 2017 07:00 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 16.04 - PHP development (php 7.1, MySQL 5.7, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 16.04 Dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@hchoang
hchoang / 0_reuse_code.js
Created May 4, 2016 05:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console