Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
#====================================================================
# vps_auto_backup.sh
#
# Copyright (c) 2011, WangYan <[email protected]>
# All rights reserved.
# Distributed under the GNU General Public License, version 3.0.
#
# vps automatic local and offsite backup shell cript
#
@jiaozhu
jiaozhu / getPidByPort.sh
Created January 21, 2014 06:27
根据进程的监听端口查找进程的PID
#! /bin/sh
#####################################################################
# #
# Find process PID by port script #
# Env:Linux #
# Copyright (c) 2013, jiaozhu <[email protected]> #
# All rights reserved. #
# Distributed under the GNU General Public License, version 3.0. #
# #
@jiaozhu
jiaozhu / chkException
Created March 7, 2014 01:53
自动检测WebLogic日志中的Exception信息段
#!/bin/sh
#====================================================================
# chkException.sh
#
# Copyright (c) 2013, 赵伟杰 <[email protected]>
# All rights reserved.
# Distributed under the GNU General Public License, version 3.0.
#
# 自动检测WebLogic日志中的Exception信息段
@jiaozhu
jiaozhu / gist:9500373
Last active August 29, 2015 13:57 — forked from lucasfais/gist:1207002
Sublime Text 2 – Useful Shortcuts (Mac OS X)

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@jiaozhu
jiaozhu / 0_reuse_code.js
Created June 13, 2014 23:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jiaozhu
jiaozhu / CheckCpuUsage.sh
Last active August 29, 2015 14:02
定期检测操作系统的CPU使用率,如果超过60%,则生成THREADDUMP文件
#!/bin/ksh
#####################################################################
# #
# Env:Aix #
# Copyright (c) 2014, jiaozhu <[email protected]> #
# All rights reserved. #
# Distributed under the GNU General Public License, version 3.0. #
# #
#####################################################################
@jiaozhu
jiaozhu / healthcheck.sh
Last active August 29, 2015 14:03
定期检测JAVA进程CPU占用,假如超过10%,则生成THREADDUMP信息
#/bin/sh
#####################################################################
# #
# Env:Aix #
# Copyright (c) 2014, jiaozhu <[email protected]> #
# All rights reserved. #
# Distributed under the GNU General Public License, version 3.0. #
# #
#####################################################################
@jiaozhu
jiaozhu / gist:0b2993074df77be2c8b4
Created September 14, 2014 13:58
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
package com.blogspot.alotacode.scheduler;
import java.util.List;
import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;
import org.springframework.scheduling.quartz.QuartzJobBean;
#!/usr/bin/env bash
echo 'deb http://shadowsocks.org/debian wheezy main' >> /etc/apt/sources.list
# Pre-requisites
sudo apt-get -y update
sudo apt-get -y install pptpd
sudo apt-get -y install fail2ban
sudo apt-get -y install shadowsocks-libev