Skip to content

Instantly share code, notes, and snippets.

View paldepind's full-sized avatar

Simon Friis Vindum paldepind

  • Copenhagen, Denmark
  • 06:22 (UTC +02:00)
View GitHub Profile
@paldepind
paldepind / keybase.md
Created March 4, 2024 07:58
Keybase proof

Keybase proof

I hereby claim:

  • I am paldepind on github.
  • I am paldepind (https://keybase.io/paldepind) on keybase.
  • I have a public key ASD8KH9Ww6dB3tn7d8hJkbL3zhgaChfCqHn-T7JnVfjThgo

To claim this, I am signing this object:

import 'package:flutter/material.dart';
void main() => runApp(const LogoApp());
double? first = null;
class AnimatedLogo extends AnimatedWidget {
const AnimatedLogo({super.key, required Animation<double> animation})
: super(listenable: animation);
@paldepind
paldepind / main.dart
Created November 12, 2023 12:41
Material dark mode
import 'package:flutter/material.dart';
void main() => runApp(TestApp());
class TestApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Theme(
data: ThemeData(brightness: Brightness.dark),
@paldepind
paldepind / main.dart
Created November 12, 2023 12:35
Cupertino dark theme
import 'package:flutter/cupertino.dart';
void main() => runApp(TestApp());
class TestApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const CupertinoApp(
home: CupertinoTheme(
data: CupertinoThemeData(brightness: Brightness.dark),
const fs = require("fs");
const bundle = fs.readFileSync("path-to-webpack-bundle.html", "utf8");
const escaped = JSON.stringify(bundle);
const js = `export default ${escaped}`;
fs.writeFileSync("javascript-output-file.ts", js);
From iris.bi Require Import bi.
Import bi.
From iris.proofmode Require Import tactics environments intro_patterns monpred.
Section intuit_to_spatial.
Context {PROP : bi}.
Implicit Types Γ Γp Γs : env PROP.
Implicit Types Δ : envs PROP.
Implicit Types P Q : PROP.
@paldepind
paldepind / delete-view.js
Last active March 23, 2021 16:33
Delete all documents returned by a view in CouchDB
var couchUrl = "foobar";
$.getJSON(couch-url + "view-name-here", function(data) {
data.rows.forEach(function (doc) {
$.ajax({
url: couch-url + doc.value._id + '?rev=' + doc.value._rev,
type: 'DELETE',
success: function(result) {
console.log("Deleted document with id " + doc.value._id);
}
});
@paldepind
paldepind / qp.v
Last active October 3, 2020 17:09
Positive fractions where 1 = 1/2 + 1/2 holds by reflexivity.
From Coq Require Import QArith Qcanon.
From stdpp Require Export base decidable option numbers.
(* Strictly positive rationals *)
(* Positive fractions. *)
Record Qpos : Set := mk_Qpos {
Qpos_num : positive;
Qpos_den : positive
}.
module Experiment
( mapHeterogenousRecord
, mapRecordBuilder
, class MapRecord
) where
import Prelude
import Prim.Row as Row
import Prim.RowList as RL
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2014 Simon Friis Vindum <simon@vindum.io>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE