Skip to content

Instantly share code, notes, and snippets.

jaseywang jaseywang

Block or report user

Report or block jaseywang

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
thanksdanny / LC_CTYPE.txt
Created Dec 27, 2016 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
View LC_CTYPE.txt
vi /etc/environment
add these lines...
vasanthk / System
Last active Jun 27, 2019
System Design Cheatsheet
View System

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
View axure-pro-7.0-license-key.txt
Axure RP 7.0注册码
View Java Code - Url
package testjava;
import java.util.HashMap;
import java.util.Random;
* URL Shortener
public class URLShortener {
// storage for generated keys
asiegman / nginx.conf
Created Jan 29, 2015
nginx logstash output
View nginx.conf
# Output json-esque output for logstash to parse easily.
http {
# ...
log_format logstash_json '{"@timestamp": "$time_iso8601", '
'"remote_addr": "$remote_addr", '
'"remote_user": "$remote_user", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '
sh1n0b1 /
Created Apr 8, 2014
Python Heartbleed (CVE-2014-0160) Proof of Concept
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
thomasfr /
Last active Jun 22, 2019
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
# Allow connections to this package servers
jaseywang / nexus 752
Created Jan 16, 2014
nexus 752 step by step
View nexus 752
1. 7004_A
feature vpc
feature lacp
no ip domain-lookup
建立 VRF 与 peer-keepalive,将建立的 peer-keepalive 成员端口加入到 VRF 中,与 7004 的路由表隔离
interface mgmt0
vrf member management
ip address
Fluidbyte /
Last active May 18, 2019
Basic principles of using tcl-expect scripts


TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

View cpu l1, l2, l3 cache
# dmidecode -t cache
# dmidecode 2.9
SMBIOS 2.6 present.
Handle 0x0700, DMI type 7, 19 bytes
Cache Information
Socket Designation: Not Specified
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
You can’t perform that action at this time.