Skip to content

Instantly share code, notes, and snippets.


Iván Olivares R. ivolivares

View GitHub Profile
ivolivares / emoji-db.json
Created Nov 25, 2019
Emoji Database (as JSON)
View emoji-db.json
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 Dec 19, 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
You can’t perform that action at this time.