Skip to content

Instantly share code, notes, and snippets.

View ziyi-yan's full-sized avatar
⤴️
Pivoting

Ziyi Yan ziyi-yan

⤴️
Pivoting
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active July 7, 2024 19:42
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:

@mogami95
mogami95 / Easy Steak Recipe.md
Last active June 16, 2024 03:04
牛排初級教程

牛排初級教程

長期材料:

鍋(frying pan)

鑄鐵鍋(cast iron)最好, 但是鑄鐵鍋需要開鍋養鍋而且特別沉, 更適合專業人士, 推薦這個Lodge品牌的
不鏽鋼鍋(stainless)其次, 不用開鍋容易保養而且輕便, 如果有鋁夾層或者銅夾層的更好, 推薦這個T-fal Stainless 26cm Frypan
不要用不粘鍋帶有塗層的鍋, 煎炸的高溫會讓塗層分解產生致癌物
不要用銅面的鍋, 會中毒. 不要用鋁面的鍋, 會老年癡呆

溫度計(cooking thermometer)

@LewisGaul
LewisGaul / zig-blog-posts.md
Last active May 27, 2024 01:09
Collection of blog posts about the Zig programming language
mkdir test
cd test
git clone -b wip/dueno/wasm-test https://github.com/ueno/enarx.git
git clone -b wip/dueno/wasm-test --recurse-submodules https://github.com/ueno/wasmtime.git
cd enarx
cargo make
./enarx-keep-sgx/target/debug/enarx-keep-sgx \
--shim enarx-keep-sgx-shim/target/x86_64-unknown-linux-musl/debug/enarx-keep-sgx-shim \
--code keep-runtime/target/x86_64-unknown-linux-musl/debug/keep-runtime
@ianfoo
ianfoo / git-diff-branch-only.sh
Created September 21, 2019 00:24
Shell function to show git diff only for changes made to a branch
git-diff-branch-only () {
local branch=${1:-$(git branch --show-current)}
local base=${2:-master}
git diff $(git merge-base $branch $base) $branch
}
@Danielmelody
Danielmelody / lambda_RAII.cpp
Last active December 7, 2020 08:08
RAII cleaner in one line
{
// resources are easy to gain by capture, and use in the destructor
std::shared_ptr<int> cleaner(nullptr, [some_captures](int *) { do_something(); });
}
@SunRunAway
SunRunAway / git-pr
Created June 26, 2019 09:17
Use `git pr` to quickly send a pull request in browser.
#!/bin/bash
# put this file in your $PATH
# and chmod +x git-pr
# then use `git pr` in one github repo
repo=`git remote -v | grep push | grep origin | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"`
branch=`git name-rev --name-only HEAD`
echo "... creating pull request for branch \"$branch\" in \"$repo\""
open https://github.com/$repo/pull/new/$branch
@cpcloud
cpcloud / decimalz.md
Created November 14, 2017 22:10
Decimals

Decimal Values in SQL-on-Hadoop

This document lays out the ways in which a few prominent SQL-on-Hadoop systems read and write decimal values from and to parquet files, and their respective in-memory formats.

Parquet's logical DECIMAL type can to be represented by the following physical types.

@baptistedonaux
baptistedonaux / rss.go
Last active February 26, 2020 11:01
Extract RSS in Golang
package main
import (
"encoding/xml"
"io/ioutil"
"log"
"os"
)
type Item struct {
@Starefossen
Starefossen / vim-cheats.md
Last active July 18, 2024 16:40
My vim cheat sheet for working with tabs and window splits.

Tabs

New Tab

  • :tabnew - new blank tab
  • :tabedit [file] - open file in tab

Cursor Movement

  • gt (:tabn) - next tab