Skip to content

Instantly share code, notes, and snippets.

@Horusiath
Horusiath / Fiber.fs
Last active May 17, 2024 15:09
Custom fibers implementation in F#
/// MIT License
///
/// Copyright (c) 2024 Bartosz Sypytkowski
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
@eulerfx
eulerfx / EventSourcingMonoids.fs
Last active May 17, 2024 15:09
F# event-sourcing with monoids
type Monoid<'a> = {
unit : 'a
op : 'a -> 'a -> 'a
}
let endo<'a> =
{ unit = id
op = fun (f:'a -> 'a) (g:'a -> 'a) -> f << g }
@ezracb
ezracb / VMware Workstation Pro and Fusion Pro Licence Keys
Created April 9, 2021 14:43
VMware Workstation Pro and Fusion Pro Licence Keys
Obviously using these keys may be a grey area. I use them for my computer, but there are no guarentees VMware won't sue you if you use them in a commercial environment.
VMware Workstation 16
YF390-0HF8P-M81RQ-2DXQE-M2UT6
VMware Fusion Pro 12
YF390-0HF8P-M81RQ-2DXQE-M2UT6
As far as I know, this key works on both Fusion and Workstation.
@intergalacticspacehighway
intergalacticspacehighway / CollapsibleText.tsx
Last active May 17, 2024 15:08
Collapsible text using reanimated
import { useEffect, useRef } from "react";
import { View } from "react-native";
import Animated, {
useAnimatedStyle,
useSharedValue,
} from "react-native-reanimated";
// Example
export default function App() {
@maddouri
maddouri / build-static-python.sh
Created December 6, 2015 22:42
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"

The following are steps to set up Azure AD as an Identity Provider for an on-prem Kubernetes cluster.

Starting point:

  • Azure Subscription
  • On-prem Kubernetes cluster (in my case RKE2 v1.27.12+rke2r1)

The scenario is pretty straightforward:

I want to connect from my Workstation (Windows/Linux/Mac) to an on-prem Kubernetes cluster and authenticate to is using Azure AD.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 17, 2024 15:03
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@simonw
simonw / recover_source_code.md
Last active May 17, 2024 15:03
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
@CarbonGhost
CarbonGhost / a_optifine-alternatives.md
Last active May 17, 2024 15:02
CarbonGhost's recommended OptiFine alternatives

CarbonGhost's OptiFine alternatives

This is my personal list of OptiFine replacements. Although other lists exist, this list aims to be an simple feature replacement list that aims not to overwhelm you.

This list was written with 1.18 and 1.17 in mind, but many mods should still be available for 1.16 and 1.15. The critiques of OptiFine aren't relevant to a specific version of the game.