Skip to content

Instantly share code, notes, and snippets.

View kim366's full-sized avatar

Kim Schmider kim366

  • Sydney
View GitHub Profile
@rougier
rougier / hl-block.el
Created January 5, 2025 16:47
Emacs / highlight logical block at point
;;; hl-block.el --- Highlight logical block at point -*- lexical-binding: t -*-
;; Copyright (C) 2025 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; Package-Requires: ((emacs "27.1"))
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@BastianBlokland
BastianBlokland / qmk-config-jj40.md
Last active September 23, 2021 07:22
Configuration for jj40 keyboard

JJ-40 Keyboard mapping

Preview image Preview image

Hardware

  • Board: jj-40 v1.5 (QMK compatible)
  • Switches: Zealios 62g
  • Caps: DSA blanks
  • Case: KPrepublic Aluminium
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <deque>
#include <future>
#include <iostream>
#include <mutex>
#include <thread>
#include <vector>
@WebReflection
WebReflection / hyper-lit.md
Last active November 8, 2022 03:55
lit-html is awesome, but it came afterwards

The history of hyperHTML followed by lit-html

While many remember the epic hyperHTML: A Virtual DOM Alternative post I've published the 5th of March 2017, the first official implementation of the library was working as hyperHTML.bind(node) function for tagged literals the day before, and it's been in my experiments folder already for a little while.

The hilarious reaction from the skeptical community

At first glance people couldn't believe performance of the DBMonster demo shown in that article,

@MarioLiebisch
MarioLiebisch / rotate.cpp
Created August 25, 2017 08:30
Transforming a vector using SFML, e.g. by rotating it by 45 degree.
#include <SFML/Graphics/Transform.hpp>
#include <SFML/System/Vector2.hpp>
#include <iostream>
int main() {
// First we'll need a vector to tranform
sf::Vector2f myVector(2, 0);
std::cout << "myVector: " << myVector.x << ", " << myVector.y << "\n";
// Then the actual transform
@JBlond
JBlond / bash-colors.md
Last active December 6, 2025 01:57 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@lukas-h
lukas-h / license-badges.md
Last active December 8, 2025 13:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@bkaradzic
bkaradzic / orthodoxc++.md
Last active November 3, 2025 04:11
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@p2004a
p2004a / defer.cpp
Last active October 17, 2025 07:28
Simple defer macro for c++
// SPDX-FileCopyrightText: 2015 Marek Rusinowski
// SPDX-License-Identifier: MIT
#include <memory>
#include <cstdio>
template<typename F>
class defer_finalizer {
F f;
bool moved;
public:
@kylemcdonald
kylemcdonald / smootheststep.txt
Last active December 19, 2019 23:22
Derivation of 7th-order smoothstep function with zeros in third derivative.
7th-order spline and first three derivatives
f(t) = a_7 t^7+a_6 t^6+a_5 t^5+a_4 t^4+a_3 t^3+a_2 t^2+a_1 t+a_0
f'(t) = 7 a_7 t^6+6 a_6 t^5+5 a_5 t^4+4 a_4 t^3+3 a_3 t^2+2 a_2 t+a_1
f''(t) = 42 a_7 t^5+30 a_6 t^4+20 a_5 t^3+12 a_4 t^2+6 a_3 t+2 a_2
f'''(t) = 210 a_7 t^4+120 a_6 t^3+60 a_5 t^2+24 a_4 t+6 a_3
Constraints
f(0) = 0 = a_0
f(1) = 1 = a_7 + a_6 + a_5 + a_4 + a_3 + a_2 + a_1 + a_0
f'(0) = 0 = a_1