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
As of Git v1.7.0, you can delete a remote branch using | |
git push origin --delete <branchName> | |
which is easier to remember than | |
git push origin :<branchName> | |
which was added in Git v1.5.0 "to delete a remote branch or a tag." |
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 Control组件安装 | |
按Ctrl+`调出console; | |
粘贴以下代码到底部命令行并回车: | |
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()) | |
重启Sublime Text 2,如果在Perferences->package settings中看到package control这一项,则安装成功; |
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/bash | |
if [ $# -eq 0 ]; then | |
echo >&2 "Usage: jstackSeries <pid> [ <count> [ <delay> ] ]" | |
echo >&2 " Defaults: count = 1000, delay = 10 (seconds)" | |
exit 1 | |
fi | |
pid=$1 # required | |
count=${2:-1000} # defaults to 10 times | |
delay=${3:-10} # defaults to 0.5 seconds | |
while [ $count -gt 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/bash | |
if [ $# -eq 0 ]; then | |
echo >&2 "Usage: jstackSeries <pid> <run_user> [ <count> [ <delay> ] ]" | |
echo >&2 " Defaults: count = 10, delay = 0.5 (seconds)" | |
exit 1 | |
fi | |
pid=$1 # required | |
user=$2 # required | |
count=${3:-10} # defaults to 10 times | |
delay=${4:-0.5} # defaults to 0.5 seconds |
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
var download = function (url) { | |
var iframe = document.createElement('iframe'); | |
iframe.src = url; | |
iframe.style.display = 'none'; | |
document.body.appendChild(iframe); | |
}; |
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
/* | |
Expected Response: | |
{error: '', | |
msg: ' File Name: coolaj86-2010.jpg, File Size: 258472' | |
} | |
*/ | |
(function () { | |
"use strict"; |
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.net.InetAddress; | |
import java.net.NetworkInterface; | |
import java.net.SocketException; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Enumeration; | |
import org.apache.log4j.Logger; | |
public abstract class IPUtil { |
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
Field title = tip.getClass().getDeclaredField("title"); | |
title.setAccessible(true); | |
System.out.println(title.get(tip)); |