Skip to content

Instantly share code, notes, and snippets.

View jared-christensen's full-sized avatar

Jared Christensen jared-christensen

View GitHub Profile
@shumbo
shumbo / story.tsx
Last active September 13, 2024 05:15
A storybook decorator to use React Hooks Form inside stories
export default {
title: "MyComponent",
component: MyComponent,
decorators: [withRHF(false)], // or true to show submit button on story
} as Meta;
@ThomasBurleson
ThomasBurleson / refactor_4.md
Last active December 5, 2019 15:05
Refactor #4: RxJS Memory Leaks, Zombie Subscriptions, & Errors

💚 Best Practices: Avoid 3 Common RxJS Issues

Bad-RxJS Issues

Developers often find scenarios where they are compelled to manaully subscribe to Observables in View components; these scenarios do not use the async pipe levels of manual subscription management. These manual subscriptions can lead to:

  • Observables + memory leaks, and
  • Zombie subscriptions
@chranderson
chranderson / nvmCommands.js
Last active November 13, 2024 16:18
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@javierarques
javierarques / protractorAPICheatsheet.md
Last active August 20, 2024 11:27
Protractor API Cheatsheet
@mojaray2k
mojaray2k / jsbin.burut.html
Last active September 19, 2023 15:42
CSS only custom-styled select Todd Parker - Filament Group Inc. How this works: This styles a native select consistently cross-platform with only minimal CSS. The native select is then styled so it is essentially invisible (no appearance, border, bg) leaving only the select's text visible. There is a wrapper around the select that has the majori…
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
@respectTheCode
respectTheCode / static_server.js
Created February 27, 2012 20:36 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
mime = require("mime")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active August 20, 2024 20:28
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"