Skip to content

Instantly share code, notes, and snippets.

View liushooter's full-sized avatar

Shooter liushooter

View GitHub Profile
@liushooter
liushooter / apple80211
Last active July 16, 2024 09:11 — forked from networkextension/apple80211
apple80211
# https://www.jdeen.com/blog/airport-the-nifty-command-line-wireless-utility-for-macos
apple80211 interface_name [-qvh] -cmd[=new_val]
-q: Quiet mode. Produce script-friendly output.
-h: Verbose help.
-v: Verbose output.
-40int=[true/false] Get/Set 40 MHz intolerance.
-2g_chain_disable=[0/1,0/1] Get/Set 2Ghz shared chain disable and reassoc. [disabled,reassoc]
-acl_add=[mac addr,] Comma separated list of mac addresses to add to ACL list for the interface
-acl_flush Remove all entries from the ACL list for the interface
@liushooter
liushooter / solana-nft-anchor.rs
Created October 26, 2023 05:25
solana-nft-anchor.rs
use anchor_lang::prelude::*;
use anchor_spl::{
associated_token::AssociatedToken,
metadata::{
create_master_edition_v3, create_metadata_accounts_v3, CreateMasterEditionV3,
CreateMetadataAccountsV3, Metadata,
},
token::{mint_to, Mint, MintTo, Token, TokenAccount},
};
use mpl_token_metadata::{
@liushooter
liushooter / block.py
Created March 2, 2023 12:42 — forked from ChristopherJohnston/block.py
Example Blockchain hash calculations using Python
from hashlib import sha256
import time
import struct
import binascii
import datetime
VERSION = 1
def hexify(value, type):
return binascii.hexlify(struct.Struct(type).pack(value))
@liushooter
liushooter / 结巴词性标记集
Created August 10, 2022 14:00 — forked from hscspring/结巴词性标记集
结巴词性对照表
- a 形容词
- ad 副形词
- ag 形容词性语素
- an 名形词
- b 区别词
- c 连词
- d 副词
- df
- dg 副语素
- e 叹词
@liushooter
liushooter / Notes.md
Created March 5, 2022 04:17 — forked from oleksis/Notes.md
Discussion API, Graphql using gh CLI
@liushooter
liushooter / !wasmllvm.md
Created February 7, 2022 12:15 — forked from yurydelendik/!wasmllvm.md
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
@liushooter
liushooter / .rustfmt.toml
Created February 6, 2022 02:04 — forked from Robbepop/.rustfmt.toml
.rustfmt.toml with all configs, descriptions, parameters and defaults for version 0.7.1 of rustfmt.
# ----------------------------------------------------------------------------------
# r u s t f m t - C O N F I G
# ==================================================================================
#
# Version: 0.7.1
# Author : Robbepop <[email protected]>
#
# A predefined .rustfmt.toml file with all configuration options and their
# associated description, possible values and default values for use in other
# projects.
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
# Forked from the original to do the opposite: Switch ssh repo urls to https
# Original here: https://gist.github.com/m14t/3056747
# Thanks to @m14t
#origin or upstream
REMOTE=${1-origin}
REPO_URL=`git remote -v | grep -m1 "^$REMOTE" | sed -Ene's#.*([email protected]:[^[:space:]]*).*#\1#p'`
@liushooter
liushooter / semantic-ui-placeholders.md
Created August 27, 2021 10:43 — forked from tuur29/semantic-ui-placeholders.md
Semantic UI 1 & 2 Placeholders

Semantic UI 1 & 2 Placeholders

Avatars v1

Path: https://semantic-ui.com/images/avatar/[size]/[name].jpg
Sizes: large or small

  • https://semantic-ui.com/images/avatar/small/ade.jpg
  • https://semantic-ui.com/images/avatar/small/chris.jpg
  • https://semantic-ui.com/images/avatar/small/christian.jpg
@liushooter
liushooter / ffmpeg-compress-mp4
Created July 20, 2021 04:07 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4