Skip to content

Instantly share code, notes, and snippets.

View andrewtremblay's full-sized avatar
🕵️‍♂️
Working on secret stuff.

Andrew Tremblay andrewtremblay

🕵️‍♂️
Working on secret stuff.
View GitHub Profile
# SVG Portraits in React Native
## Using the ART Library
https://upload.wikimedia.org/wikipedia/commons/0/01/Stylized_Mona_Lisa.svg
Vector graphics are the most efficient way to display your images at any resolution. And when it comes to vector graphics, svgs are the de-facto file standard.
https://github.com/facebook/react-native/tree/master/Libraries/ART
https://github.com/facebook/react-native/blob/master/Libraries/ART/ARTSurfaceView.m#L48
@andrewtremblay
andrewtremblay / README.md
Last active September 30, 2019 16:21
Smart Commit git hooks and scripts
@andrewtremblay
andrewtremblay / calculate_secret_santas.py
Last active December 5, 2020 21:00
Secret Santa Source Code
import csv
import random
input_spreadsheet_name = 'secret_santas_input.csv'
secret_spreadsheet_name = 'secret_santa_assigments.csv'
# recursive match making
def make_matches(remaining_people, next_santa=None, original_santa=None, processed_people={}):
if len(remaining_people) is 0:
@andrewtremblay
andrewtremblay / use-toggle.ts
Created July 26, 2022 16:47 — forked from fnky/use-toggle.ts
Simple toggle hook using useReducer w/ types for reducer with optional action.
import React from "react";
type ReducerWithOptionalAction<S> = (prevState: S, action?: S) => S;
type ReducerStateWithOptionalAction<S> = React.ReducerState<ReducerWithOptionalAction<S>>;
type DispatchWithOptionalAction<S> = React.Dispatch<S> & React.DispatchWithoutAction;
type ReducerValueWithOptionalAction<S> = [
ReducerStateWithOptionalAction<S>,
React.DispatchWithOptionalAction<S>,
];