Skip to content

Instantly share code, notes, and snippets.

View exterm's full-sized avatar

Philip Theus (prev. Mueller) exterm

View GitHub Profile
@exterm
exterm / Article.md
Last active March 16, 2026 13:46
Fix the news - Iran war and energy transition

HTTPS://fixthenews.com, March 11, 2026 (paid content)

On a normal day, around 100 ships pass through the Strait of Hormuz. Right now, it’s effectively zero. Brent, the global oil price benchmark, is a third higher than it was a month ago. Europe’s Dutch TTF hub price, one of the main global reference points for fossil gas, has almost doubled.

By some measures, the Iran War is already the largest sudden disruption of oil and gas supply in modern history. Analysts are scrambling to keep track of the chaos, but history suggests moments like this are rarely about the prices, and more about what governments do once the shock subsides.

It’s worth recalling what happened after the world’s last major oil crisis. The embargo issued by the Gulf states in 1973 lasted only five months, but what followed was a chain of events that reshaped the dollar, the distribution of power between East and West, and contributed to the economic conditions that made the collapse of communism possible. The spot price of oil was a lot

@exterm
exterm / hydro_ottawa.py
Created August 19, 2024 00:55
Hydro Ottawa Private API Client
import requests
from pycognito import Cognito
# AWS Cognito configuration
client_id = '7scfcis6ecucktmp4aqi1jk6cb'
user_pool_id = 'ca-central-1_VYnwOhMBK'
username = 'your_email'
password = 'your_password'
@exterm
exterm / config_boot.rb
Created February 20, 2024 22:22
Profile requires on rails application startup
# add to config/boot.rb
require "benchmark"
$require_nesting = -1
def require(file_name)
result = nil
$require_nesting += 1
@exterm
exterm / copilot-spaghetti-recipe.md
Created November 10, 2022 03:38
Spaghetti Bolognese Recipe generated by Github Copilot

Spaghetti Bolognese alla mamma

Ingredients

  • 500g Spaghetti
  • 1 Onion
  • 1 Carrot
  • 1 Celery
  • 1 Garlic
  • 1/2 Cup Red Wine

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@exterm
exterm / strange type error
Last active December 26, 2015 23:18
Strange runtime type error in dart
/tmp$ dart --version
Dart VM version: 0.8.5.1_r28990 (Tue Oct 22 04:50:58 2013) on "linux_x64"
/tmp$ dartanalyzer test.dart
Analyzing test.dart...
No issues found
/tmp$ dart -c test.dart
Unhandled exception:
type 'int' is not a subtype of type 'double' of 'x'.
@exterm
exterm / PKGBUILD
Created April 10, 2013 12:31
updated emacs-haml-mode-git PKGBUILD
# Contributor: Moritz Heidkamp <moritz@twoticketsplease.de>
pkgname=emacs-haml-mode-git
pkgver=20110912
pkgrel=1
pkgdesc="An emacs mode for editing HAML code."
arch=("i686" "x86_64")
url="http://haml-lang.com/"
license=('MIT')
makedepends=('git')
provides=(emacs-haml-mode)
@exterm
exterm / multiclause.erl
Last active December 15, 2015 02:49
Interesting example for multi-clause type spec in erlang dialyzer.
%% multi clause function type spec
-spec plus(integer(), float()) -> float();
(float(), integer()) -> float();
(float(), float()) -> float();
(integer(), integer()) -> integer().
plus(A,B) ->
A + B.
testp() ->
@exterm
exterm / error.hs
Last active December 14, 2015 14:49
Provoke compile time errors in liquid Haskell
{-@ error2 :: {v: String | false } -> a @-}
error2 :: String -> a
error2 = error
-- a program using this function typechecks exactly when LiquidHaskell can prove that the
-- function error2 is never called.
@exterm
exterm / vectors.agda
Created March 6, 2013 21:33
Example for Dependent Types in Agda
data Vec (A : Set) : Nat -> Set where
[] : Vec A zero
_::_ : {n : Nat} -> A -> Vec A n -> Vec A (succ n)
head : {A : Set} {n : Nat} -> Vec A (succ n) -> A
head (x :: _) = x