Skip to content

Instantly share code, notes, and snippets.

View bxb100's full-sized avatar
😭
R.I.P, My friends

Lemon bxb100

😭
R.I.P, My friends
View GitHub Profile
@bxb100
bxb100 / gist:3477f298a3496efb5c8054ca7b03e531
Created April 23, 2023 14:55 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@bxb100
bxb100 / README.md
Last active April 14, 2023 08:03
Display time elapse in your terminal

Initiate

Laurence build a tiny project to show washing time remaining elapse in the terminal[^1], that idea is very fun. and I was very curious about all code behind of this

Using ChatGPT to explain

#! /bin/sh
set -e

P1: jextract

Using

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro17,1
 Chip: Apple M1
@bxb100
bxb100 / awk usage.md
Last active January 29, 2023 09:01
AWK 常见的一些使用方式

筛选出一个 function

从以 function digga() 开头的行到 } 开头行结束

awk '/^function digga()/,/^}/' .functions

获取文本中 m3u8 链接

正则获取有 m3u8 链接行, 然后正则替换 ; 为空字符, 然后打印以 -F fs( fs 默认为 white space ) 分隔的第 4 个字符串

@bxb100
bxb100 / zigzag-encoding.README
Created November 26, 2022 17:15 — forked from mfuerstenau/zigzag-encoding.README
ZigZag encoding/decoding explained
ZigZag-Encoding
---------------
Maps negative values to positive values while going back and
forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...)
(i >> bitlength-1) ^ (i << 1)
with "i" being the number to be encoded, "^" being
XOR-operation and ">>" would be arithemtic shifting-operation
@bxb100
bxb100 / github-draft-release-snippet.yml
Created October 12, 2022 04:46
create draft release
create_draft_release:
name: Create Github draft release
runs-on: ubuntu-latest
steps:
- name: Audit gh version
run: gh --version
- name: Check for existing release
id: check_release
run: |
@bxb100
bxb100 / bash_strict_mode.md
Created October 12, 2022 02:41 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@bxb100
bxb100 / NIX install in macOS.md
Last active September 4, 2022 02:47
It's work for me on Apple Silicon