Skip to content

Instantly share code, notes, and snippets.

View YamilG's full-sized avatar

Yamil Gonzales YamilG

View GitHub Profile
function cleansheet() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('B:B').activate();
spreadsheet.getActiveSheet().sort(2, true);
spreadsheet.getActiveSheet().hideColumns(1);
spreadsheet.getActiveSheet().hideColumns(3);
spreadsheet.getActiveSheet().hideColumns(5,7);
spreadsheet.getActiveSheet().setColumnWidth(2, 230);
spreadsheet.getRange('D:D').activate();
spreadsheet.getActiveSheet().insertColumnsAfter(spreadsheet.getActiveRange().getLastColumn(), 1);
@YamilG
YamilG / node-project.bash
Created May 1, 2020 18:43
Node Project Init
function node-project {
git init
npx license $(npm get init.license) -o "$(npm get init.author.name)" > LICENSE
npx gitignore node
npx covgen "$(npm get init.author.email)"
npm init -y
git add -A
git commit -m "Initial commit"
}
@YamilG
YamilG / yamil.sublime-settings
Created August 17, 2016 01:18
Sublime Settings
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Cache/Color Scheme - Default/TronLegacy.tmTheme",
"font_face": "Operator Mono",
"font_size": 15.0,
"font_options":
[
"gray_antialias",
@YamilG
YamilG / oea-article.md
Created May 19, 2016 16:36
OEA article for Acklen.

Towards a more Open Government in the Americas

Fellows Twenty-three young professionals from 14 countries of the hemisphere met in Osprey Point, Washington, this month to join a global network of change agents. For the next nine months, these young leaders will work developing projects that will be linked to transparency, citizen participation and the efficient public administration in the region.

This gathering represented the second edition of the Fellowship OAS on Open Government in the Americas, a program of the Organization of American States (OAS). For second consecutive year, this program is opening a space for the free exchange of knowledge and experiences in Open Government (OG) among young leaders from the public administration, private sector and civil society.

I was one of the 23 young leaders who were invited to participate in this program.

First things first, who am I? I’m a UX Designer at Acklen Avenue, also, a well known member of the tech community i

@YamilG
YamilG / system-font.css
Created October 27, 2015 15:09
force using default system font (SF in iOS9; Roboto for Android L, and Segoe UI for M$)
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
@YamilG
YamilG / isMobile.php
Created July 1, 2015 05:00
Detect if mobile
<?php
function isMobile() {
return(preg_match('/(alcatel|amoi|android|avantgo|blackberry|benq|cell|cricket|docomo|elaine|htc|iemobile|iphone|ipad|ipaq|ipod|j2me|java|midp|mini|mmp|mobi|motorola|nec-|nokia|palm|panasonic|philips|phone|sagem|sharp|sie-|smartphone|sony|symbian|t-mobile|telus|up\.browser|up\.link|vodafone|wap|webos|wireless|xda|xoom|zte)/i', $_SERVER['HTTP_USER_AGENT']));
}
?>
# Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Screenshot: http://img.gf3.ca/d54942f474256ec26a49893681c49b5a.png
# A big thanks to \amethyst on Freenode
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0
@YamilG
YamilG / detectAndroid.js
Created February 16, 2015 08:20
Detect if Android in JS
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1;
if(isAndroid) {
// do you android thing
}
@YamilG
YamilG / mobiletest.js
Created September 5, 2014 05:23
Check if mobile
var sw = document.body.clientWidth,
sh = document.body.clientHeight,
breakpoint = 650,
mobile = true;
$(document).ready(function() {
checkMobile();
});
$(w).resize(function(){
@YamilG
YamilG / times.js
Created August 18, 2014 23:46 — forked from FGRibreau/times.js
// Ruby = 5.times { |i| puts i }
// JS = (1).times(function(i){console.log(i);})
Number.prototype.times = function(cb) {
var i = -1;
while (++i < this) {
cb(i);
}
return +this;