Skip to content

Instantly share code, notes, and snippets.

View brunodesde1987's full-sized avatar
🔺
uai

Bruno Carvalho brunodesde1987

🔺
uai
View GitHub Profile
@brunodesde1987
brunodesde1987 / next_nginx.md
Created August 21, 2021 17:34 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt
@brunodesde1987
brunodesde1987 / hosts
Created September 23, 2020 21:42
how to make the internet not suck (as much)
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#
# See below for acknowledgements.
# Please forward any additions, corrections or comments by email to
# hosts@someonewhocares.org
@brunodesde1987
brunodesde1987 / es6-element-ready.js
Created August 21, 2020 19:06 — forked from jwilson8767/es6-element-ready.js
Wait for an element to exist. ES6, Promise, MutationObserver
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@brunodesde1987
brunodesde1987 / gist:1567a3dcc7576b535cb8aa09e19f57d5
Created May 28, 2020 14:47 — forked from Albejr/firebase-message
Localize Firebase error messages in PT-BR
catchError(err => {
const errorCode = err.code;
let errorMessage = this.VerifyErroCode(errorCode);
if (errorMessage == null) {
errorMessage = err.message;
}
console.log(errorMessage);
})
[alias]
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
st = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
@brunodesde1987
brunodesde1987 / robocopy-delete
Created February 29, 2020 14:19 — forked from archagon/robocopy-delete
Sometimes Windows has trouble deleting directories with very long paths down in the lower depths. Fortunately, robocopy can magically circumvent this! Simply create an empty directory and mirror it into the directory you wish to delete.
robocopy /b /mir "C:\EmptyDir" "C:\DirToEmpty"
@brunodesde1987
brunodesde1987 / robocopy-backup
Created February 29, 2020 14:18 — forked from archagon/robocopy-backup
A bunch of robocopy flags to help backup an external drive.
robocopy /b /e /xa:s /xjd /sl /a-:hs /mt /v /fp /eta /log:"D:\To\Directory\transfer.log" /tee "C:\From\Directory" "D:\To\Directory"
(Note that the paths don't have a trailing backslash.)
/b -- backup mode (there's a /zb option for restart mode, but it's a whole lot slower)
/e -- copies subdirectories (including empty directories) in addition to files
/xa:s -- exclude system files
/xjd -- exclude junction points
/sl -- copy symbolic links as links
/a-:hs -- remove hidden/system attributes from files
@brunodesde1987
brunodesde1987 / twitter-profiles-js.md
Last active February 12, 2019 12:58
Twitter Profiles JS/Web Related