Skip to content

Instantly share code, notes, and snippets.

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@Horusiath
Horusiath / Example.cs
Last active March 29, 2022 09:38
Typed actor refs snipped for Akka.NET
using System;
namespace Akka.Testing
{
public interface IMyMessage { }
public sealed class MessageA : IMyMessage { }
public sealed class MessageB : IMyMessage { }
public class MyActor : Actor<IMyMessage>
{
@ythecombinator
ythecombinator / change-commit-date.md
Last active March 16, 2022 18:35
Changin' a commit timestamp.

Changing a commit date info

Reason

My country is under a daylight saving time period and not all my commits are made during the morning/afternoon. Because I commited after 11:00 PM - which, given the local DST, was after 00:00 AM - my 100+ days commit streak got broken - which made me very unhappy.

The process

@jamesikanos
jamesikanos / MongoEvalExtensions.cs
Last active January 28, 2022 04:26
MongoClient C# Eval Implementation
public static class MongoClientExtensions
{
/// <summary>
/// Evaluates the specified javascript within a MongoDb database
/// </summary>
/// <param name="database">MongoDb Database to execute the javascript</param>
/// <param name="javascript">Javascript to execute</param>
/// <returns>A BsonValue result</returns>
public static async Task<BsonValue> EvalAsync(this IMongoDatabase database, string javascript)
{
@sebdah
sebdah / threading_example.py
Last active September 27, 2023 15:55
Running a background thread in Python
import threading
import time
class ThreadingExample(object):
""" Threading example class
The run() method will be started and it will run in the background
until the application exits.
"""