Skip to content

Instantly share code, notes, and snippets.

View ms2008's full-sized avatar
🏠
Working from home

Yufu Zhao ms2008

🏠
Working from home
View GitHub Profile
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@janlay
janlay / README.md
Last active June 27, 2022 15:27
Delete and unfavorite tweets

Delete and unfavorite tweets

This util deletes your historical tweets from a downloaded archive file, unfavorites tweets from your public profile.

No guarantee, no support, use it at your own risk.

Preparations

  1. Apply to become a Twitter developer first.
    Once your Twitter developer account application is approved, You can create a new app and get its Consumer API keys and generate Access token. These keys are used to configure tweet.sh.
  2. Obtain archived tweets by requesting to download your Twitter data.
    You can extract tweet.js file from the downloaded .zip file.
@alex-leonhardt
alex-leonhardt / main.go
Last active March 9, 2024 04:23
golang text/template with a map[string]interface{} populated from mixed json data
package main
import (
"encoding/json"
"os"
"reflect"
"text/template"
)
@rowanmanning
rowanmanning / README.md
Last active February 18, 2024 21:12
Writing a Friendly README. This a companion-gist to the post: http://rowanmanning.com/posts/writing-a-friendly-readme/
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active July 24, 2024 13:41
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@tqcenglish
tqcenglish / ChineseCharToEn.java
Last active January 15, 2021 12:07
Java汉字拼音首字母提取
package com.zycoo.android.sip.util;
import java.io.UnsupportedEncodingException;
/**
* 取得给定汉字串的首字母串,即声母串 Title: ChineseCharToEn
*
* {@link http://blog.csdn.net/fei1502816/article/details/8446049}
*
* @date 2004-02-19 注:只支持GB2312字符集中的汉字
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs