Skip to content

Instantly share code, notes, and snippets.

View xrgranados's full-sized avatar
💭
Busy

Rafael Granados xrgranados

💭
Busy
View GitHub Profile
@xrgranados
xrgranados / gtdeptos.sql
Created November 6, 2019 22:35 — forked from brygom/gtdeptos.sql
Guatemala departamentos y municipios
/**
* Poblado de datos
*/
SET FOREIGN_KEY_CHECKS = 0;
SET AUTOCOMMIT = 0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
START TRANSACTION;
INSERT INTO geo_departamentos VALUES (null, 'Alta Verapaz');
.md-whiteframe-1dp {
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2),
0px 1px 1px 0px rgba(0, 0, 0, 0.14),
0px 2px 1px -1px rgba(0, 0, 0, 0.12); }
.md-whiteframe-2dp {
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2),
0px 2px 2px 0px rgba(0, 0, 0, 0.14),
0px 3px 1px -2px rgba(0, 0, 0, 0.12); }
.md-whiteframe-3dp {
box-shadow:0px 1px 8px 0px rgba(0, 0, 0, 0.2),
@xrgranados
xrgranados / bsearch.js
Created June 14, 2016 19:04 — forked from katspaugh/bsearch.js
Binary search
Array.prototype.bsearch = function (x) {
var min = 0, max = this.length;
while (min <= max) {
var mid = Math.floor((min + max) / 2),
val = this[mid];
if (val === x) {
return mid;
}
@xrgranados
xrgranados / encodeuri.js
Created June 14, 2016 18:54
example to use functions "encodeURIComponent" and "decodeURIComponent"
function encode() {
var obj = document.getElementById('dencoder');
var unencoded = obj.value;
obj.value = encodeURIComponent(unencoded).replace(/'/g,"%27").replace(/"/g,"%22");
}
function decode() {
var obj = document.getElementById('dencoder');
var encoded = obj.value;
obj.value = decodeURIComponent(encoded.replace(/\+/g, " "));
}
@xrgranados
xrgranados / main.less
Created May 18, 2016 19:55 — forked from nanpx/main.less
LESS
@charset "UTF-8";
@import "variables.less";
@import "mixins.less";
@import "reset.less";
@import "utility.less";
@xrgranados
xrgranados / flexbox.less
Created May 18, 2016 17:14 — forked from jayj/flexbox.less
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-moz-@{display}";
@xrgranados
xrgranados / resizer_bookmarklet.js
Last active August 29, 2015 14:25 — forked from erin-dot-io/resizer_bookmarklet.js
iPhone 6 Viewport Resizer Bookmarklet
javascript:void((function(d){if(self!=top||d.getElementById('toolbar')&&d.getElementById('toolbar').getAttribute('data-resizer'))return false;d.write('<!DOCTYPE HTML><html style="opacity:0;"><head><meta charset="utf-8"></head><body><a data-viewport="320x480" data-icon="mobile" title="Mobile (e.g. Apple iPhone)">Mobile (e.g. Apple iPhone)</a><a data-viewport="320x568" data-icon="mobile" data-version="5" title="Apple iPhone 5">Apple iPhone 5</a><a data-viewport="375x667" data-icon="mobile" data-version="6" title="Apple iPhone 6">Apple iPhone 6</a><a data-viewport="414x736" data-icon="mobile" data-version="6+" title="Apple iPhone 6 Plus">Apple iPhone 6 Plus</a><a data-viewport="768x1024" data-icon="tablet" title="Tablet (iPad 2-3rd, mini)">Tablet (iPad 2-3rd, mini)</a><a data-viewport="1366x583" data-icon="notebook" data-version="11" title="Macbook Air 11-inch (Viewable Area)">Macbook Air 11-inch (Viewable Area)</a><a data-viewport="1440x715" data-icon="notebook" data-version="13" title="Macbook Air 13-inch (Vie
#############################################
# Set upstream branch
git branch --set-upstream-to=origin/$rama $rama
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Agregar un commit a una rama
<div class="flip-container" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front">
<!-- front content -->
</div>
<div class="back">
<!-- back content -->
</div>
</div>
</div>