Skip to content

Instantly share code, notes, and snippets.

View pedrogaudencio's full-sized avatar
🏝️
Working remotely around the 3rd rock from the Sun

Pedro Gaudêncio pedrogaudencio

🏝️
Working remotely around the 3rd rock from the Sun
View GitHub Profile
### Keybase proof
I hereby claim:
* I am pedrogaudencio on github.
* I am pedrogaudencio (https://keybase.io/pedrogaudencio) on keybase.
* I have a public key ASAwUSNbVGzFoEiIDx18Z9VTUcgEZHJjI3pM-FjExGVUdgo
To claim this, I am signing this object:
@pedrogaudencio
pedrogaudencio / url_redirect_based_on_referrer.js
Created April 11, 2018 23:37
Redirects to specific url based on the referrer url
// if url referrer is "https://url_referrer.example"
if(document.referrer === "https://url_referrer.example") {
// redirects to "https://redirect_to_url.example"
window.location.replace("https://redirect_to_url.example");
}
@pedrogaudencio
pedrogaudencio / get_netflix_tvshow_list.js
Created April 11, 2018 10:43
Export My List from Netflix
(function(){document.querySelectorAll('.title-card a[aria-label]').forEach(
function(item){
try {
console.log('["'+ item.getAttribute('aria-label') + '", "https://www.netflix.com' + item.getAttribute("href").split("?")[0]+'"],')
} catch(err) { console.log("ERROR: Ignored err", err, item)}
})}());
@pedrogaudencio
pedrogaudencio / legalstart_questions.md
Created May 9, 2016 04:59
Web app patterns and isolation in concurrency and design architecture

Legalstart

What patterns do we have to use when performing this kind of updates on a relational database?

Specifically, what level of isolation is preferred to prevent this kind of race condition when using Postgres? (please explain your reasoning)

Please give a broad idea on how you would design the architecture of this web app with your favorite stack/framework, in terms of front-end, back-end and database.