This file contains 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
(function(f) { | |
var d, e, p = function() { | |
d = (new (window.UAParser || exports.UAParser)).getResult(); | |
e = new Detector; | |
return this | |
}; | |
p.prototype = { | |
getSoftwareVersion: function() { | |
return "0.1.11" | |
}, |
This file contains 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/perl | |
# This script parses Git blame's "porcelain" output format and | |
# ascertains the oldest lines of code seen. | |
# | |
# If you want to perform a custom report, just define your own callback | |
# function and invoke parse_porcelain() with it. | |
# | |
# The expected input format is slightly modified from raw `git blame | |
# -p`. Here is an example script for producing input: |
This file contains 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 python | |
# | |
# A script that runs the commands to perform Netflix's | |
# "Linux Performance Analysis in 60,000 Milliseconds" | |
# | |
# (http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html) | |
# | |
import subprocess | |
import datetime | |
import argparse |
This file contains 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
/* | |
*url:http://www.cnblogs.com/yuuyuu/p/5103744.html | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <fcntl.h> |
This file contains 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
#!stap | |
global elapsed_times | |
global stack_depths_by_tid | |
probe begin { | |
printf("%s\n","running ... ") | |
} | |
probe end{ | |
printf("%s\n","ending .... ") |
This file contains 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
jmap -dump:live,format=b,file=heap-`date +%Y%m%d%H%M`.bin `pgrep -u admin java` |
This file contains 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
_oo0oo_ | |
o88888880 | |
88" . "88 | |
(| -_- |) | |
0\ = /0 | |
____/`---'\____ | |
' \\| + |// ` | |
/ \\||| : ||// \ | |
/ _|||| -:- ||||- \ |
This file contains 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
typeset top=${1:-10} | |
typeset pid=${2:-$(pgrep -u $USER java)} | |
typeset tmp_file=/tmp/java_${pid}_$$.trace | |
# fix for alibaba-inc.com | |
export JAVA_HOME=/opt/taobao/java | |
$JAVA_HOME/bin/jstack $pid > $tmp_file | |
ps H -eo user,pid,ppid,tid,time,%cpu --sort=%cpu --no-headers\ | |
| tail -$top\ |
This file contains 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
(function () { | |
if (top.location != self.location) { | |
return false; | |
} | |
var tu = unescape(self.location); | |
if (htmlspecialchars(tu).length != tu.length) { | |
exit; | |
} | |
if (tu && ((tu.indexOf("http://union-click.jd.com/") === 0) || (tu.indexOf("https://union-click.jd.com/") === 0))) { | |
if (!window.attachEvent) { |
This file contains 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 |
NewerOlder