Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
terrancesnyder / debug.xhtml
Created July 7, 2011 21:26
Instance Debug for XForms
<widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/>
@terrancesnyder
terrancesnyder / data-table.xhtml
Created July 8, 2011 17:17
Simple Data Table Example
<fr:datatable width="100%" height="300px">
<xhtml:thead>
<xhtml:tr>
<xhtml:th fr:sortable="true" fr:sortKey="text">Note</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="text">Creation Time</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="participant">Participant</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="activityName">Activity</xhtml:th>
</xhtml:tr>
</xhtml:thead>
<xhtml:tbody>
@terrancesnyder
terrancesnyder / curl.sh
Created July 13, 2011 15:53
curl post file
curl --user MYUSERNAME:MYPASSWORD --form [email protected] --form discard=yes --form discard=yes "http://example.com/probe/adm/war.htm"
@terrancesnyder
terrancesnyder / haproxy_restart.sh
Created July 24, 2011 18:50
haproxy silent restart
./haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)
@terrancesnyder
terrancesnyder / table_size.sql
Created July 29, 2011 20:41
oracle table sizes
Select sum(bytes)/1024/1024 Mb, tablespace_name, segment_name
from user_segments
group by tablespace_name, segment_name
order by sum(bytes)/1024/1024 desc;
@terrancesnyder
terrancesnyder / index_frag_oracle.sql
Created July 29, 2011 21:10
oracle fragmentation report
SELECT table_name
, index_name
, NULL as partition_name
, num_rows
, leaf_blocks
, rows_per_leaf_block
, avg_key_len
, rows_per_leaf_block * avg_key_len AS avg_bytes_per_leaf_block
, db_block_size
, TRUNC(100 * rows_per_leaf_block * avg_key_len / db_block_size, 2) AS utilisation_pct
@terrancesnyder
terrancesnyder / zypper.sh
Created August 4, 2011 13:55
Zypper on OpenSuse 10
zypper service-add -repo http://download.opensuse.org/repositories/server:/http/SLE_10/
zypper install haproxy
zypper service-add -repo http://download.opensuse.org/repositories/utilities/SLE_10/
zypper install htop
@terrancesnyder
terrancesnyder / rpm_hints.sh
Created August 4, 2011 14:21
rpm removal and listing
# list all installed packages
rpm -qa
# remove a package
rpm -ev YOURRPM
#! /bin/sh
# ==================================================================
# __ __
# ____ ___ ____ / /_____ _/ /_ ____
# / __ \/ _ \/ __ \/ __/ __ `/ __ \/ __ \
# / /_/ / __/ / / / /_/ /_/ / / / / /_/ /
# / .___/\___/_/ /_/\__/\__,_/_/ /_/\____/
# /_/
# Pentaho CARTE startup scripts
@terrancesnyder
terrancesnyder / sed.sh
Created August 10, 2011 16:15
Sed Replace in Text with Groups
# find any date and append T00:00:00Z to it
echo "01-01-2001,asd,01-01-2001" | sed 's/\([0-9]\+-[0-9]\+-[0-9]\+\)/\1T00:00:00Z/g'