Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Gustavo Brian gbrian

🏠
Working from home
View GitHub Profile
@gbrian
gbrian / labs.pwd.sh
Created Jul 29, 2020
labs.play-with-docker.com github session
View labs.pwd.sh
# 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..."
View boy-pattern.patt
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
View echarts_lines3d-airline-on-globe_data.json
{"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 Jan 25, 2019
Slack gif8 bot
View gif8
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 Jan 8, 2019
WebPage Screenshot using html2canvas
View screenshot.js
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 Jan 8, 2019
WebPage Screenshot using html2canvas
View screenshot.js
/*!
* 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
View gif8
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
View debian.install.telegraf.sh
# 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
View travel-aipi.deploy.debian9.node.repo.sh
# Repo to deploy
export GIT_CLONE_REPO=$1
# Fix debian
apt update
apt-get install --reinstall build-essential
# Install git
apt install -y git
View debian-docker.sh
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common -y
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \