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
# Get today's date/time | |
date | |
# Get today's date only | |
date +%d-%b-%Y |
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
1. On the tomcat server, do the following: | |
a. Open the firefwall to allow connections over the jmx port | |
b. Make the following directories | |
mkdir -p /home/tomcat/.jvisualvm/7u6 | |
chown -R tomcat:tomcat /home/tomcat | |
c. Add the following java options to tomcat in setenv.sh | |
-Dcom.sun.management.jmxremote |
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
# Determine the location of a gem that has been installed | |
spec = Gem::Specification.find_by_name("cucumber") | |
gem_root = spec.gem_dir | |
gem_lib = File.join(gem_root, "lib") |
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
# Get the class type | |
my_obj.class | |
# get the instance methods of a class | |
# false indicates that inherited method should not be included | |
my_obj.class.instance_methods(false) | |
# get instance variables | |
# In ruby, instance variables aren't tied to a class like in java. | |
# They only spring into existence when they are assigned. |
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
# Get a list of gems | |
for i in $(/opt/apps/ruby/ruby/bin/gem list --no-versions); | |
do | |
# If list the gem starts with 'ivv' | |
if [[ "$i" == ivv* ]];then | |
# Uninstall the gem | |
# -x : removes executables | |
# -I : ignores dependencies | |
# -a : removes all versions |
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
[sean.humbarger@ISS203943 ~]$ free -m | |
total used free shared buffers cached | |
Mem: 16006 1434 14572 0 50 575 | |
-/+ buffers/cache: 808 15197 | |
Swap: 7871 0 7871 | |
# ========================================================================= | |
'Mem' Row 'total' Column | |
* This is the total amount of RAM installed on your machine. It is the sum of the 'used' and free columns on the same row |
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
class MyPackage | |
# == Description | |
# A Description of the class | |
class MyClass | |
# Accessors | |
attr_accessor :attr1, :attr2 | |
# ==== Description |
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
# Fork a Process | |
pid = fork do | |
# Do stuff | |
# Do more stuff | |
end | |
# Wait for the process to complete before moving on | |
Process.wait |
NewerOlder