Skip to content

Instantly share code, notes, and snippets.

@davidfowl
davidfowl / .NET6Migration.md
Last active March 7, 2026 11:20
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active March 13, 2026 09:00
Minimal APIs at a glance
@kepano
kepano / obsidian-web-clipper.js
Last active March 24, 2026 17:44
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@dfinke
dfinke / CONWAYS-GAME-OF-LIFE.ps1
Last active July 24, 2021 18:26
The classic cellular automata simulation
param(
$ALIVE = 'O',
$DEAD = ' '
)
# Conway's Game of Life
# The classic cellular automata simulation. Press Ctrl-C to stop.
# More info at: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
$WIDTH = 79 # The width of the cell grid.
@asklar
asklar / Notifications.h
Created May 29, 2021 22:36
React Native for Windows native module for raising Toast notifications
#pragma once
#include <NativeModules.h>
#include <winrt/Windows.UI.Notifications.h>
#include <winrt/Windows.Data.Xml.Dom.h>
using namespace winrt::Windows::UI::Notifications;
using namespace winrt::Windows::Data::Xml::Dom;
REACT_MODULE(Notifications)
@mvanga
mvanga / music_theory.py
Last active February 27, 2026 13:14
Basic Music Theory in ~200 Lines of Python
# The code for my article with the same name. You can find it at the URL below:
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python
# MIT License
#
# Copyright (c) 2021 Manohar Vanga
#
# 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
@shanselman
shanselman / ohmyposhv3-v2.json
Last active March 17, 2026 20:26
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@adithyabsk
adithyabsk / parachute.py
Last active May 24, 2021 04:24
NASA Perseverance Parachute Code
"""Perseverence Parachute Cipher Python Solution
In Press:
* https://www.nytimes.com/2021/02/24/science/nasa-mars-parachute-code.html
* https://www.theguardian.com/science/2021/feb/23/dare-mighty-things-hidden-message-found-on-nasa-mars-rover-parachute
* https://www.cmu.edu/news/stories/archives/2021/march/mars-rover-code.html
Output:
DARE¿¿¿¿
MIGHTY¿¿
THINGS¿¿
@salihgueler
salihgueler / macos_deployment.yml
Created February 1, 2021 09:30
Gist MacOS Deployment
---
name: On MacOS Deploy
'on':
push:
branches:
- "main"
jobs:
on-push-main:
runs-on: macos-latest
env:
@gistlyn
gistlyn / MyApp.csproj
Last active June 12, 2022 12:02
OrmLite SQLite CIL Demo
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Cil" Version="6.*" />