Skip to content

Instantly share code, notes, and snippets.

@skrymets
skrymets / Cornell's Notes Template.md
Last active April 26, 2024 21:46
Cornell Note Template for Obsidian
cssclass
cornell-note
Cues

Notes

The Cornell Note-taking System is a popular and effective method for organizing and summarizing information during lectures, readings, or any other form of learning.

fujifilm pic

A shot of me with the fujifilm set to a lens length of 38 mm with 3 lights. In heinsight I look a little agressive but heh, at least it's different. 😅

Camera Setup

So I've been improving my camera setup to help with video recordings, livestreams, Zoom calls, etc.

Equipment

@LesleyLai
LesleyLai / function_deduce_signature.cpp
Last active March 30, 2020 18:09
Given an invocable object, discover its return type and the function type
#include <type_traits>
namespace detail {
template <typename Func>
struct function_trait;
#define BEYOND_NOARG
#define BEYOND_FUNCTION_TRAIT(CV_OPT, NOEXCEPT_OPT) \
@simonrenger
simonrenger / memoy_managment_cpp_resource_list.md
Last active April 23, 2024 21:30
C++ Memory Management Resource List
@LesleyLai
LesleyLai / monte-carlo-pi-estimator.elm
Last active September 3, 2020 17:53
A live-coded Monte Carlo Pi Estimator in the club meeting of the CU Computer Graphics Group. Copy it to https://elm-lang.org/try if you want to try to run it.
module Main exposing (..)
import Browser
import Html exposing (Html)
import Svg exposing (..)
import Svg.Attributes exposing (..)
import Svg.Lazy
import Task
import Time
import Random
@MattPD
MattPD / cpp.std.coroutines.draft.md
Last active March 29, 2024 17:40
C++ links: Coroutines (WIP draft)
@Leandros
Leandros / random.h
Created July 2, 2018 05:22
C++ Pseudo Random Number Generators
/* Copyright (c) 2018 Arvid Gerstmann. */
/* This code is licensed under MIT license. */
#ifndef AG_RANDOM_H
#define AG_RANDOM_H
class splitmix
{
public:
using result_type = uint32_t;
static constexpr result_type (min)() { return 0; }
@elbeno
elbeno / fibonacci.cpp
Last active May 19, 2020 03:55
O(log n) fibonacci numbers
#include <utility>
// The 2x2 fibonacci matrix
//
// { F(n+1) F(n) }
// { F(n) F(n-1) }
//
// can be represented as just the bottom row, since the top row can be computed:
// so just use a pair.
template <typename N>
@danharper
danharper / CancellationTokenSource.js
Last active January 7, 2024 17:58
JavaScript "CancellationToken" for cancelling Async/Promise functions
const CANCEL = Symbol();
class CancellationToken {
constructor() {
this.cancelled = false;
}
throwIfCancelled() {
if (this.isCancelled()) {