Skip to content

Instantly share code, notes, and snippets.

View Congee's full-sized avatar
🤔
Focus

Changsheng Wu Congee

🤔
Focus
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active May 17, 2024 06:10
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@jeff-heienickle
jeff-heienickle / PostmanDecodeJWT.js
Last active April 2, 2024 11:25
Decode, reuse, and visualize a JWT in Postman
var jsonData = pm.response.json();
pm.environment.set("jwt", jsonData.access_token);
function parseJwt (token,part) {
var base64Url = token.split('.')[part];
var words = CryptoJS.enc.Base64.parse(base64Url);
var jsonPayload = CryptoJS.enc.Utf8.stringify(words);
return JSON.parse(jsonPayload);
};
@gtgteq
gtgteq / droidcam.nix
Created April 3, 2020 08:03
droidcam.nix
{ stdenv, fetchzip, pkgconfig, ffmpeg, gtk2-x11, libjpeg }:
stdenv.mkDerivation rec {
pname = "droidcam";
version = "0";
src = fetchzip {
url = "https://github.com/aramg/droidcam/archive/b49842a02611f8ddc6b9342ef74e299abd1c4090.zip";
sha256 = "05kd5ihwb3fldmalv67jgpw4x0z0q39lfis69r7yh03qiqlviymk";
};
@graninas
graninas / haskell_approaches_comparison_table.md
Last active April 25, 2024 20:49
Haskell Approaches Comparison Table

An Opinionated Comparison of Software Design Approaches in Haskell

| | Raw IO | Free Monads; Church Encoded Free Monads | Final Tagless / mtl | Effect Systems | ReaderT

@bbqtd
bbqtd / macos-tmux-256color.md
Last active May 13, 2024 20:04
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@CMCDragonkai
CMCDragonkai / linux_kernel_modules_nixos.md
Last active April 7, 2024 09:42
Linux Kernel Modules for NixOS #linux #nixos

Linux Kernel Modules for NixOS

You can find what kernel modules are loaded using lsmod.

However some kernel modules are required at stage 1 boot. Basically preloaded in the initial ram disk before switching to the root filesystem. These kernel modules are mostly needed to deal with peripherals, storage devices, filesystems and network devices. You may need to be wary of these required modules:

  • sd_mod - SCSI, SATA, and PATA (IDE) devices
@romainl
romainl / sort.vim
Created December 31, 2018 10:30
Sort operator
function! Sort(type, ...)
'[,']sort
endfunction
nmap <silent> <key> :set opfunc=Sort<CR>g@
" usage:
" <key>ip
" <key>G
@ilius
ilius / article-style.css
Last active February 11, 2024 18:42 — forked from bangedorrunt/article-style.css
GoldenDict Dark Theme
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 17, 2024 12:44
set -e, -u, -o, -x pipefail explanation
@nadavrot
nadavrot / Matrix.md
Last active May 15, 2024 11:20
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of