Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Bernardoow's full-sized avatar

Bernardo Gomes Bernardoow

  • Belo Horizonte - Brazil
View GitHub Profile
@Bernardoow
Bernardoow / Convert .mov or .MP4 to .gif.md
Created December 6, 2023 14:07 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@Bernardoow
Bernardoow / mongo + docker.md
Created June 25, 2023 13:52 — forked from x-yuri/mongo + docker.md
mongo + docker

mongo + docker

mongo >= 6: init-mongo.js + MONGO_INITDB_DATABASE in .env-mongo
mongo < 6: init-mongo.sh + no MONGO_INITDB_DATABASE in .env-mongo

.env:

MONGO_USER=user
MONGO_PASSWORD=userpasswd
@Bernardoow
Bernardoow / postman-pre-request.js
Created October 21, 2022 12:59 — forked from bcnzer/postman-pre-request.js
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
nome cidade sobrenome
yasmine joao monlevade costa
bernardo manhuaçu gomes
@Bernardoow
Bernardoow / raml2html_task_gulp.js
Created January 18, 2019 16:36
TASK GULP raml2html
function raml2html(options) {
var gutil = require('gulp-util');
var through = require('through2');
var raml2html = require('raml2html');
var simplifyMark = function(mark) {
if (mark) mark.buffer = mark.buffer.split('\n', mark.line + 1)[mark.line].trim();
}
options = options || {};
@Bernardoow
Bernardoow / SWAGGER_SETTINGS
Created November 10, 2018 19:47
Django Rest Swagger
SWAGGER_SETTINGS = {
'SECURITY_DEFINITIONS': {
'api_key': {
'type': 'apiKey',
'in': 'header',
'name': 'Authorization'
}
},
'CUSTOM_HEADERS': {
'HTTP_AUTHORIZATION': 'Token a476957f3c20a3a262a760fc2194569315ea5670'
@Bernardoow
Bernardoow / Sync gh-pages + master branches
Created July 26, 2018 15:22 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes

Performance of Flask, Tornado, GEvent, and their combinations

Wensheng Wang, 10/1/11

Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html

When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:

1, Pure Flask (pure_flask.py)

Performance of Flask, Tornado, GEvent, and their combinations

Wensheng Wang, 10/1/11

Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html

When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:

1, Pure Flask (pure_flask.py)

@Bernardoow
Bernardoow / docker-compose-node-mongo.yml
Created June 30, 2018 22:52 — forked from wesleybliss/docker-compose-node-mongo.yml
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes: