Recent Notes
Displaying keyword search results 1 - 11
Created by torstello on January 06, 2012 07:32:25
Last update: January 06, 2012 07:32:25
rdoc documentation:
usage(*args)
Display usage information ...
put something like this on top of your script:
# == Synopsis
# Blah blah blah.
#
...
method to display it
def output_usage
RDoc::usage('usa...
bind it to the '-h' option via optionparser
opts.on('-h', '--help') { output_help }
...
source
http://blog.toddwerth.com/entries/5
Created by woolf on December 29, 2011 11:18:11
Last update: December 29, 2011 11:18:11
Use the expand command to extract files from a .cab file:
expand [-r] source [destination] [-d source.cab ... Option Description [-r] Renames expanded files. [destination] Specifies where files are to be expanded. If source is multiple files and -r is not specified, destination must be a directory. destination can consist of a drive letter and colon, a directory name, a file name, or a combination of any of these. [-d source.cab] Displays a list of files in the source location. Does not expand or extract the files. [-f:files] Specifies the files in a cabinet (.cab) file that you intend to expand. You can use wildcards (* and ?). source.cab Specifies the files to expand. source can consist of a drive letter and colon, a directory...
Created by mee2 on November 18, 2011 14:59:03
Last update: November 18, 2011 14:59:03
The usual command " sudo apt-get install swftools " did not work for Ubuntu 11.10 (oneiric), so I installed from source:
Install dependencies:
$ sudo apt-get install zlib1g-dev libgif-dev libfr...
Get swftools source:
$ wget http://swftools.org/swftools-0.9.1.tar.gz
...
Build and install:
$ ./configure
$ make
$ sudo make install
Created by freyo on September 09, 2011 11:43:36
Last update: September 09, 2011 11:45:45
When you run automated Android tests with Eclipse or from the command line, you get text output, which isn't good for reporting purposes. If you run a large set of test cases with automated build, the text report isn't very helpful. Fortunately, Android CTS generates test reports in XML with accompanying XSL to make it look nice in a browser. To run your own tests with Android CTS: Download Android CTS Make a new directory MyRepository under android-cts , alongside the existing repository directory. Copy host_config.xml from repository to MyRepository Create directory plans under MyRepository , add a test plan ( MyTests.xml ):
<?xml version="1.0" encoding="UTF-8"?> <TestPla... Create directory testcases under MyRepository . Copy TestDeviceSetup.apk from repository/testcases to MyRepository/testcases Under MyRepository/testcases , create a test...
Created by freyo on September 07, 2011 16:46:14
Last update: September 07, 2011 19:23:00
The Android unit test framework is based on JUnit 3 , not JUnit 4. Test cases have to extend junit.framework.TestCase or a subclass (such as android.test.InstrumentationTestCase ). Tests are identified by public methods whose name starts with test , not methods annotated with @Test (as in JUnit 4). An Android test suite is packaged as an APK, just like the application being tested. To create a test package, first you need to identify the application package it is testing. Google suggests to put the test package source in a directory named tests/ alongside the src/ directory of the main application. At runtime, Android instrumentation loads both the test package and the application under test into the same process. Therefore, the tests can invoke methods on...
Created by freyo on May 16, 2011 12:13:34
Last update: May 16, 2011 12:17:17
By Android documentation , odex files are "Optimized DEX" files, which can be created in at least three different ways: The VM does it "just in time". The output goes into a special dalvik-cache directory. This works on the desktop and engineering-only device builds where the permissions on the dalvik-cache directory are not restricted. On production devices, this is not allowed. The system installer does it when an application is first added. It has the privileges required to write to dalvik-cache . The build system does it ahead of time. The relevant jar / apk files are present, but the classes.dex is stripped out. The optimized DEX is stored next to the original zip archive, not in dalvik-cache , and is part of the system...
Created by freyo on February 23, 2011 13:38:23
Last update: February 23, 2011 13:38:23
The Java keytool utility does not support importing a private key directly from a file. But it does support merging a keystore with the -importkeystore command. So, for a private key generated with OpenSSL in PEM format, you first convert the PEM key into PKCS12 format , then merge the one-key PKCS12 store with the Java KeyStore:
C:\>keytool -importkeystore -srckeystore openssl_c...
Created by woolf on February 10, 2011 12:51:14
Last update: February 10, 2011 13:06:11
Windows command line shell does not come with a sleep command. One trick is to emulate sleep using the ping command:
C:\>ping /?
Usage: ping [-t] [-a] [-n count...
To sleep for about 5 seconds:
@rem make sure to ping a non-existing IP, otherwis...
If you have the Windows Resource Kit installed, it does provide a sleep command:
C:\>sleep
Usage: sleep time-to-sleep-in-s...
Created by voodoo on July 11, 2009 15:14:55
Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations.
It's really easy to see HTTP headers with curl:
C:\>curl --head http://www.google.com
HTTP/1.0 ...
or, headers and page together (dump headers to stdout):
$ curl --dump-header - http://www.google.com HTTP/...
Download openssl from openssl.org:
curl http://www.openssl.org/source/openssl-0.9.6m....
C:\>curl --help
Usage: curl [options...] <url>
...
Created by magnum on June 23, 2010 20:42:12
Last update: June 23, 2010 20:52:33
Compile mod_proxy_html from source code.
Prerequisite: Apache httpd installed on system with header files.
Command:
# /usr/local/apache2/bin/apxs -i -c -I/usr/local/i...
Output:
/usr/local/apache2/build/libtool --silent --mode=c...
Created by Dr. Xi on September 22, 2008 01:22:23
Last update: September 22, 2008 16:20:01
On the Programs tab of Internet Options IE provides a list of HTML Editors to choose from. Choosing a program from the list will not change the View Source editor. It only changes the Edit with... command from the File menu.
You need to modify the registry to add your favorite editor to the HTML Editors list. Add the keys listed below to the registry, or edit the registry keys in an editor and import back into the registry:
Windows Registry Editor Version 5.00
[HKEY_...
Google " Internet Explorer Client Registry Layout " to find official information from MS.