Skip to content

Instantly share code, notes, and snippets.

View user454322's full-sized avatar
💭
I may be slow to respond.

Javier user454322

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
# Prints information about the Java threads that consumes most of the CPU
# Derived from the information given in the blog entry at
#
# http://nurkiewicz.blogspot.be/2012/08/which-java-thread-consumes-my-cpu.html
#
# Changelog:
#
# - Removed the `top', `perl', and `grep' dependencies.
#!/bin/sh
policy=${HOME}/.jstatd.all.policy
[ -r ${policy} ] || cat >${policy} <<'POLICY'
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
POLICY
jstatd -J-Djava.security.policy=${policy} &
@user454322
user454322 / git-info.sh
Last active April 28, 2016 05:54 — forked from shrwnsan/.profile
git similar to svn info.From stechico
#!/usr/bin/env bash
# author: Duane Johnson
# email: duane.johnson@gmail.com
# date: 2008 Jun 12
# license: MIT
#
# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496
pushd . >/dev/null