import wixUsersBackend from 'wix-users-backend'; import {fetch} from 'wix-fetch'; const CLIENT_ID = '1112811133259218974'; const CLIENT_SECRET = 'MorYUCBU0MLMKdAnkggpOxon-GaXSbLG'; const REDIRECT_URI = ''; // Handles the authentication callback export function myApp_auth_callback(request) { const code = request.query.code; const tokenEndpoint = ``; const payload = { grant_type: 'authorization_code', code, redirect_uri: REDIRECT_URI }; const options = { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': `Basic ${Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString('base64')}` }, body: Object.keys(payload) .map(key => encodeURIComponent(key) + '=' + encodeURIComponent(payload[key])) .join('&') }; return fetch(tokenEndpoint, options) .then(response => response.json()) .then(data => { const accessToken = data.access_token; // Use the access token to authenticate the user and handle the login logic here // e.g., create a session for the authenticated user // wixUsersBackend.createSession() }); }
top of page

A precursor to a Transocean ($RIG) write up - Part 1

Follow The Value Baron blog over at

And Jerry's twitter by following this link!

Let’s talk about oil before we talk about $RIG as without an outlook on the underlying commodity itself, then our analysis will be largely useless. As people who hangout in the discord (link here) know, I’m quite bullish on oil. I’ve explained why at various times but I figured why not write it out, why the recent dip hasn’t deterred me and what I see moving forward.

For most of our lives we’ve seen the demand for oil continuously grow with supply keeping up. Sure, we’ve seen it overshoot at both ends of the spectrum, reaching a high of $147/bbl in 2008, to going negative in 2020, oil has really seen it all. But I don’t think it’s seen a scenario like the one that is unfolding. See, the world has been fortunate enough to have extremely cheap energy ever since 2014. In 2014 we had two major factors contribute to low oil prices that had lasted until recently which were both primarily supply driven. The first is the U.S shale revolution. In the early 2000’s there was actually a really similar story to what’s being told today. In 2005 energy investment banker Matt Simmons published Twilight in the Desert: The Coming Saudi Oil Shock and the World Economy. Simmons helped set off a fierce debate about whether Saudi Arabia (and the world as a whole) had reached a global peak in oil production. This thesis gained traction over the next three years, as oil prices surged past $100/bbl and helped push the world into recession. The U.S needed something to change.

Fracking had been around since the 1940’s and had been used to promote higher production rates from wells. Fracking involves pumping water, chemicals and a proppant (like sand) down an oil or gas well under high pressure to break open channels (fractures) in the reservoir rock trapping the deposit. Oil and gas do not travel easily through certain reservoir types, which is why they need to be fractured. The proppant is designed to hold those channels open, allowing the oil or natural gas to flow. Then a man by the name of George Mitchell came and combined fracking with horizontal drilling. By doing this it enabled economic oil and gas production for the first time from shale formations across the U.S.