Skip to content

Instantly share code, notes, and snippets.

View gbrian's full-sized avatar
🏠
Working from home

Gustavo Brian gbrian

🏠
Working from home
View GitHub Profile
@gbrian
gbrian / codx-cli.sh
Last active May 2, 2023 08:49
codx-cli installer
curl -sL https://raw.githubusercontent.com/gbrian/codx-cli/main/codx.sh | bash
@gbrian
gbrian / cloud-init.yaml
Last active January 1, 2022 09:44 — forked from syntaqx/cloud-init.yaml
cloud init to install docker on ubuntu
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
manage-resolv-conf: true
resolv_conf:
nameservers:
- '8.8.8.8'
@gbrian
gbrian / labs.pwd.sh
Created July 29, 2020 15:32
labs.play-with-docker.com github session
# ssh key
ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -q -N ""
echo "Add key to repository $1"
echo ""
echo ""
cat /tmp/sshkey.pub
echo ""
echo "Press any key to continue..."
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255
255 255 255 6 0 0 0 0 0 0 0 71 255 255 255 255
255 255 255 0 0 0 0 0 0 0 0 0 255 255 255 255
255 255 255 104 0 0 0 0 0 0 0 184 255 255 255 255
255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255
255 255 255 255 255 255 0 0 8 255 255 255 255 255 255 255
255 255 255 255 255 255 1 0 0 255 255 255 255 255 255 255
255 255 0 0 0 0 0 0 0 0 0 0 0 255 255 255
255 255 255 255 255 255 99 0 0 255 255 255 255 255 255 255
{"airportsFields":["name","city","country","longitude","latitude"],"airlineFields":["name","country"],"airports":[["Goroka","Goroka","Papua New Guinea",145.391881,-6.081689],["Madang","Madang","Papua New Guinea",145.7887,-5.207083],["Mount Hagen","Mount Hagen","Papua New Guinea",144.295861,-5.826789],["Nadzab","Nadzab","Papua New Guinea",146.726242,-6.569828],["Port Moresby Jacksons Intl","Port Moresby","Papua New Guinea",147.22005,-9.443383],["Wewak Intl","Wewak","Papua New Guinea",143.669186,-3.583828],["Narsarsuaq","Narssarssuaq","Greenland",-45.425978,61.160517],["Nuuk","Godthaab","Greenland",-51.678064,64.190922],["Sondre Stromfjord","Sondrestrom","Greenland",-50.689325,67.016969],["Thule Air Base","Thule","Greenland",-68.703161,76.531203],["Akureyri","Akureyri","Iceland",-18.072703,65.659994],["Egilsstadir","Egilsstadir","Iceland",-14.401389,65.283333],["Hornafjordur","Hofn","Iceland",-15.227222,64.295556],["Husavik","Husavik","Iceland",-17.425978,65.952328],["Isafjordur","Isafjordur","Iceland",-23.1352
@gbrian
gbrian / gif8
Created January 25, 2019 06:11
Slack gif8 bot
https://i.giphy.com/3oEjI7lbRLK3P9hDsQ.gif
https://media2.giphy.com/media/xT77XS96i2xwtBDbZm/giphy.gif
https://media3.giphy.com/media/3o7TKw8aBXZHVHeIko/giphy.gif
https://i.imgur.com/plPeD6k.gif
https://i.giphy.com/13zeE9qQNC5IKk.gif
https://i.giphy.com/oGO1MPNUVbbk4.gif
https://media2.giphy.com/media/8Nko5kH9GYqOs/giphy.gif
https://i.giphy.com/RkZqtCBhVh17y.gif
https://i.giphy.com/l4q83E0RjRSGLXBLO.gif
https://media1.giphy.com/media/3WY8qMF9l3ldK/giphy.gif
@gbrian
gbrian / screenshot.js
Last active January 8, 2019 12:02
WebPage Screenshot using html2canvas
var src = document.createElement("script");
src.setAttribute("type", "text/javascript");
src.setAttribute("src", "https://html2canvas.hertzen.com/dist/html2canvas.min.js");
document.head.append(src);
var takeScreenShot = function() {
html2canvas(document.body)
.then(canvas => {
document.body.appendChild(canvas);
var data = canvas.toDataURL();
var link=document.createElement("a");
@gbrian
gbrian / screenshot.js
Created January 8, 2019 11:47
WebPage Screenshot using html2canvas
/*!
* html2canvas 1.0.0-alpha.11 <https://html2canvas.hertzen.com>
* Copyright (c) 2018 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/
!function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.html2canvas=e():A.html2canvas=e()}(this,function(){return function(A){var e={};function t(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return A[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=A,t.c=e,t.d=function(A,e,r){t.o(A,e)||Object.defineProperty(A,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},t.p="",t(t.s=27)}([function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(A,e){if(Array.isArray(A))return A;if(Symbol.iterator i
https://i.giphy.com/3oEjI7lbRLK3P9hDsQ.gif
https://media2.giphy.com/media/xT77XS96i2xwtBDbZm/giphy.gif
https://media3.giphy.com/media/3o7TKw8aBXZHVHeIko/giphy.gif
https://i.imgur.com/plPeD6k.gif
https://i.giphy.com/13zeE9qQNC5IKk.gif
https://i.giphy.com/oGO1MPNUVbbk4.gif
https://media2.giphy.com/media/8Nko5kH9GYqOs/giphy.gif
https://i.giphy.com/RkZqtCBhVh17y.gif
https://i.giphy.com/l4q83E0RjRSGLXBLO.gif
https://media1.giphy.com/media/3WY8qMF9l3ldK/giphy.gif
# Before adding Influx repository, run this so that apt will be able to read the repository.
sudo apt-get update && sudo apt-get install apt-transport-https
# Add the InfluxData key
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list