This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.location.href | |
==================== | |
Bookmarklet to append a string to the end of the URL. | |
1. Create bookmark. | |
2. Edit bookmark URL(Chrome) / Location(Firefox) to include this code: javascript:window.location.href=window.location.href+'REPLACETHIS'; | |
3. Now make use of that bookmarklet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copied from http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ | |
git clone <git repository A url> # clone source repository | |
cd <git repository A directory> | |
git remote rm origin # to make sure it doesn't affect the original repository | |
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed | |
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed) | |
mv * <directory 1> | |
git add . | |
git commit |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Let's say contributor
has submitted a pull request to your (author
) project (repo
). They have made changes on their
branch feature
and have proposed to merge this into origin/master
, where
origin -> https://github.com/author/repo.git
Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an implementation of bezier curves via recursive method. | |
import numpy as np | |
def bezier(t, points): | |
""" | |
Get the point at `t` for Bezier Curve with `points` control points. | |
@param t curve parameter. 0 <= t <= 1 | |
@param points control points of Bezier Curve. Type is numpy array | |
@returns the value at `t` of Bezier Curve. |