Recent Notes

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 August 15, 2012 12:05:39    Last update: August 15, 2012 12:05:39
Use OpenSSL's s_client command to fetch a page manually: $ openssl s_client -connect localhost:443 -state -... Sample session for Google: $ openssl s_client -connect www.google.com:443 -st... Resource: SSL/TLS Strong Encryption: FAQ
Created by Dr. Xi on May 25, 2012 15:47:34    Last update: May 25, 2012 15:49:33
Steps to configure SSL for Apache HTTPD server on Windows: In Apache2.2/conf/httpd.conf , load mod_ssl and include httpd-ssl.conf : LoadModule ssl_module modules/mod_ssl.so ... In Apache2.2/conf/extra/httpd-ssl.conf , make sure the paths for the cert files point to the cert and key you want to use: # Server Certificate: # Point SSLCertificat... Start up Apache. If it fails, use the command line to see what the error is. There won't be any log in error.log if there are errors in the conf files: C:\Program Files (x86)\Apache Software Foundation\... I corrected the previous error by using the alternative line for SSLSessionCache : # Inter-Process Session Cache: # Configure ...
Created by balu on October 14, 2011 10:21:08    Last update: October 14, 2011 10:21:08
Got this error while trying to start vFabric tc server : C:\Apps\vfabric-tc-server-standard-2.6.1.RELEASE>t... It's a UAC error. Need to start the command prompt with Administrator privileges: right click the shortcut and select Run as administrator . Or enable administrator rights for the shortcut: Bring up the cmd shortcut properties Select the Shortcut tab, click the Advanced button. Check Run as administrator .
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 Dr. Xi on February 17, 2011 12:34:58    Last update: August 10, 2011 09:04:32
String comparison operators: Operator Meaning -n str the length of str is nonzero. -z str the length of str is zero (0). str1 = str2 str1 and str2 are the same (note one equal sign, not two!). str1 != str2 str1 and str2 are not the same. str str is not a null string Examples: # empty string is not null if [ '' ]; then ... Numerical comparisons ( integer expressions only! ): Operator Meaning int1 -eq int2 int1 and int2 are numerically equal int1 -ne int2 int1 and int2 are numerically NOT equal int1 -gt int2 int1 is greater than int2 int1 -ge int2 int1 is greater than or equal to int2 int1 -lt int2 int1 is less than int2 int1 -le...
Created by woolf on August 07, 2011 18:52:12    Last update: August 07, 2011 18:52:12
Running this command: # /usr/sbin/iptables -t nat -A PREROUTING -p tcp -... produced this error: iptables v1.4.6: unknown option `--to-ports' Tr... To fix: # opkg install iptables-mod-nat-extra
Created by freyo on August 04, 2011 12:27:27    Last update: August 04, 2011 12:30:42
I got this error while building an APK: [apply] [apply] UNEXPECTED TOP-LEVEL ERROR... Apparently the dx tool was running out of memory. The dx script (shell or bat) provides options to pass in Java options, but it's a lot easier just to bump up the default in dx : # By default, give dx a max heap size of 1 gig. Th... Here, I changed the default 1024M to 1624M and resolved the problem.
Created by voodoo on June 21, 2011 08:19:33    Last update: June 21, 2011 08:34:28
Got "base64: invalid input" error: $ base64 -d base64_encoded.txt >original.bin ba... which can be easily dismissed as "input is invalid base64 encoded" or "partial input". But I know it's valid base64 encoded input! The problem was, the input was base64 encoded on Windows! The error goes away after converting to Unix format with dos2unix . dos2unix < base64_encoded.txt | base64 -d >origina... Version of base64 used: $ base64 --version base64 (GNU coreutils) 8.5 ...
Created by freyo on May 17, 2011 11:13:17    Last update: May 17, 2011 11:13:17
This is an odd-ball content provider in that it doesn't provide database records, but provides a resource as a stream. It can be used to provide media files or XML resources. Start the project with: tools/android create project --package com.android... Create assets directory and add an XML file ( assets/demo.xml ): <? xml version="1.0" encoding="UTF-8"?> <people... Edit the layout ( res/layout/main.xml ): <?xml version="1.0" encoding="utf-8"?> <LinearL... Edit src/com/android/cptest/Dummy.java : package com.android.cptest; import java.io.... Add content provider ( src/com/android/cptest/XmlResource.java ): package com.android.cptest; import java.io.... Update AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifes... Add this section to the end of build.xml : <target name="-package-resources"> <ech... Build and install: ant install Screenshot: Remove the Dummy activity ( AndroidManifest.xml ): <?xml version="1.0" encoding="utf-8"?> <manifes... Create a new project for...
Previous  1 2 3 Next