NOTE
You may not need local branches for all pull requests in a repo.
To fetch only the ref of a single pull request that you need, use this:
git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
NOTE
You may not need local branches for all pull requests in a repo.
To fetch only the ref of a single pull request that you need, use this:
git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
[alias] | |
fetch-pr = "!f() { git fetch origin refs/pull/$1/head:pr/$1; } ; f" | |
delete-prs = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" |
import React, { useState, useEffect } from "react"; | |
import "./packages/combobox/styles.css"; | |
import { | |
Combobox, | |
ComboboxInput, | |
ComboboxList, | |
ComboboxOption, | |
ComboboxPopup | |
} from "./packages/combobox/index"; |
// This is a minimal UA sniffer, that only cares about the rendering/JS engine | |
// name and version, which should be enough to do feature discrimination and | |
// differential code loading. | |
// | |
// This is distinct from things like https://www.npmjs.com/package/ua-parser-js | |
// which distinguish between different branded browsers that use the same rendering | |
// engine. That sort of distinction is maybe useful for analytics purposes, but | |
// for differential code loading it is overcomplicated. | |
// | |
// This is meant to demonstrate that UA sniffing is not really that hard if you're |
Set up a docker-compose.yaml
file (file content at the bottom of this page).
Also create a data/mysql
folder in your project.
In order to set up a volume for MySQL in Docker Toolbox, we will need a VirtualBox Shared Folder, just like mentioned in Fixing Volumes in Docker Toolbox.
VirtualBox by default has a c/Users
Shared Folder that we can use for this (as long as your project is within C:\Users
. Verify that this shared folder is set up properly:
Add a new volume to the mydatabase
service in the docker-compose.yaml
for the database files. Because we are using docker-toolbox and VirtualBox, we need an absolute path, starting with //c/
:
volumes:
#!/usr/bin/env bash | |
# TODO: | |
# - DRY relevant parts | |
singlequotes=`find -type f \( -iname \*.js -o -iname \*.ts \) -not -path '*node_modules/*' -exec cat \{\} \; | tr -cd \' | wc -c` | |
doublequotes=`find -type f \( -iname \*.js -o -iname \*.ts \) -not -path '*node_modules/*' -exec cat \{\} \; | tr -cd '"' | wc -c` | |
total=$(($singlequotes + $doublequotes)) |
alias ...=../.. | |
alias ....=../../.. | |
alias .....=../../../.. | |
alias ......=../../../../.. | |
alias 1='cd -' | |
alias 2='cd -2' | |
alias 3='cd -3' | |
alias 4='cd -4' | |
alias 5='cd -5' | |
alias 6='cd -6' |
There are now two ways to approach this:
This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.