Skip to content

Instantly share code, notes, and snippets.

View tscritch's full-sized avatar
🌿
Music-ing

Tad Scritchfield tscritch

🌿
Music-ing
View GitHub Profile
@tscritch
tscritch / newtool.sh
Last active February 11, 2022 15:33
A template to create a ui based tool
#! /bin/bash
filename="$HOME/Documents/tools/$1.html"
cp $HOME/Documents/tools/tool-template.html $filename
sed -i '' "s/{NAME}/$1/" "$filename"
@tscritch
tscritch / remsizes.html
Created August 12, 2021 17:02
Rem Size Chart
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"
rel="stylesheet"
/>
@tscritch
tscritch / typescriptreact.json
Created June 18, 2021 22:09
VSCode React Snippets
{
"React State": {
"prefix": "rs",
"body": "const [$1, set${1/(.*)/${1:/capitalize}/}] = React.useState<$2>($3)",
"description": "React state statement"
},
"New React File": {
"prefix": "rf",
"body": [
"import React from 'react';",
@tscritch
tscritch / open-github-pr.sh
Created October 28, 2019 23:39
Open Github PR from Shell
// add to your ~/.bash_profile or ~/.zsh_profile to run anywhere
pr() {
github_url=`git remote -v | awk '/fetch/{print $2}' | sed -Ee 's#(git@|git://)#https://#' -e 's@com:@com/@' -e 's%\.git$%%' | awk '/github/'`
branch_name=`git symbolic-ref HEAD | cut -d'/' -f 3,4`
pr_url=$github_url"/pull/new/"$branch_name
open $pr_url
}