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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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
/* | |
* Copyright © 2009, Componentix. All rights reserved. | |
*/ | |
package com.componentix.hibernate.dialect; | |
import java.sql.Types; | |
/** | |
* A proper dialect for Microsoft SQL Server 2000 and 2005. |
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
bea_home=/path/to/bea | |
java_home=/path/to/bea/jdk160_18 | |
domain_template=/path/to/bea/weblogic11/common/templates/domains/wls.jar | |
admin_server_name=my_admin_server | |
admin_url=t3\://myserver\:7001 | |
admin_user=weblogic | |
admin_password=w3blogicpwd | |
admin_port=7001 |
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 WLST to connect to running WebLogic application servers and | |
# output a list of database connection pools and their sizes. | |
# | |
# This can be used for health monitoring and to support tuning. | |
# -------------------------------------------------- | |
import java.lang.Thread | |
def get_connection_pool_sizes(): |
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
# Original version: http://blog.tsunanet.net/2010/08/jpmp-javas-poor-mans-profiler.html | |
# Usage: ./jpmp.sh <pid> <num-samples> <sleep-time-between-samples> | |
#!/bin/bash | |
pid=$1 | |
nsamples=$2 | |
sleeptime=$3 | |
for x in $(seq 1 $nsamples) |
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 | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
# This script will generate the commands used to preshard a collection | |
# in mongodb. | |
# | |
# See: | |
# http://www.mongodb.org/display/DOCS/Splitting+Chunks |
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
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^ http://example.com$request_uri?; | |
} |
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
<bean id="myBean" class="com.iamkristian.MyBean" factory-method="instance" /> | |
<bean class="org.springframework.jmx.export.MBeanExporter" lazy-init="false"> | |
<property name="beans"> | |
<map> | |
<entry key="bean:name=myBean" value-ref="myBean"/> | |
</map> | |
</property> | |
</bean> |
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
// This code is unsafe to use in a multithreaded environment. | |
object A { | |
def foo = "foo" | |
B.bar | |
} | |
object B { | |
def bar = "bar" | |
A.foo |
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
Install instructions for 10.2: | |
http://download.oracle.com/docs/cd/B19306_01/relnotes.102/b15666/toc.htm | |
http://download.oracle.com/docs/cd/B19306_01/install.102/b15667/toc.htm | |
[Required files] | |
10201_database_linux_x86_64.cpio.gz | |
10201_companion_linux_x86_64.cpio.gz | |
p6810189_10204_Linux-x86-64.zip |
OlderNewer