Skip to content

Instantly share code, notes, and snippets.

View Fuwn's full-sized avatar
✒️
亀の甲より年の功

Fuwn Fuwn

✒️
亀の甲より年の功
View GitHub Profile
@0atman
0atman / rust-perfect.md
Created May 19, 2022 16:52
The sourcecode to my Rust Perfect presentation (available here https://www.youtube.com/watch?v=IA4q0lzmyfM)

Rust

Your code can be perfect

%% As developers we build critical infrastructure, it's time to build it in a language designed to build critical infrastructure. %%

@andrewjpritchard
andrewjpritchard / fizzBuzz.ts
Last active May 16, 2022 19:50
FizzBuzz implementation using nothing but closures
type Fix<A> = (arg: Fix<A>) => A
type Unit = <T>(
unit: () => T
) => T;
type Bool = <T>(
$true: () => T,
$false: () => T,
) => T;

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

let x(t) = distance from dest on x
let y(t) = distance from dest on y
let z(t) = distance from dest on z
let r(t)^2 = x(t)^2 + y(t)^2 + z(t)^2
let f(t) = force
x(0) initial condition
y(0) initial condition
z(0) initial condition
f(t)
@n01e0
n01e0 / _Generic.md
Last active August 23, 2019 07:42
Cでジェネリック

Cでジェネリック

Cでもジェネリックが使える

関数オーバーロードみたいな感じ

引数の型によって関数の動作を変えたい

前に任意の型を引数に取る関数の実装を行ったが、なかなか無理があった。

あれではまだ満足出来ない。

与えた引数の型からマクロが呼び出す関数を変えるようにしたい。

@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active October 23, 2024 02:56
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key
@xamantra
xamantra / [ANIME]MyAnimeList-DeleteAllEntry-ClassicListStyle.js
Last active July 13, 2024 11:46
Delete all entries inside a list category in MAL. Useful for getting a fresh start in your Plan to Watch or any other section (Completed, On Hold, Dropped, Currently Watching).
var index = 0;
if (confirm(`Are you sure you want to DELETE ALL your entries in this section?`)) {
$("a.animetitle").each(function () {
var animeLink = $(this).attr("href");
var animeId = animeLink.substring(
animeLink.lastIndexOf("anime/") + 6,
animeLink.lastIndexOf("/")
);
var deleteUrl = `/ownlist/anime/${animeId}/delete`;
setTimeout(function () {
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active November 18, 2024 23:14
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@Fobxx
Fobxx / shige-skins.md
Last active November 15, 2024 08:46
Shigetora skins
@fnky
fnky / ANSI.md
Last active November 19, 2024 04:55
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27