Skip to content

Instantly share code, notes, and snippets.

View franklinharvey's full-sized avatar
👨‍🌾
out on the farm

Franklin H franklinharvey

👨‍🌾
out on the farm
View GitHub Profile
@martin-mael
martin-mael / flexoki-tailwind-colors.ts
Created October 8, 2023 02:07
Flexoki Tailwind colors
// Tailwind colors for Flexoki theme by Steph Ango. https://stephango.com/flexoki
const colors = {
base: {
black: '#100F0F',
950: '#1C1B1A',
900: '#282726',
850: '#343331',
800: '#403E3C',
700: '#575653',
@athiththan11
athiththan11 / pre-commit
Last active March 5, 2025 15:49
Git Pre Commit Hook for FIXME TODO
#!/bin/sh
# An hook script to verify changes to be committed do not contain
# any 'FIXME:' comments. Called by "git commit" with no arguments.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it stops the commit.
#
# To bypass this hook, use the "--no-verify" parameter when committing.
@chahuja
chahuja / split_join_files.md
Last active January 13, 2025 15:23
Split files to parts or equal sizes and then stitch them back

Split a tar/zip file to multiple parts of size 1GB

split -b 1024m filename.tar.gz 'filename.tar.gz.part-'

Combine the split files to a single unit

Linux

cat filename.tar.gz.part-* > filename.tar.gz 
@basarat
basarat / cardinaldirections.js
Last active November 14, 2022 17:44
Snapping an angle to the nearest cardinal direction in javascript
/**
* Given "0-360" returns the nearest cardinal direction "N/NE/E/SE/S/SW/W/NW"
*/
export function getCardinal(angle) {
/**
* Customize by changing the number of directions you have
* We have 8
*/
const degreePerDirection = 360 / 8;
@gre
gre / easing.js
Last active April 13, 2025 15:13
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {