A small command line tool for creating and naming new topic branches in a consistent way.
create a new-branch script in a folder somewhere in your path.
touch ~/path/to/your/folder/new-branch
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="ys" | |
# Example aliases |
alias l="ls -la" | |
alias gs='git status ' | |
alias gst='git status ' | |
alias ga='git add ' | |
alias gb='git branch ' | |
alias gc='git commit' | |
alias gd='git diff' | |
alias go='git checkout ' | |
alias got='git ' | |
alias get='git ' |
[alias] | |
co = checkout | |
ci = commit | |
ca = commit -a | |
st = status | |
s = status | |
br = branch | |
ps = push | |
pl = pull | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short |
const createValidationPipeLine = filters | |
=> (values, value, otherField) | |
=> filters.reduce((currentValue, filter) | |
=> filter(values, value, otherField), value); |
import React from 'react'; | |
import { shallow, mount } from 'enzyme'; | |
import { shallowWithIntl, mountWithIntl } from './react-intl'; | |
const componentWrapper = renderer => (Component, defaultProps) => props => renderer( | |
<Component | |
{...defaultProps} | |
{...props} | |
/>, |
using UnityEngine; | |
public class SoundTrackController : MonoBehaviour | |
{ | |
private void Awake() | |
{ | |
// We want this soundTrackController to persist across every scene (singleton) | |
// so we check if there is an existing instance and reuse that, destroying the attempted new | |
// instance in the process. | |
// GetType returns the type of the current gameobject the script is attached to |
When working on topic branches, you often have a many old branches clogging up your local and remote repositories. This small command line tool can be run immediatley after closing a Pull Request to prune away the topic branch both locally and remotely and then bring your target branch up to date automatically before starting your new topic branch. This keeps your git repo free from clutter and ensures you always begin new branches at the point of integration - at the head of your project's target branch.
Create a branch-cleanup script in a folder. This folder should be in your path for it to be executable from the CLI.
touch ~/path/to/your/folder/new-branch
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |