Skip to content

Instantly share code, notes, and snippets.


Iván Olivares R. ivolivares

Block or report user

Report or block ivolivares

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View IATA_Codes_CityNames.json
{"AAA":"Taegu","AAE":"Annaba","ABB":"Lac Abbe","ABE":"Allentown","ABI":"Abilene","ABJ":"Abidjan","ABL":"Ambler","ABM":"Bamaga","ABQ":"Albuquerque","ABR":"Aberdeen Wa","ABS":"Abu Simbel","ABX":"Albury","ABY":"Abyaneh","ABZ":"Aberdeen","AC1":"Soppero","ACA":"Acapulco","ACC":"Accra","ACD":"Acandi","ACE":"Tenerife","ACI":"Alderney","ACK":"Nantucket","ACN":"Arches & Canyonlands","ACR":"Araracuara","ACT":"Waco","ACV":"Arcata","ACY":"Atlantic City \/Atlantic Cty","ADA":"Adana","ADA1":"Cilveg\u0161z\u0178\/Bab Elhawa Border","ADB":"Izmir","ADD":"Addis Ababa","ADD1":"Langano","ADD6":"Sidama","ADE":"Aden","ADL":"Adelaide","ADQ":"Kodiak","ADR":"Angra Dos Reis","ADU":"Ardebil","ADZ":"San Andres","AEP":"Aeroparque Airport","AES":"Aalesund","AET":"Allakaket","AEY":"Akureyri","AF1":"The Band-i-Amir","AF2":"Balkh","AFA":"San Rafael Md","AGA":"Agadir","AGB":"Augsburg","AGC":"Aguas Calientes","AGF":"Agen","AGH":"Aghadowey","AGI":"Arroyo Grande Ca","AGP":"Malaga","AGR":"Agra","AGR1":"Trichy","AGR2":"Bandipur","AGR4":"Kabini ","
ivolivares / cid_fn.js
Created Feb 20, 2018
Get client ID (Universal Analytics)
View cid_fn.js
function cidFunction() {
var trackers = ga.getAll();
var i, len, trackerCid;
for (i = 0, len = trackers.length; i < len; i += 1) {
if (trackers[i].get('trackingId') === 'UA-XXXXXXXX-X') {
trackerCid = trackers[i].get('clientId');
ivolivares / cloudSettings
Last active Jul 23, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings

Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

  1. Go to chrome://flags to enable Devtools experiments Chrome flags with Developer Tools Experiments enabled
  2. Open developer tools, go to Settings (Devtools menu or Chrome cu
ivolivares / bling.js
Created Jun 17, 2016 — forked from HugoGiraudel/bling.js
bling dot js
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
View time_conversion.js
var timeConversion = function(millisec) {
var seconds = (millisec / 1000).toFixed(1),
minutes = (millisec / (1000 * 60)).toFixed(1),
hours = (millisec / (1000 * 60 * 60)).toFixed(1),
days = (millisec / (1000 * 60 * 60 * 24)).toFixed(1);
if (seconds < 60) {
return seconds + " Sec";
} else if (minutes < 60) {
return minutes + " Min";
} else if (hours < 24) {
ivolivares /
Created Apr 4, 2016
Testing 2000 string generated by random characters.
getRand = -> Math.random().toString(36).substring(7)
equals = []
for i in [0..2000]
rand = getRand()
console.log "Evaluating...#{rand}"
equals.push rand if rand in equals
console.log if equals.length then equals else 'Nothing equal'
ivolivares / fiddle.html
Created Dec 14, 2015 — forked from elijahmanor/fiddle.html
jQuery Private Data Should Stay Private
View fiddle.html
<!DOCTYPE html>
<script class="jsbin" src=""></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src=""></script>
ivolivares /
Last active Nov 27, 2017
Install MySQL Workbench Ubuntu 14.04

How to Install MySQL Workbench Ubuntu 14.04

  1. Install some dependencies:

     sudo apt-get -f install odbcinst odbcinst1debian2 unixodbc libodbc1
  2. Now, install the MySQL Workbench

     sudo apt-get install mysql-workbench-community
ivolivares / perfectelementary.bash
Last active Aug 29, 2015
HowTo Install the perfect Elementary-OS
View perfectelementary.bash
#Download Elementary OS from here:
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Clean-up System
sudo apt-get purge midori-granite
sudo apt-get purge noise
sudo apt-get purge software-center
You can’t perform that action at this time.