Skip to content

Instantly share code, notes, and snippets.

View sergiogarciadev's full-sized avatar
I turn coffee into code (sometimes in bugs).

Sergio Garcia sergiogarciadev

I turn coffee into code (sometimes in bugs).
View GitHub Profile
### Keybase proof
I hereby claim:
* I am sergiogarciadev on github.
* I am sergiogarciadev (https://keybase.io/sergiogarciadev) on keybase.
* I have a public key whose fingerprint is 351E 6D6C 0353 1393 74CF 44C8 83E3 0710 DD12 150D
To claim this, I am signing this object:
@sergiogarciadev
sergiogarciadev / airports.json
Created October 30, 2018 01:26 — forked from tobiasburri/airports.json
Airport Data
This file has been truncated, but you can view the full file.
[{"City":"Postville","DBTZ":"A","Name":"Postville Airport","Country":"Canada","IATA/FAA":"YSO","Longitude":"-59.785278","ICAO":"CCD4","Airport ID":"7252","Latitude":"54.910278","Timezone":"223","DST":"-4","destinations":["5492","188","5502"]},{"City":"Osubi","DBTZ":"U","Name":"Warri Airport","Country":"Nigeria","IATA/FAA":"QRW","Longitude":"5.45","ICAO":"DNSU","Airport ID":"6972","Latitude":"5.31","Timezone":"50","DST":"1","destinations":["260","273"]},{"City":"Rockland","DBTZ":"A","Name":"Knox County Regional Airport","Country":"United States","IATA/FAA":"RKD","Longitude":"-69.0992303","ICAO":"KRKD","Airport ID":"4026","Latitude":"44.0601111","Timezone":"56","DST":"-5","destinations":["3448"]},{"City":"Jacksn Hole","DBTZ":"A","Name":"Jackson Hole Airport","Country":"United States","IATA/FAA":"JAC","Longitude":"-110.73775","ICAO":"KJAC","Airport ID":"4027","Latitude":"43.607333333","Timezone":"6451","DST":"-7","destinations":["3536","3751"]},{"City":"Flores","DBTZ":"U","Name":"Mundo Maya International","Count
@sergiogarciadev
sergiogarciadev / http_proxy_connect.py
Created February 26, 2018 13:30 — forked from frxstrem/http_proxy_connect.py
Establish a socket connection through an HTTP proxy in Python.
'''
Establish a socket connection through an HTTP proxy.
Author: Fredrik Østrem <frx.apps@gmail.com>
License:
This code can be used, modified and distributed freely, as long as it is this note containing the original
author, the source and this license, is put along with the source code.
'''
@sergiogarciadev
sergiogarciadev / Build Packaged on Debian
Last active December 4, 2018 03:44
Install Vim 8 with Python, Python 3 and Lua support on Ubuntu 16.04
sudo apt update -qq
sudo apt remove --purge vim vim-common vim-runtime vim-gnome vim-tiny vim-gui-common vim-nox-py2
sudo apt install -y liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
#!/bin/sh
MANAGER_COUNT=1
WORKER_COUNT=1
MANAGER_NAME=swarm-manager
WORKER_NAME=swarm-worker
MANAGER_LIST=""
for i in `seq 1 $MANAGER_COUNT`;
var css = "text-shadow: -1px -1px hsl(0,100%,50%), 1px 1px hsl(5.4, 100%, 50%), 3px 2px hsl(10.8, 100%, 50%), 5px 3px hsl(16.2, 100%, 50%), 7px 4px hsl(21.6, 100%, 50%), 9px 5px hsl(27, 100%, 50%), 11px 6px hsl(32.4, 100%, 50%), 13px 7px hsl(37.8, 100%, 50%), 14px 8px hsl(43.2, 100%, 50%), 16px 9px hsl(48.6, 100%, 50%), 18px 10px hsl(54, 100%, 50%), 20px 11px hsl(59.4, 100%, 50%), 22px 12px hsl(64.8, 100%, 50%), 23px 13px hsl(70.2, 100%, 50%), 25px 14px hsl(75.6, 100%, 50%), 27px 15px hsl(81, 100%, 50%), 28px 16px hsl(86.4, 100%, 50%), 30px 17px hsl(91.8, 100%, 50%), 32px 18px hsl(97.2, 100%, 50%), 33px 19px hsl(102.6, 100%, 50%), 35px 20px hsl(108, 100%, 50%), 36px 21px hsl(113.4, 100%, 50%), 38px 22px hsl(118.8, 100%, 50%), 39px 23px hsl(124.2, 100%, 50%), 41px 24px hsl(129.6, 100%, 50%), 42px 25px hsl(135, 100%, 50%), 43px 26px hsl(140.4, 100%, 50%), 45px 27px hsl(145.8, 100%, 50%), 46px 28px hsl(151.2, 100%, 50%), 47px 29px hsl(156.6, 100%, 50%), 48px 30px hsl(162, 100%, 50%), 49px 31px hsl(167.4, 100%, 5
@sergiogarciadev
sergiogarciadev / js_loader.js
Last active June 12, 2017 14:58
Bookmark to easily load JS modules from unpkg
// Make a bookmark with:
// javascript:function load(e,n){return System["import"](e).then(function(o){return console.log("Module "+e+" loaded."),window[n?n:e]=o,o})}var s=document.createElement("script");s.setAttribute("src","https://unpkg.com/getlibs"),document.body.appendChild(s),console.log("JS Loader instaled!\n\nload(<module>, <alias>)\n\nUse:\n > load('jquery', '$')");
//
// Unminified JS
var s = document.createElement('script');
s.setAttribute('src', 'https://unpkg.com/getlibs');
document.body.appendChild(s);
function load(moduleName, alias) {
@sergiogarciadev
sergiogarciadev / Package Control.sublime-settings
Created May 30, 2017 16:05
~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings
{
"bootstrapped": true,
"ignore_vcs_packages": true,
"in_process_packages":
[
],
"installed_packages":
[
"Babel",
"Color Highlighter",
@sergiogarciadev
sergiogarciadev / post_install.sh
Last active June 18, 2017 16:46
Ubuntu 16.04 Post Install
#!/bin/bash
# Run this as:
# curl -sL https://gist.github.com/LawfulHacker/72fc772a66cb5e1806907ac5c2bb8e90/raw/post_install.sh | bash -
#
# Update
#
sudo apt-get update && sudo apt-get upgrade -y
@sergiogarciadev
sergiogarciadev / extend.js
Created May 18, 2017 18:41
Mixins in Javascript
function extend() {
var destination = arguments[0];
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var k in source) {
if (source.hasOwnProperty(k)) {
destination[k] = source[k];
}
}