Skip to content

Instantly share code, notes, and snippets.

View marcelocarmona's full-sized avatar

Marcelo Carmona marcelocarmona

View GitHub Profile

Aligning images

left alignment

This is the code you need to align images to the left:

@marcelocarmona
marcelocarmona / rxjs-simple-implementation
Last active October 10, 2017 23:03
Rxjs simple implementation
function map(transformFn) {
const inputObservable = this
const outputObservable = createObservable(function subscribe(outputObserver) {
inputObservable.subscribe({
next: function nextCallback(data) {
outputObserver.next(transformFn(data))
},
error: (err) => outputObserver.error(err),
complete: () => outputObserver.complete()
# Example flow, working on feature X, current branch is master
# This is not the only way to do it. The most important thing is that you want to keep linear history on the master branch.
# Create a local topic branch for all work
git checkout -b /topic/{username}/feature-x
# Make changes, test, then commit changes to topic branch
git commit
# Make sure master is at latest
@marcelocarmona
marcelocarmona / Cómo deshacer el último commit en git
Last active May 24, 2017 14:28
Cómo deshacer el último commit en git
Existen dos maneras de borrar ese commit:
* Eliminando junto al commit las modificaciones que este contiene
git reset --hard HEAD~1
* Recuperándolas en el área de trabajo para seguir trabajando en ellas
git reset HEAD~1
Create a new branch
git checkout -b [name_of_your_new_branch]
@marcelocarmona
marcelocarmona / simple-git-workflow
Created April 26, 2017 21:46
Your 7826b2 patch will still cause a conflict when it's applied after pulling, but you can do the following:
Your 7826b2 patch will still cause a conflict when it's applied after pulling, but you can do the following:
git reset --soft HEAD^
git stash
git pull
git stash pop # Will cause a conflict
git commit # Re-commit 7826b2
Atom sync