Skip to content

Instantly share code, notes, and snippets.

Avatar
📭
Send me a Telegram

Thiago Machado dublado

📭
Send me a Telegram
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am dublado on github.
  • I am dublado (https://keybase.io/dublado) on keybase.
  • I have a public key ASCC4cVYpHhHexElgN7an7U6iY5_6HIWwgkmW8ssHRp5Vwo

To claim this, I am signing this object:

@dublado
dublado / dabblet.css
Created Oct 26, 2020
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@dublado
dublado / dabblet.css
Created Oct 26, 2020
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@dublado
dublado / curl test http2.sh
Created Oct 2, 2020
curl test http2 http 2 https2
View curl test http2.sh
curl -kvso /dev/null --http2 https://app.domain.com:443
@dublado
dublado / git-deployment.md
Created Sep 22, 2020 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@dublado
dublado / git-deployment.md
Created Sep 22, 2020 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@dublado
dublado / server.py
Created Sep 18, 2020 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
View server.py
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
@dublado
dublado / gist:54da7820438f3c71de74cdf5b0f2a82c
Last active Sep 13, 2020
set bridge to docker-machine local env bridge adapter
View gist:54da7820438f3c71de74cdf5b0f2a82c
vboxmanage modifyvm sparring01 --nic3 bridged --nictype3 82545EM --bridgeadapter3 wlp3s0
View delete some mongo collections, started with.js
var collectionNames = db.getCollectionNames(), stats = [];
collectionNames.forEach(function (n) { stats.push(n); });
for (var c in stats) {
switch(stats[c]){
default:
if(stats[c].startsWith('profissionais')){
db.getSiblingDB("uptime").getCollection(stats[c]).drop()
print(stats[c]);
View store function on mongo.js
db.system.js.insertOne({
_id:"lafuncion", //functionName
value: function getAllCollectionsSizes(){print('tis a function')} //function content
});
//useful commands
//to see servers functions
db.system.js.find();
//to load the server funtions
db.loadServerScripts();
You can’t perform that action at this time.