Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

misc misc

  • Loading branch information...
commit e5362b18eaf157dabbbd219534af6863d119bb22 0 parents
@dragon3 authored
0  README
No changes.
25 backlog_svn_sync.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# $Id: backlog_svn_sync.sh 653 2008-08-25 13:12:27Z dragon3 $
+#
+# Script to svnsync "Backlog" project repository.
+#
+
+if [ $# -ne 2 ]; then
+ echo "Usage: $0 [space key] [project key]"
+ exit 1;
+fi
+
+SPACE_KEY=$1
+PROJECT_KEY=$2
+
+cwd=`pwd`
+hook_revprop=${PROJECT_KEY}/hooks/pre-revprop-change
+
+svnadmin create $PROJECT_KEY
+echo '#!/bin/sh' > $hook_revprop
+echo 'exit 0' >> $hook_revprop
+chmod +x $hook_revprop
+
+svnsync init file://${cwd}/${PROJECT_KEY} https://${SPACE_KEY}.backlog.jp/svn/${PROJECT_KEY}
+svnsync sync file://${cwd}/${PROJECT_KEY}
+
13 change_vmware_tomcat_port.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Change VMWare Server's Tomcat port.
+#
+# see: http://communities.vmware.com/thread/172606
+#
+VM_TOMCAT="/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16"
+sudo cp $VM_TOMCAT/conf/server.xml $VM_TOMCAT/conf/server.xml.orig
+sudo perl -pi -e 's/port="8005"/port="8105"/' $VM_TOMCAT/conf/server.xml
+sudo perl -pi -e 's/port="8009"/port="8109"/' $VM_TOMCAT/conf/server.xml
+
+# restart webAccess
+sudo kill -TERM `pidof webAccess`
37 dualhead.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# $Id: dualhead.sh 1074 2009-01-20 11:52:56Z dragon3 $
+
+start() {
+ xrandr --output VGA --auto --${TARGET}-of LVDS
+}
+
+stop() {
+ xrandr --output VGA --off
+}
+
+usage() {
+ echo "Usage: dualhead.sh {start|stop} {left|right}"
+ exit 1;
+}
+
+if [ $# -eq 0 ]; then
+ usage;
+elif [ $1 = 'start' -a $# -eq 2 ]; then
+ if [ $2 != 'left' -a $2 != 'right' ]; then
+ usage;
+ fi
+fi
+
+TARGET=${2-"left"};
+
+case $1 in
+ start)
+ start;
+ ;;
+ stop)
+ stop;
+ ;;
+ *)
+ usage;
+ ;;
+esac
29 scrape_rh3_errata.pl
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+#
+# Scrape "Red Hat Enterprise Linux ES (v. 3) General Advisories"
+#
+use URI;
+use Web::Scraper;
+
+my $errata_line = scraper {
+ process "//td[1]/img", type => '@alt';
+ process "//td[2]", severity => 'TEXT';
+ process "//td[3]", advisory => 'TEXT';
+ process "//td[4]", synopsis => 'TEXT';
+ process "a", url => '@href';
+};
+
+my $errata = scraper {
+ process "table.list tr", "list[]" => $errata_line;
+ result 'list';
+};
+
+my $res = $errata->scrape(
+ URI->new("https://rhn.redhat.com/errata/rhel3es-errata.html") );
+
+my @column = qw/type severity advisory synopsis url/;
+printf STDOUT "|%s|%s|%s|%s|%s|\n", @column, "\n";
+
+for my $line ( @{$res} ) {
+ printf STDOUT "|%s|%s|%s|%s|%s|\n", map { $line->{$_} || '-' } @column;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.