create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| 1) Create a branch with the tag | |
| git branch {tagname}-branch {tagname} | |
| git checkout {tagname}-branch | |
| 2) Include the fix manually if it's just a change .... | |
| git add . | |
| git ci -m "Fix included" | |
| or cherry-pick the commit, whatever is easier | |
| git cherry-pick {num_commit} | |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| //Event Listener tied to the file input field | |
| document.getElementById('attachment').addEventListener('change', eventHandler, false) | |
| /** | |
| *Description: Simple method to handle an event | |
| *and fire off a function | |
| **/ | |
| function eventHandler(evt){ | |
| var file = evt.target.files[0]; | |
| fileHash( file, md5, function(x){ |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrcThe Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.
Read more about ZSH at An Introduction to the Z Shell.
Choose one of the following options.
| ## Pre-requisite: You have to know your last commit message from your deleted branch. | |
| git reflog | |
| # Search for message in the list | |
| # a901eda HEAD@{18}: commit: <last commit message> | |
| # Now you have two options, either checkout revision or HEAD | |
| git checkout a901eda | |
| # Or | |
| git checkout HEAD@{18} |
| // ⚠ IMPORTANT: this is old and doesn't work for many different edge cases but I'll keep it as-is for any of you want it | |
| // ⚠ IMPORTANT: you can find more robust versions in the comments or use a library implementation such as lodash's `merge` | |
| // Merge a `source` object to a `target` recursively | |
| const merge = (target, source) => { | |
| // Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties | |
| for (const key of Object.keys(source)) { | |
| if (source[key] instanceof Object) Object.assign(source[key], merge(target[key], source[key])) | |
| } |
| /** | |
| * List unique CSS properties for all DOM elements | |
| * Initially created to list unique font stacks on a page | |
| * @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer} | |
| * | |
| * @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file} | |
| * | |
| * @author AndrewRMinion Design (https://andrewrminion.com) | |
| * @version 1.1 | |
| * |
| import * as React from "react"; | |
| import * as PropTypes from "prop-types"; | |
| interface IExampleComponentProps { | |
| text?: string; | |
| onCounterIncrease: (count: number) => void; | |
| } | |
| interface IExampleComponentState { | |
| clicks: number; |