⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
public class Str2MD5 { | |
public static void main(String[] args) { | |
MD5("sunzn"); | |
} | |
private static String MD5(String sourceStr) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OSValidator { | |
private static String OS = System.getProperty("os.name").toLowerCase(); | |
public static void main(String[] args) { | |
System.out.println(OS); | |
if (isWindows()) { | |
System.out.println("This is Windows"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! http://mths.be/placeholder v2.0.6 by @mathias */; | |
(function (g, i, d) { | |
var a = 'placeholder' in i.createElement('input'), | |
e = 'placeholder' in i.createElement('textarea'), | |
j = d.fn, | |
c = d.valHooks, | |
l, k; | |
if (a && e) { | |
k = j.placeholder = function () { | |
return this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
##################################################################### | |
# # | |
# Env:Aix # | |
# Copyright (c) 2014, jiaozhu <[email protected]> # | |
# All rights reserved. # | |
# Distributed under the GNU General Public License, version 3.0. # | |
# # | |
##################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
##################################################################### | |
# # | |
# Env:Aix # | |
# Copyright (c) 2014, jiaozhu <[email protected]> # | |
# All rights reserved. # | |
# Distributed under the GNU General Public License, version 3.0. # | |
# # | |
##################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |