Recent Notes
Displaying keyword search results 1 - 10
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 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 openswan
Edit /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 start
Check status:
# ipsec auto --status
Monitor IPSec log:
# less /var/log/secure
If 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 27, 2011 12:55:51
Last update: September 27, 2011 12:55:51
These steps set up a Linux host as IPSec client, using Openswan .
Install Openswan:
# yum install openswan
Edit /etc/ipsec.conf . Instead of L2TP on port 1701, I'm setting up TCP on port 8080 so that I can test the connection with nc .
# /etc/ipsec.conf - Openswan IPsec configuration f...
Edit /etc/ipsec.secrets .
# include /etc/ipsec.d/*.secrets
192.168.0.101 ...
Start IPSec:
# /etc/init.d/ipsec start
Connect to IPSec server:
# ipsec auto --up TCP8080-PSK-CLIENT
104 "TCP80...
Created by freyo on July 27, 2011 13:49:26
Last update: July 27, 2011 13:52:03
Some ways to pass data from one activity to another:
Add data to the Intent :
The sending side:
// create Intent
Intent intent = new Intent();
...
The receiving side:
Bundle bundle = getIntent().getExtras();
String...
Use SharedPreferences (data is persisted in this case):
The sending side:
SharedPreferences prefs = getSharedPreferences("pr...
The receiving side:
SharedPreferences prefs = getSharedPreferences("pr...
Created by freyo on April 01, 2011 14:29:25
Last update: June 29, 2011 13:58:27
Start the emulator ( create an AVD if none exists)
$ tools/emulator -avd Simple8 Create new project $ tools/android create project \ > --package co... where " --target 2 " identifies the target platform as displayed by " tools/android list targets ", which is stored in the properties file default.properties in the project root folder. cd HelloWorld and install debug package onto the running emulator: $ ant install Buildfile: build.xml [set... Launch the Hello World application on the emulator. You'll see something like this: Edit res/values/string.xml , change the contents to: <?xml version="1.0" encoding="utf-8"?> <resourc... Edit res/layout/main.xml , change the contents to: <?xml version="1.0" encoding="utf-8"?> <LinearL... The contents of the text area now refer to a string defined in the resource file strings.xml , instead...
Created by Dr. Xi on December 12, 2007 22:57:22
Last update: March 25, 2011 15:05:40
1. Install windows resource kit .
2. Install srvany as a service:
C:\tools\putty>instsrv ssh_tunnel "C:\Program File...
3. Edit the following registry template to suite your environment:
Windows Registry Editor Version 5.00
[H...
4. Import the registry entry.
5. Start the service with "net start ssh_tunnel" or from the services applet.
You may choose to use a batch file for srvany (instead of plink.exe ), but you won't be able to shut down the tunnel when you stop the service.
Also, if the Windows SYSTEM user cannot see the host key for SSH connection, the tunnel cannot be established.
Created by woolf on October 22, 2010 02:53:32
Last update: October 22, 2010 03:18:12
The easiest way to shutdown Windows XP with a shortcut is to create a shortcut icon on the desktop (or the Start menu, or the Quick Launch menu) and assign a shortcut key combination.
Useful command line commands:
Shutdown : shutdown -s -t 0
Restart : shutdown -r -t 0
Log off : shutdown -l -t 0
Hibernate : rundll32.exe PowrProf.dll, SetSuspendState Hibernate
Command line options for shutdown :
C:\> shutdown /?
Usage: shutdown [-i | -l | -s ...
Created by woolf on August 29, 2010 04:22:01
Last update: August 29, 2010 04:22:01
This procedure only works for program shortcuts on the desktop or start menu:
Right click on the program shortcut
Select "Properties"
Focus on the "Shortcut key" field, press any key or combination of any two of SHIFT, CTRL and ALT, plus any key
MS link: http://support.microsoft.com/kb/310417
Created by magnum on July 08, 2010 22:24:50
Last update: July 09, 2010 15:47:24
Start:
[root@belo ~]# service sshd start
Generating SS...
Stop:
[root@belo ~]# service sshd stop
Stopping sshd:...
Or:
[root@belo ~]# /etc/init.d/sshd start
Starting ...
Start sshd on boot:
[root@belo ~]# chkconfig sshd on
Created by voodoo on June 25, 2010 16:41:17
Last update: June 25, 2010 16:44:40
rdesktop is the Linux equivalent of mstsc on Widnows. To install rdesktop on Fedora, enter:
yum install rdesktop
To start rdesktop in full screen mode:
rdesktop -f remote_host_name
To toggle full screen mode, use key combination: Ctrl+Alt+Enter.