Skip to content

Instantly share code, notes, and snippets.

View rogerramosme's full-sized avatar
🎯
Focusing

Roger Ramos rogerramosme

🎯
Focusing
View GitHub Profile
@rogerramosme
rogerramosme / ubuntu_agnoster_install.md
Last active November 29, 2018 15:58 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@rogerramosme
rogerramosme / markup.html
Last active October 1, 2018 18:31 — forked from ihorduchenko/Amount of flex-items per row
Sass: How adjust amount of flex-items per row
<div class="container">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
@rogerramosme
rogerramosme / rename-branch-github.txt
Created March 29, 2018 21:58 — forked from niqdev/rename-branch-github.txt
Rename local and remote branch on GitHub
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@rogerramosme
rogerramosme / pre-commit-js[x]
Last active March 29, 2018 22:29 — forked from shettayyy/pre-commit-eslint
Pre-commit hook for Linting JS with ESLint before commit.
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint"
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@rogerramosme
rogerramosme / promise.js
Last active December 4, 2017 11:31 — forked from jish/promise.js
An example "always" behavior for ES6 promises. This only works if you do not create / return intermediate promises.
// A thing I want to do
// This flow only involves **one** promise, for example an ajax call
// None of the subsequent `then` or `catch` calls, return new promises.
const explode = false;
const promise = new Promise((resolve, reject) => {
if (explode) {