Skip to content

Instantly share code, notes, and snippets.

Avatar

xflying flyingfang

View GitHub Profile
@flyingfang
flyingfang / curl-time.sh
Created Jan 19, 2020
curl with time statistic
View curl-time.sh
curl_time() {
curl -so /dev/null -w "\
namelookup: %{time_namelookup}s\n\
connect: %{time_connect}s\n\
appconnect: %{time_appconnect}s\n\
pretransfer: %{time_pretransfer}s\n\
redirect: %{time_redirect}s\n\
starttransfer: %{time_starttransfer}s\n\
-------------------------\n\
total: %{time_total}s\n" "$@"
View check_iPhoneX.py
# coding: utf-8
import requests
import time
import os
store_url = 'https://reserve-prime.apple.com/CN/zh_CN/reserve/iPhoneX/stores.json'
availability_url = 'https://reserve-prime.apple.com/CN/zh_CN/reserve/iPhoneX/availability.json'
stores = [('R320', '三里屯'), ('R645', '朝阳大悦城'), ('R388', '西单'), ('R448', '王府井'), ('R479', '华贸购物中心')]
product = 'MQA82CH/A'
View JsonView_Dark_Theme.css
body {
white-space: pre;
background: #272822;
color: #D7005E;
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;
}
a:link, a:visited {
color: #66D9EF;
}
View git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
You can’t perform that action at this time.