This file contains 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
package priority_queue | |
import "errors" | |
type Elem struct { | |
Score int | |
Data interface{} | |
} | |
type priorityQueue struct { |
This file contains 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
# based on the following: | |
# http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/ | |
# http://blog.caplin.com/2013/09/18/merging-two-git-repositories/ | |
git clone repo_main | |
git clone repo_sub | |
cd repo_main | |
git remote add repo_sub ../repo_sub | |
git fetch repo_sub |
This file contains 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
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork [email protected] |
This file contains 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
# ============================================= | |
# =============== ALERT =============== | |
# ============================================= | |
# Do NOT run this script! | |
# It's like a document, it'll NOT work! | |
# 1. Install AsseticBundle via composer. | |
composer require symfony/assetic-bundle | |
# 2. Add AsseticBundle to AppKernel's bundles list: |
This file contains 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
https://egghead.io/lessons/javascript-redux-describing-state-changes-with-actions | |
https://egghead.io/react-redux-cheatsheets |
This file contains 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
#set | |
#------------------------------ | |
#sets are sorted | |
#mutable like list | |
set([1,3,4]) | |
type(set()) | |
type({}) |