Skip to content

Instantly share code, notes, and snippets.

View JosieRice's full-sized avatar

Chloë JosieRice

  • Victoria BC
  • 09:07 (UTC -08:00)
View GitHub Profile
@JosieRice
JosieRice / .zshrc
Last active June 29, 2025 00:41
zshrc example
# Find and set branch name var if in git repository.
function git_branch_name()
{
branch=$(git symbolic-ref HEAD 2> /dev/null)
if [[ -z "$branch" ]]; then
:
else
branch="${branch#refs/heads/}" # Remove the "refs/heads/" prefix
echo -e "\033[38;5;206m$branch\033[0m"
fi
@JosieRice
JosieRice / gist:35dfb54170008a39237f0389f053f9b5
Created May 25, 2020 21:31
Typescript Tricks and References
CLI command to generate a declaration file for any .js file
`npx tsc pathto/jsfile.js --declaration --allowJs --emitDeclarationOnly`
@JosieRice
JosieRice / _webserver.md
Created December 27, 2019 22:59 — forked from jgravois/_webserver.md
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>