Skip to content

Instantly share code, notes, and snippets.

View amdgigabyte's full-sized avatar
🤘
Working at Alibaba Growth Hacker Team

ZhangZipeng amdgigabyte

🤘
Working at Alibaba Growth Hacker Team
View GitHub Profile
@amdgigabyte
amdgigabyte / cloudSettings
Last active November 12, 2019 03:40
My VSCode Settings
{"lastUpload":"2019-11-12T03:40:21.845Z","extensionVersion":"v3.4.3"}
@amdgigabyte
amdgigabyte / gist:69aada514f64a3d8aa06b2e23ce31521
Created April 28, 2016 02:28 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
input {
width:500px;
}
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="KISSY XTemplate Test" />
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://g.tbcdn.cn/kissy/k/1.4.3/seed.js"></script>
</head>
<body>
<script>
@amdgigabyte
amdgigabyte / git_2_svn.sh
Created October 8, 2012 11:51
from git repo to svn repo
#! /bin/sh
# build from git repo to svn repo
srcDir=~/Sites/workspace/pix/
vsDir=~/Sites/vhosts/a.tbcdn.cn/apps/pix/
toolsDir=$srcDir'tools/'
echo 'Now build from Git branch to SVN branch'
gitTimeStamp=`git st $srcDir | grep -Eo '(SVN.*$|SVN/TRUNK)'`
gitTimeStamp=${gitTimeStamp##SVN/}
@amdgigabyte
amdgigabyte / 多remote host配置
Last active August 24, 2018 03:13
sample for different keys for different users
#Default GitHub
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
#Default GitHub
Host github-company
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_OTHER_LABEL
@amdgigabyte
amdgigabyte / chost.sh
Created May 19, 2012 08:51
quick change your host
#! /bin/bash
# change my hosts
#
# USAGE #
# chost local(default)
# chost daily
# chost online
#
mode=$1
@amdgigabyte
amdgigabyte / compress.sh
Created April 20, 2012 13:49
YUIcompressor Shell Script
#! /bin/bash
# YUI Compressor Bash Script
# @author qiaofu@taobao.com
# @version 0.1 2012-04-20
# 安装 #
# 1. 设置好你的JAVA_HOME环境变量
# 2. 在自己的家目录下面创建一个bin文件夹 ~/bin
# 2. 复制这个 compress.sh 以及 yuicompressor.jar 到 ~/bin,并执行
# chmod +x compress.sh(以保证compress.sh可执行)