Initialize a git repo in the current directory
# git init
Add a remote called "origin"
| # Customize BASH PS1 prompt to show current GIT repository and branch. | |
| # by Mike Stewart - http://MediaDoneRight.com | |
| # SETUP CONSTANTS | |
| # Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
| # I don't remember where I found this. o_O | |
| # Reset | |
| Color_Off="\[\033[0m\]" # Text Reset |
Initialize a git repo in the current directory
# git init
Add a remote called "origin"
| mkdir ~/vim | |
| cd ~/vim | |
| # Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
| # Compiled on Jul 20 2017 | |
| curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
| export VIMRUNTIME="$HOME/vim/runtime" | |
| export PATH="$HOME/vim:$PATH" | |
| cd - |
In your command-line run the following commands:
brew doctorbrew updateSee how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| import {forwardRef, useImperativeHandle, ForwardRefExoticComponent, RefAttributes, Ref} from "react"; | |
| export type Handle<T> = T extends ForwardRefExoticComponent<RefAttributes<infer T2>> ? T2 : never; | |
| export const Parent = (props: {})=> { | |
| let childHandle: Handle<typeof Child>; | |
| return ( | |
| <div onClick={()=>childHandle.SayHi()}> | |
| <Child name="Bob" ref={c=>childHandle = c}/> | |
| </div> |
| const crypto = require("crypto") | |
| // The `generateKeyPairSync` method accepts two arguments: | |
| // 1. The type ok keys we want, which in this case is "rsa" | |
| // 2. An object with the properties of the key | |
| const { publicKey, privateKey } = crypto.generateKeyPairSync("rsa", { | |
| // The standard secure default length for RSA keys is 2048 bits | |
| modulusLength: 2048, | |
| }) |