Skip to content

Instantly share code, notes, and snippets.

@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/"]
@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 / 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 / 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 / debugbear-github-workflow.yml
Created March 24, 2020 20:55
integrates debugbear with github actions, using github repo secret
name: CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm i
- run: ./node_modules/.bin/debugbear --pageId=6383 --waitForResult --baseBranch=master --inferBuildInfo
env:
@vuldin
vuldin / debugbear-test.js
Created March 24, 2020 15:15
Testing debugbear javscript API
const { DebugBear } = require("debugbear");
const envCi = require("env-ci");
// DEBUGBEAR_API_KEY=<key> $(npm bin)/debugbear --pageId=6383 --waitForResult --baseBranch=master --inferBuildInfo
// https://www.debugbear.com/viewResult/969114
(async function run() {
const { commit: commitHash } = envCi();
console.log(`commitHash: ${commitHash}`);
@vuldin
vuldin / vuldin-logo.svg
Last active March 6, 2020 01:43
Simple logo in svg format
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreidvfvlmvavg7xp7zkjnlazg56zjk4ky2evlily7g6k4r2drzoo7uu ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@vuldin
vuldin / README.md
Created March 28, 2018 08:54
an add closure that takes any number of arguments and/or parameters

This module exports an add closure that takes any number of arguments and/or parameters

Examples:

add()
add(1)
add(1,2)
add(1)(2)
add(1,2)(3,4)
@vuldin
vuldin / mermaid.md
Last active December 11, 2017 19:49
towards v2
sequenceDiagram
  cmsCtrl->>dbCtrl: requests latest db update
  dbCtrl-->>cmsCtrl: REST response
  loop
    cmsCtrl->>wordpress: request next latest update
    wordpress-->>cmsCtrl: REST response
    cmsCtrl->cmsCtrl: compares with latest update sent from dbCtrl
    cmsCtrl->>dbCtrl: sends wordpress update if more recent than latest db update
 dbCtrl-&gt;mongo: updates database (via nodejs driver)