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
#!/bin/bash | |
# | |
# Prints the number of MB in the Old Generation and how many | |
# MB are consumed by top memory-consuming classes. | |
# | |
# Usage: jheap [-gc] process_id | |
# | |
# -gc will cause a GC to be triggered just before the measurement | |
# |
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
# Find the url to the latest .tar.gz for linux at the following url and populate it below: | |
# http://www.oracle.com/technetwork/java/javase/downloads/index.html | |
URL=?? | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" $URL | |
rpm -y install filename.tar.gz | |
# If you want to set it/select it as the system-wide "alternative" on CentOS/RHEL, | |
# see http://tecadmin.net/steps-to-install-java-on-centos-5-6-or-rhel-5-6/ |
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
See http://www.washingtonpost.com/news/morning-mix/wp/2015/04/14/when-is-cheryls-birthday-the-math-problem-that-stumped-the-internet/ | |
Cheryl's Birthday Reasoning | |
=========================== | |
Cheryl tells Albert the month of her birthday, and she tells Bernard | |
the day of her birthday. She also tells them both that her birthday | |
is one of the following 10 dates: | |
May 15 16 19 |
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
#!/bin/bash | |
set -e | |
echo "Converting images if needed" | |
cd figs | |
./convert.sh | |
cd .. | |
echo "Building epub version of book" | |
mkdir -p target |
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
[root@ip-10-244-95-152 ~]# vi /tmp/install-selenium-stuff.sh | |
[root@ip-10-244-95-152 ~]# chmod 755 /tmp/install-selenium-stuff.sh | |
[root@ip-10-244-95-152 ~]# /tmp/install-selenium-stuff.sh | |
Loaded plugins: fastestmirror, priorities, security, update-motd | |
Loading mirror speeds from cached hostfile | |
* amzn-main: packages.us-east-1.amazonaws.com | |
* amzn-updates: packages.us-east-1.amazonaws.com | |
* centos-base: mirror.7x24web.net | |
* centos-update: centos.mirror.nac.net | |
amzn-main | 2.1 kB 00:00 |
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
#!/bin/sh | |
# Name : sself | |
# Created : 2011-10-09 | |
# Author : cwilper | |
# Purpose : Creates a self-extracting archive (a shell script containing a | |
# compressed tar file) out of the content of a given directory. When | |
# executed, the archive will be expanded into /tmp/sself/ (which will | |
# be cleared first if it already exists), and if a "run" script exists | |
# in the root of the archive, it will be executed. Standard output and |
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
import java.util.Map; | |
/** | |
* Static methods for dumping current thread names, states, and stack | |
* traces, in the context of the currently executing JVM. | |
*/ | |
public class ThreadDumper { | |
public static void dump(String name) { | |
dump(name, false); |
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
#!/bin/sh | |
# Name : git-retag | |
# Created : 2010-12-11 | |
# Author : cwilper | |
# Purpose : Replaces an existing git annotated or signed tag with a new, | |
# signed one, using the original tagger name, email address, | |
# tag date, and 1-line message. | |
# | |
# Usage: git-retag oldname newname |
NewerOlder