Skip to content

Instantly share code, notes, and snippets.

View iamjoross's full-sized avatar
🏠
Working from home

Jose Ross Barredo iamjoross

🏠
Working from home
View GitHub Profile
@iamjoross
iamjoross / priority_queue.go
Created October 30, 2020 00:59 — forked from vderyagin/priority_queue.go
Priority Queue data structure implementation in Go
package priority_queue
import "errors"
type Elem struct {
Score int
Data interface{}
}
type priorityQueue struct {
@iamjoross
iamjoross / merge_git_repo_as_subdir
Created September 1, 2020 03:20 — forked from smdabdoub/merge_git_repo_as_subdir
Merge one git repository into another repository as a sub-directory
# 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
@iamjoross
iamjoross / gist:9772476f291bd9251f4c76a9dc316bd7
Created July 20, 2020 14:42 — forked from jagregory/gist:710671
How to move to a fork after cloning
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]
@iamjoross
iamjoross / install.sh
Created September 8, 2017 00:42 — forked from nathiss/install.sh
Installing AsseticBundle in Symfony3 (with leafo/scssphp & patchwork/jsqueeze)
# =============================================
# =============== 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:
https://egghead.io/lessons/javascript-redux-describing-state-changes-with-actions
https://egghead.io/react-redux-cheatsheets
@iamjoross
iamjoross / sets.py
Created March 10, 2017 13:18
Python Collection Basics
#set
#------------------------------
#sets are sorted
#mutable like list
set([1,3,4])
type(set())
type({})