Skip to content

Instantly share code, notes, and snippets.

View bc-lee's full-sized avatar

Byoungchan Lee bc-lee

  • Hyperconnect. LLC.
  • Seoul, Korea
  • 06:55 (UTC +09:00)
View GitHub Profile
@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active May 20, 2024 16:43
Remove obsolete GPG key from DNF (Fedora)
@zingaburga
zingaburga / sve2.md
Last active May 23, 2024 13:40
ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

Scalable Vector Extensions (SVE) is ARM’s latest SIMD extension to their instruction set, which was announced back in 2016. A follow-up SVE2 extension was announced in 2019, designed to incorporate all functionality from ARM’s current primary SIMD extension, NEON (aka ASIMD).

Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the [Fugaku supercomputer](https://www.fujitsu.com/global/about/innovation/

@Tamal
Tamal / set-chroot.sh
Last active May 23, 2024 08:49
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition
$ cat /mnt/etc/fedora-release
Fedora release 31 (Thirty One)
$ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition
$ mount /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition
# Note: If you are not able to mount EFI partition ('Input/Output error'),
# You may have to repair ESP file system or format ESP.
@MattPD
MattPD / cpp.std.coroutines.draft.md
Last active May 10, 2024 06:45
C++ links: Coroutines (WIP draft)
@yohhoy
yohhoy / yuvrgb.md
Last active May 23, 2024 08:11
RGB <=> YCbCr(YPbPr) color space conversion
Y  = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 BT.709 BT.2020
a 0.299 0.2126 0.2627
b 0.587 0.7152 0.6780
@cmsj
cmsj / homegnu.sh
Last active April 28, 2019 13:38
#!/bin/echo Don't execute this script directly, source it into your shell.
# This script will attempt to make your macOS system behave more like GNU for shell scripts
# by diverting as many commands as possible, to the GNU versions, provided by Homebrew
#
# For most Homebrew tools, their presence in /usr/local/bin and that being in your $PATH
# means you can use them as-is, but some tools appear with different names because macOS
# already has such a tool (e.g. find(1)). These tools generally also have a `gnubin` path
# which we can use to make them higher priority than the macOS equivalents.
#
# To use this:
@gcbrueckmann
gcbrueckmann / JSONValue.swift
Last active January 22, 2023 14:46
Decode arbitrary JSON values using Swift.Decodable
import Foundation
/// Wrapper allowing decoding of arbitrary JSON values,
/// i. e. values whose specific type is not known at compile time.
///
/// This is a workaround for Swift 4’s decoding system not allowing
/// something like `JSONDecoder().decode([String: Any], forKey: .foo)`,
/// because `Any` does not (and cannot) conform to `Decodable`.
///
/// Access the underlying value using the `anyValue` property.
@texus
texus / toLower.cpp
Last active April 16, 2024 15:00
String to lowercase at compile time with with c++14
// This file contains code on how to convert a string to lowercase at compile time.
// A large part of the imlementation was taken from http://stackoverflow.com/a/15912824/3161376 which solved the problems that I had in the old implementation.
// The string struct will hold our data
// The declaration of our string struct that will contain the character array
template<char... str>
struct string
{
// The characters are immediately converted to lowercase when they are put in the array
@JPvRiel
JPvRiel / apt_pinning_priorities.md
Last active April 22, 2024 19:42
Apt package pinning and priorities
With SecureCRT closed, edit your Global.ini which lives by default in %appdata%\VanDyke\Config\Global.ini,
find the three lines the start with B:"ANSI Color RGB" and replace it and the two lines of hex below it with:
B:"ANSI Color RGB"=00000040
00 2b 38 00 dc 32 2f 00 85 99 00 00 b5 89 00 00 26 8b d2 00 d3 36 82 00 2a a1 98 00 ee e8 d5 00
07 36 42 00 cb 4b 16 00 58 6e 75 00 65 7b 83 00 83 94 96 00 6c 71 c4 00 93 a1 a1 00 fd f6 e3 00
(from https://web.archive.org/web/20140117045940/http://jessicalitwin.com/index.php/2013/02/solarized-for-securecrt/)