This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| filename="$HOME/Documents/tools/$1.html" | |
| cp $HOME/Documents/tools/tool-template.html $filename | |
| sed -i '' "s/{NAME}/$1/" "$filename" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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" | |
| /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "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';", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 | |
| } |