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 November 13, 2024 07:51
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 June 20, 2024 13:21
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 November 6, 2024 13:47
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 August 7, 2024 14:39
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 November 5, 2024 23:05
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 October 20, 2024 03:04 — 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 November 15, 2024 17:43
set -e, -u, -o, -x pipefail explanation
@nadavrot
nadavrot / Matrix.md
Last active November 15, 2024 16:00
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