- 24 ripe tomatoes (peeled)
- 3 green peppers (diced)
- 1 quart vinegar
- 1 t all spice
- 1/2 t cloves
- 1/2 C dry onion
- 1 C sweetener (sugar or agave)
- 1 t cinnamon
- 1 t nutmeg
- salt and pepper to taste
combine and boil 90 minutes (or more) until desired consistency is reached.
seal in clean pint jars in a 10 minute hot water bath
yields: 5 pints
Apple Sauce
- Peel and core apples
- Slice thinly
- Add cinnamon to taste
- steam in large pot till tender, stir frequently
(if apples seem dry, add 1 C of water to prevent burning)
- mash or blend apples to desired texture
- add sweetener to taste (sugar/agave)
- add to pint or quart jars and seal with a 20 min hot water bath
- Slice thinly
- Add cinnamon to taste
- steam in large pot till tender, stir frequently
(if apples seem dry, add 1 C of water to prevent burning)
- mash or blend apples to desired texture
- add sweetener to taste (sugar/agave)
- add to pint or quart jars and seal with a 20 min hot water bath
Gpg - Free PGP implementation
See: http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto.html
examples:
Import keys
gpg --import [Filename]
List keys
gpg --list-keys
examples:
Import keys
gpg --import [Filename]
List keys
gpg --list-keys
Symbolic Links
The unix equivalent to a Windows shortcut, though it does behave differently.
See http://en.wikipedia.org/wiki/Symbolic_link
basic usage:
ln -s target link_name
See http://en.wikipedia.org/wiki/Symbolic_link
basic usage:
ln -s target link_name
Get the physical disk size of a postgres db
SELECT pg_database.datname,
pg_size_pretty(pg_database_size(pg_database.datname)) AS size
FROM pg_database;
pg_size_pretty(pg_database_size(pg_database.datname)) AS size
FROM pg_database;
Handling DATEADD in Postgres
Here's a link that compares mssql's DATEADD function to an equivalent method in Postgres.
Essentially the following work:
d1.tran_dts + cast('-6 months' as interval), d1.tran_dts + cast('1 year' as interval)
select '2004-2-29'::date + cast('1 years' as interval)
select '2004-2-29'::date + cast('-3 months' as interval)
select '2004-2-29'::date + cast('2 days' as interval)
Essentially the following work:
d1.tran_dts + cast('-6 months' as interval), d1.tran_dts + cast('1 year' as interval)
select '2004-2-29'::date + cast('1 years' as interval)
select '2004-2-29'::date + cast('-3 months' as interval)
select '2004-2-29'::date + cast('2 days' as interval)
java -D command-line option
-D command-line option explained
Can be used to set an environment value on a CLI which is the accessible from code by :
String value = System.getProperty("key", "defaultvalue");
Can be used to set an environment value on a CLI which is the accessible from code by :
String value = System.getProperty("key", "defaultvalue");
Generate a CLI shell with Maven
Online Info: appassembler-maven-plugin
Steps to get a fully packaged test app are as follows:
1. run maven archetype to create a basic CLI app
$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app
2. Add maven plugin configuration for the appassembler-maven-plugin
<build>
<plugins>
<!-- package the app into a jar -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>${appassembler-maven-plugin-version}</version> <!-- 1.0 -->
<configuration>
<extraJvmArguments>-Xms128m -Xmx512m</extraJvmArguments>
<programs>
<program>
<mainClass>com.mycompany.app.App</mainClass>
<name>testApp</name>
</program>
</programs>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- use the archive.xml to package up a deployable .zip file -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin-version}</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/archive.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
3. Add in proper archiving configuration
in assembly\archive.xml
example:
<assembly>
<id>appassembly</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/appassembler</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
<!--fileSet>
<directory>bin</directory>
<outputDirectory>/bin</outputDirectory>
</fileSet-->
<!-- add any other filesets to include docs, readmes, licences etc here -->
</fileSets>
</assembly>
When completed, run maven clean install. The generated .ZIP file can then can be unpackaged
and deployed where desired. In the deployed bin directory, a .bat file will properly run the CLI app.
Steps to get a fully packaged test app are as follows:
1. run maven archetype to create a basic CLI app
$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app
2. Add maven plugin configuration for the appassembler-maven-plugin
<build>
<plugins>
<!-- package the app into a jar -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>${appassembler-maven-plugin-version}</version> <!-- 1.0 -->
<configuration>
<extraJvmArguments>-Xms128m -Xmx512m</extraJvmArguments>
<programs>
<program>
<mainClass>com.mycompany.app.App</mainClass>
<name>testApp</name>
</program>
</programs>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- use the archive.xml to package up a deployable .zip file -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin-version}</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/archive.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
3. Add in proper archiving configuration
in assembly\archive.xml
example:
<assembly>
<id>appassembly</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/appassembler</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
<!--fileSet>
<directory>bin</directory>
<outputDirectory>/bin</outputDirectory>
</fileSet-->
<!-- add any other filesets to include docs, readmes, licences etc here -->
</fileSets>
</assembly>
When completed, run maven clean install. The generated .ZIP file can then can be unpackaged
and deployed where desired. In the deployed bin directory, a .bat file will properly run the CLI app.
Creating a empty maven project structure
Maven can itself create empty project structures when you want to start a new code base. To create an empty project structure, maven needs to be told the kind of project (simple servlet web application or JSF web application with Spring and hibernate or Web application with spring, hibernate and spring MVC etc…). Maven knows the details of the directory structure for each project type through an archetype. So a simple servlet web application will have its own archetype that details how the directory structure of a simple servlet web application looks like.
So to start with execute
mvn archetype:generate
Connect jConsole to Servicemix
service:jmx:rmi:///jndi/rmi://:1099/jmxrmi
proper login & password : smx/smx
proper login & password : smx/smx
Check to see if Servicemix is running
ServiceMix's default port is 1099. From another window run netstat and search for port 1099.
From a Windows console, type:
netstat -an | find "1099"
OR
From a Unix command shell, type:
netstat -an | grep 1099
Notes on ServiceMix
see ServiceMix User Guide
JBI = Java Business Integration component
The Java Business Integration spec is a Java-based standard that defines a runtime architecture for plugins to interoperate via a mediated message exchange model (MEP). Messages between components are mediated by the Normalized Message Router (NMR). The NMR serves as an intermediary for routing messages amongst plugins, no matter where that component resides. Plugins do not communicate directly with one another; they only communicate with the NMR. This provides location transparency for the plugins.
SU = JBI Service Unit
The JBI spec includes deployment units for packaging of JBI components and JBI service units. JBI Components are JBI compliant components that are deployed into ServiceMix and are awaiting a configuration to tell them how to run.
A SU is essentially the packaging for a configuration for a JBI component and any of the necessary dependencies for the SU to be deployed. It's really just an archive to bundle together everything to deploy to the server. So to make use of one of the JBI components, all you really need to do is create a configuration.
SE = JBI Service Assembly
A service engine (SE) provides some type of logic inside the JBI environment and only communicates with the NMR. If a SE needs to communicate outside the JBI environment, it must send a message to a BC (via the NMR). Examples of SEs include rules engines, BPEL engines, XSLT engines, scripting engines, EJB continers, etc.
Service engines are the business-logic components in a JBI system and can serve as service providers/consumers.
Using JBI Components
JBI components are most typically provided to you with the JBI container and they provide support for some of the most common protocols and engines. In order to make use of these components as an application developer, you must provide a configuration for each component you want to use. Configurations are implementation specific but the packaging is defined by the JBI spec. Each component configuration must be packaged as a service unit (SU) and each SU must be wrapped in a service assembly (SA). These are simply ZIP/JAR files that contain a XML descriptor named jbi.xml that is used by the JBI environment.
JBI = Java Business Integration component
The Java Business Integration spec is a Java-based standard that defines a runtime architecture for plugins to interoperate via a mediated message exchange model (MEP). Messages between components are mediated by the Normalized Message Router (NMR). The NMR serves as an intermediary for routing messages amongst plugins, no matter where that component resides. Plugins do not communicate directly with one another; they only communicate with the NMR. This provides location transparency for the plugins.
SU = JBI Service Unit
The JBI spec includes deployment units for packaging of JBI components and JBI service units. JBI Components are JBI compliant components that are deployed into ServiceMix and are awaiting a configuration to tell them how to run.
A SU is essentially the packaging for a configuration for a JBI component and any of the necessary dependencies for the SU to be deployed. It's really just an archive to bundle together everything to deploy to the server. So to make use of one of the JBI components, all you really need to do is create a configuration.
SE = JBI Service Assembly
A service engine (SE) provides some type of logic inside the JBI environment and only communicates with the NMR. If a SE needs to communicate outside the JBI environment, it must send a message to a BC (via the NMR). Examples of SEs include rules engines, BPEL engines, XSLT engines, scripting engines, EJB continers, etc.
Service engines are the business-logic components in a JBI system and can serve as service providers/consumers.
SA = JBI Service Assembly
The JBI spec also includes a deployment unit known as a service assembly. A JBI SA is used to package up JBI SUs in order to be deployed to a container. A SA can include one or more SUs. The SA is really just an archive to bundle up SUs for deployment to the JBI container.
Using JBI Components
JBI components are most typically provided to you with the JBI container and they provide support for some of the most common protocols and engines. In order to make use of these components as an application developer, you must provide a configuration for each component you want to use. Configurations are implementation specific but the packaging is defined by the JBI spec. Each component configuration must be packaged as a service unit (SU) and each SU must be wrapped in a service assembly (SA). These are simply ZIP/JAR files that contain a XML descriptor named jbi.xml that is used by the JBI environment.
find
interesting options I ran into with find
-type = specifies what's being looked for e.g. f = regular files, d = directory
-size
= allows to specify a desired size, can be c for bytesso to look for all zero length files this works:
$ find -type f -size 0
Cron
Cron is a scheduler common to unix systems.
Crontab is a table of cron events that are scheduled.
see Quick-Reference
FireFox tips
Lovely Acronyms
Computer jargon is full of TLA's (Three Letter Acronyms). Here's a collection of ones I can never remember.
SMTP - Simple Mail Transfer Protocol - think email messages
SMS - Short Message Service - think text messages
SOA - Service Oriented Architecture
JSON - , short for JavaScript Object Notation
REST - Representational State Transfer
REST - Representational State Transfer
Here's a link to more acronyms than I'd ever care to know: Technology Acronym Definitions
Remove all .svn sub-directories
handy command to remove all sub-directories of a given name below the current working directory
The Waste of Free Time
Although, as we have seen, people generally long to leave their places of work and get home, ready to put their hard-earned free time to good use, all too often they have no idea what to do there. Ironically, jobs are actually easier to enjoy than free time, because like flow activities they have built-in goals, feedback, rules, and challenges, all of which encourage one to become involved in one's work, to concentrate and lose oneself in it. Free time, on the other hand, is unstructured, and requires much greater effort to be shaped into something that can be enjoyed. Hobbies that demand skill, habits that set goals and limits, personal interests, and especially inner discipline help to make leisure what it is supposed to be...a chance for re-creation. But on the whole people miss the opportunity to enjoy leisure even more thoroughly than they do with working time. Over sixty years ago, the great American sociologist Robert Park already noted: "It is in the improvident use of our leisure, I suspect, that the greatest wastes of American life occur."
The tremendous leisure industry that has arisen in the last few generations has been designed to help fill free time with enjoyable experiences. Nevertheless, instead of using our physical and mental resources to experience flow, most of us spend many hours each week watching celebrated athletes playing in enormous stadiums. Instead of making music, we listen to platinum records cut by millionaire musicians. Instead of making art, we go to admire paintings that brought in the highest bids at the latest auction. We do not run risks acting on our beliefs, but occupy hours each day watching actors who pretend to have adventures, engaged in mock-meaningful action.
This vicarious participation is able to mask, at least temporarily, the underlying emptiness of wasted time. But it is a very pale substitute for attention invested in real challenges. The flow experience that results from the use of skills leads to growth; passive entertainment leads nowhere. Collectively we are wasting each year the equivalent of millions of years of human consciousness. The energy that could be used to focus on complex goals, to provide for enjoyable growth, is squandered on patterns of stimulation that only mimic reality. Mass leisure, mass culture, and even high culture when only attended to passively and for extrinsic reasons...such as the wish to flaunt one's status...are parasites of the mind. They absorb psychic energy without providing substantive strength in return. They leave us more exhausted, more disheartened than we were before.
Unless a person takes charge of them, both work and free time are likely to be disappointing. Most jobs and many leisure activities...especially those involving the passive consumption of mass media...are not designed to make us happy and strong. Their purpose is to make money for someone else. If we allow them to, they can suck out the marrow of our lives, leaving only feeble husks. But like everything else, work and leisure can be appropriated for our needs. People who learn to enjoy their work, who do not waste their free time, end up feeling that their lives as a whole have become much more worthwhile. "The future," wrote C.K. Brightbill, "will belong not only to the educated man, but to the man who is educated to use his leisure wisely."
Flow pg 162-163, Csikszentmihalyi
The tremendous leisure industry that has arisen in the last few generations has been designed to help fill free time with enjoyable experiences. Nevertheless, instead of using our physical and mental resources to experience flow, most of us spend many hours each week watching celebrated athletes playing in enormous stadiums. Instead of making music, we listen to platinum records cut by millionaire musicians. Instead of making art, we go to admire paintings that brought in the highest bids at the latest auction. We do not run risks acting on our beliefs, but occupy hours each day watching actors who pretend to have adventures, engaged in mock-meaningful action.
This vicarious participation is able to mask, at least temporarily, the underlying emptiness of wasted time. But it is a very pale substitute for attention invested in real challenges. The flow experience that results from the use of skills leads to growth; passive entertainment leads nowhere. Collectively we are wasting each year the equivalent of millions of years of human consciousness. The energy that could be used to focus on complex goals, to provide for enjoyable growth, is squandered on patterns of stimulation that only mimic reality. Mass leisure, mass culture, and even high culture when only attended to passively and for extrinsic reasons...such as the wish to flaunt one's status...are parasites of the mind. They absorb psychic energy without providing substantive strength in return. They leave us more exhausted, more disheartened than we were before.
Unless a person takes charge of them, both work and free time are likely to be disappointing. Most jobs and many leisure activities...especially those involving the passive consumption of mass media...are not designed to make us happy and strong. Their purpose is to make money for someone else. If we allow them to, they can suck out the marrow of our lives, leaving only feeble husks. But like everything else, work and leisure can be appropriated for our needs. People who learn to enjoy their work, who do not waste their free time, end up feeling that their lives as a whole have become much more worthwhile. "The future," wrote C.K. Brightbill, "will belong not only to the educated man, but to the man who is educated to use his leisure wisely."
Flow pg 162-163, Csikszentmihalyi
Few things are sadder...
Few things are sadder than encountering a person who knows exactly what he should do, yet cannot muster enough energy to do it.
Flow pg 217, Csikszentmihalyi
Flow pg 217, Csikszentmihalyi
Subscribe to:
Posts (Atom)