Skip to content

Instantly share code, notes, and snippets.

View IceCodeNew's full-sized avatar

IceCodeNew IceCodeNew

  • PKU
  • Beijing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am IceCodeNew on github.
  • I am icecodenew (https://keybase.io/icecodenew) on keybase.
  • I have a public key whose fingerprint is 93CA 1D1A 13C7 B663 6169 343E 6DDF C44F 6354 77A0

To claim this, I am signing this object:

@IceCodeNew
IceCodeNew / 關於端傳媒文章排版的意見反饋 - 配圖版.md
Created August 14, 2018 07:40
關於端傳媒文章排版的意見反饋 - 配圖版

端傳媒的工作人員您好,

我最近在閱讀端傳媒的文章時,常常對文章的排版風格感到困惑。因此我想通過這個意見反饋的渠道,和端傳媒的工作人員交流一些文章排版的意見,請您多多指敎。

下面我以文章 如何讓青年點燃第一根菸?超級英雄從漫畫到影視的戒菸記 爲例說明。

APP 內顯示效果 - 圖一 首先是正文中的「近2/3角色為青少年、顯然也以青少年為目標市場的《X-men First Class 》(X戰警:第一戰)」這句話,書名號中的影片名並沒有在左右兩側對稱的加上空格——字母 X 與左側書名號之間沒有空格,而單字 class 結尾的字母 s 與右側書名號之間卻加上了一個空格。在端傳媒的 APP 中,因爲所使用字型的關係,這樣的差別會變得非常明顯(右側的書名號與字母 s 之間隔了很大的一段距離,我覺得非常難看)

APP 內顯示效果 - 圖二

@IceCodeNew
IceCodeNew / android-captive.sh
Created September 9, 2019 08:16 — forked from tonyseek/android-captive.sh
Overrides the captive portal settings of Android in the People's Republic China Mainland
#!/usr/bin/env sh
adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204
adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204
adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
@IceCodeNew
IceCodeNew / resumedat_2015.rb
Created November 10, 2019 18:52 — forked from naodesu/resumedat_2015.rb
Convert added torrents data from uTorrent (resume.dat) to qBittorrent (*.fastresume) format
# encoding: utf-8
# USE AT OWN RISK
#
# Follow this guide to install Ruby on Windows (step 1 and 2): https://forwardhq.com/support/installing-ruby-windows
# Install gems (with admin cmd prompt):
# https://rubygems.org/gems/bencode
# https://rubygems.org/gems/rest_client
#
# Edit datpath below to point to your utorrent resume.dat file
@IceCodeNew
IceCodeNew / haproxy-config-2-0.cfg
Created April 21, 2020 07:33 — forked from haproxytechblog/haproxy-config-2-0.cfg
HAProxy 2.0 configuration
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
@IceCodeNew
IceCodeNew / google-fonts-proxy
Created April 25, 2020 05:18 — forked from gaoyifan/google-fonts-proxy
google-fonts-proxy
server {
listen 80;
listen 443;
listen [::]:80;
listen [::]:443;
server_name fonts.lug.ustc.edu.cn;
access_log /var/log/nginx/revproxy_access.log;
error_log /var/log/nginx/revproxy_error.log;
@IceCodeNew
IceCodeNew / HAProxy-transparent-web-services-routing.md
Created May 24, 2020 08:01 — forked from mhofman/HAProxy-transparent-web-services-routing.md
Leverage HAProxy to transparently route requests to web services identified by host name.

Web Service Fronting

Multiple Web properties on a single IP address

Hosting multiple websites on a single public IP address on the standard HTTP(S) ports is relatively easy with popular web servers like Apache, Nginx and lighttpd all supporting Virtual Hosts.
For Web Services which bundle their own HTTP server, things get more complicated, unless their HTTP stack can be shared somehow. More often than not, the application's HTTP stack listens directly on a dedicated TCP port.

Hosting multiple services on a single IP then requires using a fronting server listening on the standard HTTP port, and routing to the right backend service based on the host name or the path sent by the client.
Path based routing is cumbersome, usually requiring either the service to be aware of the path prefix, or a rewrite by the HTTP fronting server of all absolute URLs in the requests and responses.
Hostname based routing is more straightforward. The fronting server can just look at the [HTTP/1.1 Host header](https://tools

@IceCodeNew
IceCodeNew / ipa.md
Created June 16, 2020 04:54 — forked from k4yt3x/ipa.md
ipa: A shell alias that will simplify your "ip address" output

ipa

Description

ipa is a shell function that will display the distilled informaiton from the ip a command.

Screenshots

ipa screenshot

@IceCodeNew
IceCodeNew / zshrc
Created June 16, 2020 04:54 — forked from k4yt3x/zshrc
K4YT3X Server/Community zshrc
# K4YT3X Server/Community zshrc
# Version 2020.06.15
#
# Licensed under the GNU General Public License Version 3 (GNU GPL v3),
# available at: https://www.gnu.org/licenses/gpl-3.0.txt
# (C) 2018-2020 K4YT3X
#
# Gist Page: https://gist.github.com/k4yt3x/3b41a1a65f5d3087133e449793eb8858
# Short URL: akas.io/z
# Quick Install: curl -LsSf akas.io/z -o ~/.zshrc