git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch
# show up which remote branch a local branch is tracking
git branch -vvsets the default remote branch for the current local branch.
| /* | |
| JavaScript Caesar shift | |
| by Evan Hahn (evanhahn.com) | |
| * * * * * * * * * * * * | |
| For small occasions (like month-anniversaries), I like to make little websites | |
| for people that only "unlock" on the right day. |
| var express = require('express'); | |
| var path = require('path'); | |
| var webpackConfig = require('./webpack.config'); | |
| var webpack = require('webpack'); | |
| var webpackDevMiddleware = require('webpack-dev-middleware'); | |
| var webpackHotMiddleware = require('webpack-hot-middleware'); | |
| var proxyMiddleware = require('http-proxy-middleware'); | |
| var devConfig = webpackConfig.devServer; | |
| var app = express(); |
| //@flow | |
| import React, { Component } from 'react' | |
| import type { ElementRef } from 'react' | |
| type Props = { src: string, alt: string } | |
| type State = { source?: string } | |
| export default class LazyImage extends Component<Props, State> { | |
| state = {} |
| class MySqlDb(object): | |
| def run(self, query): | |
| # whatever... | |
| # ---------------------------------------------------------------------- | |
| # Here, Foo can get bars, AND knows exactly what db implementation to use: | |
| class Foo: | |
| def __init__(self): |
| // Mixin like functionality | |
| const textInput = props => ` | |
| color: ${props.error ? color.white : color.base}; | |
| background-color: ${props.error ? color.alert : color.white}; | |
| `; | |
| export const Input = styled.input` | |
| ${textInput} | |
| `; |
| { | |
| tokens=[ | |
| space='regexp:\s+' | |
| identifier='regexp:[a-zA-Z][a-zA-Z0-9_]*' | |
| integer-constant='regexp:\d+' | |
| character-constant='regexp:[a-zA-Z]' | |
| floating-constant='regexp:[+-]?([0-9]*[.])?[0-9]+f' | |
| enumeration-constant='regexp:[a-zA-Z][a-zA-Z0-9_]*' // Same as identifier | |
| ] |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { | |
| // no easing, no acceleration | |
| linear: function (t) { return t }, | |
| // accelerating from zero velocity | |
| easeInQuad: function (t) { return t*t }, | |
| // decelerating to zero velocity |
git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch
# show up which remote branch a local branch is tracking
git branch -vvsets the default remote branch for the current local branch.
| wget \ | |
| --recursive \ # Download the whole site. | |
| --no-clobber \ # Don't overwrite existing files. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. | |
| --restrict-file-names=windows \ # Modify filenames to work in Windows as well. | |
| --domains yoursite.com \ # Do not follow links outside this domain. | |
| --no-parent \ # Don't follow links outside the directory you pass in. |
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream