Skip to content

Instantly share code, notes, and snippets.

Shichao An shichao-an

Block or report user

Report or block shichao-an

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@minazou67
minazou67 / howto-upgrade-debian-jessie-kernel.md
Last active Aug 13, 2019
How to upgrade the Linux Kernel of debian 8 jessie
View howto-upgrade-debian-jessie-kernel.md

How to upgrade the Linux Kernel of debian 8 jessie

Debian 8 のカーネルをアップグレードする方法です。

Environment

  • Microsoft Windows Server 2012 R2
  • Hyper-V
  • Debian 8.2 jessie
@nialv7
nialv7 / touhou
Last active Oct 16, 2015
最受同人欢迎的东方曲
View touhou
/* 东方曲按同人曲数量排名 */
U.N.Owen Was Her?: 262
亡き王女の為のセプテット: 256
恋色マスタースパーク: 248
幽雅に咲かせ、墨染の桜 ~ Border of Life: 237
ネクロファンタジア: 188
上海紅茶館 ~ Chinese Tea: 169
おてんば恋娘: 166
竹取飛翔 ~ Lunatic Princess: 163
@simeonf
simeonf / pex.md
Last active May 8, 2019
Creating a PEX from a python script
View pex.md

So you want to create a pex that packages your script and its dependencies?

Ok - first to make our script! Call it foo.py:

import requests

if __name__ == '__main__':
  req = requests.get("https://raw.githubusercontent.com/pantsbuild/pex/master/README.rst")
  print req.text.split("\n")[0]
View dns_pollution_iplist.txt
0.0.0.0
1.1.80.147
1.1.127.45
1.33.190.70
1.33.191.58
1.209.208.200
1.234.1.235
1.234.2.155
1.234.4.97
1.234.17.34
@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active Nov 11, 2019
Runtime Complexity of Java Collections
View gist:c30a821239f4818b0709
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@jkreps
jkreps / benchmark-commands.txt
Last active Nov 2, 2019
Kafka Benchmark Commands
View benchmark-commands.txt
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
View ssh-agent-forwarding-screen.md

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@mgedmin
mgedmin / StartSSL.md
Last active Dec 25, 2018
Free StartSSL.com SSL certificate HOWTO
View StartSSL.md

How to get a free StartSSL.com SSL certificate

I'm writing this up from memory, so errors may appear.

This has been updated to use SHA256 certificates.

Start

  1. Go to http://www.startssl.com/
  2. Click on 'Control Panel'
@mbostock
mbostock / .block
Last active Nov 1, 2019
Save SVG as PNG
View .block
license: gpl-3.0
@clowwindy
clowwindy / ssl.md
Last active Oct 24, 2019
为什么不应该用 SSL 翻墙
View ssl.md

SSL 设计目标:

  1. 防内容篡改
  2. 防冒充服务器身份
  3. 加密通信内容

而翻墙的目标:

  1. 不被检测出客户端在访问什么网站
  2. 不被检测出服务器在提供翻墙服务
You can’t perform that action at this time.