Skip to content

Instantly share code, notes, and snippets.

View eseceve's full-sized avatar

Sebas Contreras eseceve

  • SCL
View GitHub Profile
@eseceve
eseceve / MarkdownComments.md
Created April 5, 2022 22:31 — forked from randallreedjr/MarkdownComments.md
How to add comments to Markdown

There are comments here but you can't see them

Below this ↓

//: (It’s a little bizarre, but it works with MacDown and Pandoc.) // # (This syntax works like a comment, and won't appear in any output.) // This syntax works like a comment, and won't appear in any output. //: # This syntax works like a comment, and won't appear in any output.

@eseceve
eseceve / commits.md
Created November 6, 2019 14:36
Conventional Commits

Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the Angular change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

@eseceve
eseceve / poke.py
Created May 28, 2019 14:16
Poke's script
spends = {} # {'Javi':88490, 'Sebas':69376, 'Andy':63890, 'Fabian':57320}
pays = {}
gets = {}
def split(spends):
total = sum(spends.values())
integrants = len(spends.keys())
divided = total/integrants
print('Gastos: {}'.format(spends))
print('Se gasto en total: {}'.format(total))
@eseceve
eseceve / isMobileBrowser.js
Created June 15, 2018 00:44
Detect mobile browser
// source: https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser
const isMobileBrowser = () => {
const browserUA = navigator.userAgent || navigator.vendor || window.opera
const isMobileBrowser = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(browserUA)
|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od
@eseceve
eseceve / pre-commit
Created October 20, 2015 14:45
Git pre-commit hook to run ESlint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --dif-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@eseceve
eseceve / gulpfile.js
Created February 20, 2015 04:12
Gulp task to do deploy: changelog + bump + commit + tag + push (to github)
'use strict';
var $ = require('gulp-load-plugins')();
var changelog = require('conventional-changelog');
var exec = require('child_process').exec;
var fs = require('fs');
var gulp = require('gulp');
var pkg = require('../package.json');
var semver = require('semver');
@eseceve
eseceve / app.js
Created August 29, 2014 04:17
Oscar demo
angular.module('ngBoilerplate', [
'templates-app',
'templates-common',
'ngBoilerplate.home',
'ngBoilerplate.about',
'ui.router'
])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
@eseceve
eseceve / ng-papers-form.js
Created July 17, 2014 01:45
Directives for use ng-model with Polymer (control) elements: paper-input, paper-slider, paper-checkbox, paper-radio-group and paper-toggle-button
(function(angular, Polymer) {
angular.module('ng-papers-form', [])
.directive('paperCheckbox', ['$timeout', checkFactory])
.directive('paperToggleButton', ['$timeout', checkFactory])
.directive('paperInput', ['$timeout', function($timeout) {
return {
restrict: 'E',
require: '?ngModel',
link: function(scope, element, attrs, ngModel) {
@eseceve
eseceve / readme.md
Last active August 6, 2017 04:25 — forked from jonah-williams/readme.markdown
Readme template for Github repository

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
@eseceve
eseceve / .gitignore
Created May 30, 2013 04:32
gitignore template
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #