Displaying keyword search results 1 - 10
Created by magnum on September 11, 2012 11:59:43 Last update: September 11, 2012 11:59:43
Exerpt from bash documentation. HISTORY EXPANSION The bash shell supports a history expansion feature that is similar to the history expansion in csh. This feature is enabled by default for interactive shells, and can be disabled using the +H option to the set builtin command. Non-interactive shells do not perform history expansion by default. History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly. History expansion is performed immediately after a complete line is read, before the shell breaks it into words. It takes place in two parts. The first is to determine which line from the history...
Created by Dr. Xi on February 06, 2012 12:14:11 Last update: February 07, 2012 15:39:35
Oracle sqlplus command line tools does not support command line editing out-of-the-box. But on Linux there's a handy utility that enables command line editing with any command line tool: rlwrap - readline wrapper. Install rlwrap:
$ sudo apt-get install rlwrapCreate a keywords file .sql.dict (optional, but convenient):
false null true access add as asc begin by chec...It would be nice to add the tables names also. Create an alias for sqlplus (put it in .bashrc ):
alias sqlplus='rlwrap -f $HOME/.sql.dict sqlplus'
Created by Fang on November 10, 2011 09:26:12 Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines!
<?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by Fang on September 07, 2009 20:44:15 Last update: November 03, 2011 14:43:19
Step 1: Repackage a web app as EAR A Java EE application is a multimodule Maven project. At the very least you'll need to package a WAR and an EAR. To get started, I'll simply re-package the simple webapp as an EAR. Create a directory named javaee-app Copy the webapp from here to javaee-app . Rename struts1app to webapp . Create pom.xml under javaee-app :
<project> <modelVersion>4.0.0</modelVersion>...Create a directory named ear under javaee-app . Create pom.xml under ear :
<project> <modelVersion>4.0.0</modelVersion>...Modify pom.xml in the webapp directory so that it looks like this:
<project> <modelVersion>4.0.0</modelVersion> ...Build with " mvn package " in the javaee-app directory. You can see that ear-1.0.ear is successfully generated in javaee-app/ear/target . Maven successfully resolves dependencies between the sub-projects....
Created by Fang on October 28, 2011 14:49:53 Last update: October 28, 2011 14:52:19
Facelet templates can be nested, for example, a page can use a template which inherits from another template. To demonstrate this, let's start from the simple example and make these additions: Add a place holder for CSS style sheets in WEB-INF/templates/default.xhtml :
<h:head> <title>Facelets Template Demo</tit...Add a derivative template ( WEB-INF/templates/default-style.xhtml ) which provides CSS:
<?xml version="1.0" encoding="UTF-8"?> <ui:comp...Add a page that uses the styled template ( home-style.xhtml ):
<?xml version="1.0" encoding="UTF-8"?> <ui:comp...The only difference between this file and home.xhtml is the template being used. Compare the display of the pages home.xhtml and home-style.xhtml .
Created by magnum on September 27, 2011 11:57:49 Last update: October 05, 2011 12:20:00
This procedure sets up an IPSec vpn server on Linux with Preshared Key (PSK) using Openswan . Install Openswan:
# yum install openswanEdit /etc/ipsec.conf . This is about the minimum needed to run IPSec server. Instead of running L2TP on port 1701, I'm running TCP on port 8080 so that I can test the setup with nc later.
# /etc/ipsec.conf - Openswan IPsec configurati...Edit /etc/ipsec.secrets .
# # Preshared key for clients connecting from a...Start IPSec:
# /etc/init.d/ipsec startCheck status:
# ipsec auto --statusMonitor IPSec log:
# less /var/log/secureIf IPSec is running KLIPS, you should see a new nic ( ipsec0 ). There's no ipsec0 if IPSec is running NETKEY.
# ifconfig eth0 Link encap:Ethernet HWadd...
Created by magnum on September 23, 2011 16:06:02 Last update: September 28, 2011 09:29:53
This procedure works for xl2tpd . Edit L2TP configuration file /etc/xl2tpd/xl2tpd.conf :
; Sample l2tpd.conf ; [global] ; listen...Edit PPP options file for L2TP /etc/ppp/options.xl2tpd :
ipcp-accept-local ipcp-accept-remote ms-dns ...Edit PPP authentication file /etc/ppp/chap-secrets :
# Secrets for authentication using CHAP # serve...Start the server:
# /etc/init.d/xl2tpd startMonitor the log:
# less /var/log/messages
Created by voodoo on September 04, 2011 14:23:17 Last update: September 04, 2011 14:25:05
I just installed Ubuntu 11.04 desktop on my old Dell laptop, but the cdrom is not auto-mounting. Normally this simply works. I tried various things like adding cdrom to /etc/fstab and installing halevt (which failed), none worked. However, I found out that despite talks of using gnome-volume-manager etc, at least for this version of Ubuntu automount is managed by Nautilus (file manager): start gconf-editor and navigate to /apps/nautilus/preferences/ , media_automount should be checked (but it's checked by default, unless you changed it). In the end, I wasn't able to make cdrom automount, although USB drives automounted fine. Instead of wasting more time to diagnose the problem, I manually mounted the cdrom drive:
$ sudo mount /dev/cdrom /cdrom
Created by woolf on July 27, 2011 20:56:11 Last update: July 27, 2011 20:56:11
Install the DHCP server:
voodoo@newpc:~$ sudo apt-get install dhcp3-server ...Edit /etc/dhcp/dhcpd.conf (this is the minimum for a local network without DNS):
ddns-update-style none; default-lease-time ...Start the DHCP server:
voodoo@newpc:/etc/dhcp$ sudo /etc/init.d/isc-dhcp-...
Created by woolf on July 05, 2011 16:03:48 Last update: July 05, 2011 16:03:48
The DHCP client packaged with BusyBox is udhcpc . It negotiates a lease with the DHCP server and executes a script when it is obtained or lost. There are four possible arguments to this script: deconfig : The script should put the interface in an up but deconfigured state. bound : The script should configure the interface and set any other relevant parameters. renew : This is used when a lease is renewed. IP address does not change but other parameters may change. nak : This happens when a NAK packet is received from the DHCP server. Network parameters are passed to the script via environment variables. Ubuntu documents that the default script is at /etc/udhcpc/default.script . For OpenWRT, it is located at /usr/share/udhcpc/default.script ....