Skip to content

Instantly share code, notes, and snippets.

@vuldin
vuldin / simple-react.html
Created July 8, 2021 11:53
An HTML file that uses Babel to display a simple React component
<!DOCTYPE html>
<html lang="en">
<head>
<title>Simple React</title>
<meta charset="utf-8" />
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@7.0.0-beta.3/babel.min.js"></script>
</head>
@vuldin
vuldin / portion-of-kube_ps1.sh
Created July 11, 2021 16:18
shorten context display within kube_ps1 prompt if it is too long
# Context
if [[ "${KUBE_PS1_CONTEXT_ENABLE}" == true ]]; then
KUBE_PS1_CONTEXT=$(echo $KUBE_PS1_CONTEXT | sed -E "s/(.{15}).*$/\1.../")
KUBE_PS1+="$(_kube_ps1_color_fg $KUBE_PS1_CTX_COLOR)${KUBE_PS1_CONTEXT}${KUBE_PS1_RESET_COLOR}"
fi
@vuldin
vuldin / kowl-d3-react-mobx-chart.js
Created April 2, 2022 15:42
A react component driven by a mobx data source, with a custom D3 visualization.
import {
arc,
axisBottom,
axisLeft,
extent,
line,
pointer,
scaleLinear,
scaleTime,
select,
@vuldin
vuldin / commit-with-multiple-emails.md
Last active April 29, 2022 18:28
How to commit to different repos using a different name/email

These instructions assume you have a personal and work email. The default email will be personal, and all repos in a folder ~/work will be commited to with your work email. Change ~/work in the details below to whatever you want (ie. your company's name).

Create ~/.gitconfig with the following contents:

[user]
name = <your name>
email = <personal email>
[includeIf "gitdir:~/work/"]