Skip to content

Instantly share code, notes, and snippets.

View zouguangxian's full-sized avatar

Zou Guangxian zouguangxian

View GitHub Profile
#!/bin/sh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -e 's/^plugins.*)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-completions)/' -e 's,^ZSH_THEME=.*,ZSH_THEME="powerlevel10k/powerlevel10k",' -i '' ~/.zshrc
@zouguangxian
zouguangxian / gist:2e524851fde5bddcb965
Created April 4, 2015 02:47
Firefox Responsive Design View Presents
[
{"key":"1920 x 1080","name":"Nexus 5 Landscape","width":1920,"height":1080},
{"key":"1080 x 1920","name":"Nexus 5 Portrait","width":1080,"height":1920},
{"key":"1024 x 768","name":"iPad Landscape","width":1024,"height":768},
{"key":"768 x 1024","name":"iPad Portrait","width":768,"height":1024},
{"key":"768 x 1024","name":"iPad 1 & 2","width":768,"height":1024},
{"key":"1536 x 2048","name":"iPad 3 & 4","width":1536,"height":2048},
{"key":"736 x 414","name":"iPhone 6 Plus Landscape","width":736,"height":414},
{"key":"414 x 736","name":"iPhone 6 Plus Portrait","width":414,"height":736},
{"key":"667 x 375","name":"iPhone 6 Landscape","width":667,"height":375},
@zouguangxian
zouguangxian / bandstats.pl
Created July 6, 2012 06:29
analyze access.log to get bandwidth statistics, perl version
#!/usr/bin/env perl
use Date::Parse;
use Date::Format;
use List::Util qw[min max];
$\="\n";
my %slot=();
my $STEP = 60;
while ($line=<>) {
@zouguangxian
zouguangxian / bandstats.py
Created July 6, 2012 06:28
analyze access.log to get bandwidth statistics
#!/usr/bin/env python
import sys
import re
import datetime
import time
STEP = 60
result = {}
while True:
@zouguangxian
zouguangxian / 12306.user.js
Created January 8, 2012 08:47 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js