Skip to content

Instantly share code, notes, and snippets.

View sergixnet's full-sized avatar

Sergio Peña sergixnet

View GitHub Profile
@sergixnet
sergixnet / fcc-d3-bar-chart.markdown
Last active May 1, 2019 16:02
FCC: D3 Bar Chart
@sergixnet
sergixnet / .block
Last active April 18, 2019 15:59
simple bar chart
license: mit
@sergixnet
sergixnet / index.pug
Last active April 18, 2019 11:08
Pomodoro Clock - FreeCodeCamp
#root
@sergixnet
sergixnet / fake-preloader.markdown
Last active April 9, 2019 08:11
Fake preloader
[{"text":"Life isn’t about getting and having, it’s about giving and being.","author":"Kevin Kruse"},{"text":"Whatever the mind of man can conceive and believe, it can achieve.","author":"Napoleon Hill"},{"text":"Strive not to be a success, but rather to be of value.","author":"Albert Einstein"},{"text":"Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.","author":"Robert Frost"},{"text":"I attribute my success to this: I never gave or took any excuse.","author":"Florence Nightingale"},{"text":"You miss 100% of the shots you don’t take.","author":"Wayne Gretzky"},{"text":"I’ve missed more than 9000 shots in my career. I’ve lost almost 300 games. 26 times I’ve been trusted to take the game winning shot and missed. I’ve failed over and over and over again in my life. And that is why I succeed.","author":"Michael Jordan"},{"text":"The most difficult thing is the decision to act, the rest is merely tenacity.","author":"Amelia Earhart"},{"text":"Every strike
enabled: true
active: false
allow_login: false
login_access: site.login
maintenance_page_route: /mantenimiento
enabled: true
built_in_css: true
redirect_to_login: true
redirect_after_logout: /
route_activate: /activate_user
route_forgot: /forgot_password
route_reset: /reset_password
route_profile: /user_profile
route_register: /user_register
route_unauthorized: /user_unauthorized
@sergixnet
sergixnet / upstream.sh
Created February 3, 2019 17:28
Git: Keep upstream in sync
# Add a remote repository
git remote add upstream <remote repository>
# Fetch all the refs (branches and/or tags) from the upstream
git fetch upstream
# Track upstream master with the local master
git branch --set-upstream-to=upstream/master master
# To keep our local master in sync now simple pull from upstream
@sergixnet
sergixnet / mobile-touch-detect.js
Created January 14, 2019 10:19
Detect if is mobile or touch device
const isMobile = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i);
const isTouch = isMobile !== null || document.createTouch !== undefined || ('ontouchstart' in window) || ('onmsgesturechange' in window) || navigator.msMaxTouchPoints;