Gonna clone my Jasmine come July  0 Comments

Found @ http://www.ehow.com/how_7329933_start-jasmine-plants.html


How to Start Jasmine Plants


By Eulalia Palomo, eHow Contributor




Jasmine flowers are highly fragrant.
Jasmine (Jasminum officinale) is a deciduous climbing shrub native to east Asia and the Himalayas. The white, star-shaped flowers bloom year-round and are intensely fragrant. Jasmine grows 20 to 30 feet tall with a spread of 7 to 15 feet, though it responds well to heavy pruning and can be kept small in a container or in the garden. Jasmine is a warm weather plant hardy in USDA zones 7 to 10. In cooler climates, jasmine must be overwintered in a greenhouse or indoors. Jasmine starts are cuttings from mature plants that are rooted to create a new plant. Does this Spark an idea?


Instructions


1

Take a 9-inch cutting from a mature Jasmine plant between July and late August. Cuttings taken at this time are called semi-hardwood cuttings, according to North Carolina State University Department of Horticultural Sciences. Semi-hardwood wood is the current year's growth taken in the summer.


Early morning is an ideal time to prepare the jasmine cutting. Select a stalk that has at least three mature leaves on it and make the cut at a 45-degree angle using a knife or a pair of sharp pruning shears.


2

Remove the leaves from the lower half of the jasmine cutting by gently bending them back until they snap off or by cutting them off with the pruning shears. Leave three or four leaves at the top of the cutting. When taking multiple cuttings from different plants, dip the tools in alcohol between cuts to avoid spreading disease between cuttings and plants.


3

Fill a 6- to 8-inch pot with a mixture of 1 part peat moss, 1 part perlite, and 1 part sand. Avoid using potting soil, compost, or garden soil. Microbes living in these mediums will cause the cutting to rot before roots are able to form. Dampen the mixture thoroughly until it is crumbly to the touch.


Soil-less rooting mediums are also suitable and available at home and garden centers.


4

Roll the end of the cutting in hormone rooting power or dip it in hormone rooting liquid. Both are available at home and garden centers. Make a hole in the center of the pot 4 inches deep using a pencil, dowel or your index finger.


5

Slip the cutting into the hole with the cut end that has the rooting compound on it in the soil and the leafy end above the soil. Drive a 12-inch long dowel into the soil at the edge of the pot. Place a clear plastic bag upside down over the pot so that the bottom of the bag is held up by the dowel. Secure the open end around the lip of the pot. This creates a humid environment to encourage rooting. In a humid greenhouse, the bag is unnecessary.


6

Place the jasmine cutting in indirect sunlight. Remove the plastic bag every 3 to 5 days and mist the leaves with water. If the top of the soil mixture feels dry, add water until it is slightly damp from the top to the bottom. Place the cutting in an area where the temperature is above 75 degrees F. The cutting should root in four to six weeks but could take up to three months.


7

Remove the bag once the cutting has developed roots. To test it, grasp the cutting gently and give it a very gentle tug. If it is firm in the soil, the roots are beginning to form. Wait to check it until the eighth week. Keep the plant indoors for the first fall and winter and transplant outdoors in the spring of the following year.


8

Plant jasmine outdoors in an area that gets full sun and has loamy or sandy soil with good drainage. For a container plant, use a 12- to 15-inch pot filled with a well-draining potting soil mix. Keep the soil moist and apply water when the top 1/4 inch of the soil begins to feel dry to the touch. Place the pot in a sunny location indoors or on a deck or patio.


References


Missouri Botanical Gardens: Jasminum Officinale

Plant of the Week: Arabian Jasmine

North Carolina State University: Plant Propagation by Stem Cuttings

Resources



National Arboretum: USDA Plant Hardiness Map

Photo Credit jasmine image by Maria Brzostowska from Fotolia.com

iPad thumbnail issues when using Home sharing  0 Comments

My wife came to me a bit frustrated that whenever she tried to use the Video app on the iPad, and pointed it at our movie library, the wrong thumbnails would show up for movies. I researched quite a bit, and came across an article that indicated we would have to delete all the movies from our iTunes library and then re-add them. This seemed a bit painful considering we have over 250+ movies now. A little hesitant, I looked around a bit more and found this discussion: http://www.ipadforums.net/ipad-help/16488-ipad-video-thumbnails.html. Boil it down a bit, and the only thing you have to do is to force a correction on the iPad.



  • Open Settings
  • Goto Video
  • Under home sharing, add or delete a character from your email address and select return
  • Go to Video -> Shared and verify that you no longer see any of your titles
  • Go back to Video->Home sharing and update your email to now be correct and select return
  • Go to Video -> Shared an verify that all of your movies are back and displaying the correct thumbnails



So, what does that tell me? There seems to be something goofy in the caching mechanism in Apples code. C'mon guys, that is sooo Microsoft ~95 :-).





Hope this helps someone else.

Get info from AWS using Python and Boto  0 Comments


I recently had a need to be able to search and retrieve information from various AWS accounts and output in json format. As json is becoming so nice to work with from a supported standpoint, and it sucks a lot less than XML, figured I'd roll up my sleeves and build a Python script to do the heavy lifting for me. This tool will search against AWS EC2 instances (and all properties of) for specific strings. Once it compiles a list, it outputs the data in json format. Boto makes it way easy!

To use, you pass in your key and secret (via the -k and -s parameters, and optionally the -p [regex] parameter), and the script will do the rest. In essence, it loops through all of the instances with-in the reservation (see the boto docs and AWS api for more info); and as its iterating over the instance, it will do a sub-iteration over the properties of the instance, so you are able to search anything having to do with any instance. Hope someone finds this useful! Pointers or tips on how I could do this better would also be useful. One thought I've had would be to read the environment variables for the key and secret similar to Amazons toolkit.


References

Python (Note that 2.6 is the version tested against)

Boto


Usage


Usage: ec2_full_search_lookup.py --key [aws_key] --secret [aws_secret] --pattern [regex]

Options:
  -h, --help            show this help message and exit
  -k KEY, --key=KEY     AWS Key to use
  -s SECRET, --secret=SECRET
                        AWS Secret to use
  -p PATTERN, --pattern=PATTERN
                        Regular Expression pattern (pcre compliant) to search
                        for, examples include '.*', '^ubi.*', '*.dev.*', etc


Code


Adding a link to the actual file as the pre/code tags I use will not allow the code below to line wrap, and python is stupid anal about white space....ec2_full_search_lookup.py


#!/usr/bin/env python26
import json 
import re
import sys
from optparse import OptionParser
from boto.ec2.connection import EC2Connection

#
# main function
#
def main(argv):
	config = {}			# hold our configuration for json to dump
	data = {}			# temp dict to hold per instance variables (will be copied to config[name])

	# parse the options/args out
	(options, args) = parser.parse_args() #load options into a dictionary and arguments into a list

	# act on our arguments
	if(options.key) and (options.secret):
		conn = EC2Connection(options.key,options.secret)	# get connection to EC2

                for r in conn.get_all_instances():			# loop through all reservations
                        groups = [g.name for g in r.groups]		# get a list of groups for this reservation

                        for i in r.instances:				# loop through all instances with-in reservation
                                i.groups = ','.join(groups)		# join the groups into a comma separated list for consumption below
                        	name = i.tags.get('Name','');		# get instance name from the 'Name' tag

				if (options.pattern):			# check if the user specified a pattern

					# try to compile the provided regex pattern, and catch it if it throws an error
					try:
						p = re.compile(options.pattern)
					except:
						print "error compiling the regular expression specified: '" + options.pattern + "'"
						print " see http://docs.python.org/release/2.6.5/howto/regex.html for supported patterns"
						print "\nEx:"
					    	print "  .* 		= greedy match anything"
						print "  .*uat.*	= will match any name containing 'uat'"
						print "  .*dev.*	= will match any name containing 'dev'"
						print "  ^ubi.*		= will match any name beginning with 'ubi'\n"
						sys.exit(1)

					search_pool = dict(i.__dict__)
					match_counter = 0
					for item in search_pool:
						if(p.match(str(search_pool.get(item)))):
							match_counter += 1

					if (p.match(name) or match_counter > 0):
					#	print i.__dict__
						data = dict( 
							public_ip = i.ip_address, 
							public_dns = i.public_dns_name,
							private_ip = i.private_ip_address, 
							private_dns = i.dns_name,
							instance_type = i.instance_type,
							region = i.placement,
							root_device_type = i.root_device_type,
							root_device_name = i.root_device_name,
							image_id = i.image_id,
							security_groups = i.groups,
							security_key = i.key_name,
							instance_id = i.id,
							hypervisor_type = i.hypervisor,
							arch_type = i.architecture
						)
						config[name] = data
				else:
					data = dict( 
						public_ip = i.ip_address, 
						public_dns = i.public_dns_name,
						private_ip = i.private_ip_address, 
						private_dns = i.dns_name,
						instance_type = i.instance_type,
						region = i.placement,
						root_device_type = i.root_device_type,
						root_device_name = i.root_device_name,
						image_id = i.image_id,
						security_groups = i.groups,
						security_key = i.key_name,
						instance_id = i.id,
						hypervisor_type = i.hypervisor,
						arch_type = i.architecture
					)
					config[name] = data

		print json.dumps(config,sort_keys=True, indent=4)
	else:
		parser.print_help()
		sys.exit(1)



if __name__ == "__main__":

	# usage statement
	usage = "usage: %prog --key [aws_key] --secret [aws_secret] --pattern [regex]"

	#assign usage display to option parser
	parser = OptionParser(usage=usage) 

	# add key option
	parser.add_option("-k","--key", dest="key", help="AWS Key to use\n") 

	# add secret option
	parser.add_option("-s","--secret", dest="secret", help="AWS Secret to use\n")

	# add regex pattern
	parser.add_option("-p","--pattern", dest="pattern", help="Regular Expression pattern (pcre compliant) to search for, examples include '.*', '^ubi.*', '*.dev.*', etc")

	# check the length of our args and 
	# start the ball rolling....
	if(len(sys.argv) > 1):
		main(sys.argv[1:])
	else:
		parser.print_help()		
		sys.exit(1)


Sample run


[jess@ip-x-x-x-x bin]$ ./ec2_full_search_lookup.py -k [key] -s [secret] -p '.*\.micro'
{
    "[hostname]": {
        "arch_type": "x86_64", 
        "hypervisor_type": "xen", 
        "image_id": "[image_id]", 
        "instance_id": "[instance_id]", 
        "instance_type": "t1.micro", 
        "private_dns": "[private_ip].compute-1.amazonaws.com", 
        "private_ip": "[private_ip]", 
        "public_dns": "[public_ip].compute-1.amazonaws.com", 
        "public_ip": "[public_ip]", 
        "region": "us-east-1d", 
        "root_device_name": "/dev/sda1", 
        "root_device_type": "ebs", 
        "security_groups": "[security_group]", 
        "security_key": "[some_key]"
    }
}
[jess@ip-10-x-x-x bin]$ ./ec2_full_search_lookup.py -k [key] -s [secret] -p '10\.x\.x\.x'
{
    "[hostname]": {
        "arch_type": "x86_64", 
        "hypervisor_type": "xen", 
        "image_id": "[image_id]", 
        "instance_id": "[instance_id]", 
        "instance_type": "m2.2xlarge", 
        "private_dns": "", 
        "private_ip": "[private_ip]", 
        "public_dns": "", 
        "public_ip": "[public_ip]", 
        "region": "us-east-1d", 
        "root_device_name": "/dev/sda1", 
        "root_device_type": "ebs", 
        "security_groups": "", 
        "security_key": "[some_key]"
    }
}
[jess@ip-10-x-x-x bin]$

Lots of new things to discuss  0 Comments

Well, its been a wild couple of months.



The first bit of news is that I no longer work at Cengage. I was offered a very interesting / challenging position with Ubisoft. I of course accepted (how could I not?), and have been rapidly getting into a groove with Vertica, Linux (Centos/AMZ), Amazon Web Services, Hadoop (HDFS, Hive, Hue, Cloudera) and Python (yeah, there are many people laughing at me right now). Most of these changes are going well, and while initially resistant to python, I have given in and started coding various utilities to test the feasibility of using python as an automation tool. While the language itself doesn't seem hard, it definitely has its oddities (as do most languages). And as an aside, if there are any python folks reading this, please (please please please) add a freakin switch statement (wtf???), and honestly, I prefer braces ({}), i.e. whitespace sucks and has already bitten me several times.



So, back to Ubisoft. I've joined a old colleague to work in the Game Analytics Services group as a Principal Systems Architect. Not sure what the principal means, but I guess it has something to do with being a lead architect (or at least thats what I tell myself) ;-). I've been rapidly learning how things work at Ubi, and working to re-aqcuaint myself with Hadoop, and also learn some of the newer associated technologies I hadn't had time to keep up with (Hive, HUE, Flume). I initially was trying to get Cloudera working, but there are some interesting learning challenges to how they build out things. There were a few road blocks as well. For instance, if I wanted to use hive in a multi-user mode, then I couldn't rely on the embedded database, but would have to setup to use mysql. This was an interesting oddity considering the SCM manager software provided by Cloudera actually sits on top of postgres. At any rate, we ran into lots of issues with Cloudera's implementation so for the short term and to get things moving forward I built out a hadoop cluster, running 3TB across four AWS nodes, with Hive sitting on top (and configured to a mysql meta-store). I'll hopefully add a article soon describing a generic setup, and then another one describing how I finally get Cloudera running smoothly.



At any rate, I just got the blog going again (I had moved it from Mac OSX -> Linux, and ran into some lib problems initially); so figured I'd write a quick post so google would catch it ;-)

PHP deployment script  0 Comments

11 November, 2011 · Tagged:

One of our teams wanted an easy way to update their staging site whenever a developer made a commit. While we could have used Jenkins/Cruisecontrol/etc, we currently don't have those environments available, or the resources to build them out quickly. We settled on a quick and dirty for the short term, and together with the development team mgr, we banged this script out in short order. Pretty simple little bit of shell code, but definitely gonna get mileage out of this one. Tried to keep all configurable items at the top, so as to make duplicating it easier (hopefully we'll find some cycles for jenkins!).




#!/bin/bash
# UNDONE:
#  need to figure out what to do on files that need to be deleted
#  make it a little cleaner, verify the !~ part, etc
DEBUG=0
SVN_BIN='/opt/subversion/current/bin/svn'
TARGET_DIR='/www/docs/'
REPO='svn:////trunk'
URL_LENGTH=${#REPO}
REVISION_FILE='svn.revision'

echo "Getting info from remote repo"
REMOTE_VERSION=$(${SVN_BIN} info $REPO | /usr/bin/grep Revision | /usr/bin/awk '{print $2}')
CURRENT_VERSION=$(/bin/cat $REVISION_FILE)
# CURRENT_VERSION=1170 # enable for debugging

echo "Current Revision: $CURRENT_VERSION"
echo "Remote Revision: $REMOTE_VERSION"

if [ "$REMOTE_VERSION" -eq "$CURRENT_VERSION" ]; then
	echo "No export needed"
	exit 0
else
	echo "Found files needing updates"
	echo " - getting diffs between revisions"
        UPDATED_FILE_LIST=`${SVN_BIN} diff --summarize -r $CURRENT_VERSION:$REMOTE_VERSION $REPO 2>&1 | /usr/bin/awk '{print $2}'`

	for i in $(/bin/echo ${UPDATED_FILE_LIST[@]}); do 
   	   FILENAME=${i:$URL_LENGTH}
   	   UPDATED_FILE="${TARGET_DIR}${FILENAME}"
	   if [ ${DEBUG} -eq 1 ]; then
   	       echo "   - executing '${SVN_BIN} export ${i} ${TARGET_DIR}${FILENAME}'"
	   else
	       echo "   - updating ${UPDATED_FILE}"
	       RES=$(${SVN_BIN} export ${i} ${UPDATED_FILE} 2>&1)

               if [[ ${RES} !~ "complete" ]]; then
		  echo "ERROR!!!!"
		  echo "CMD:${SVN_BIN} export ${i} ${TARGET_DIR}${FILENAME}:"
		  echo "UPDATED_FILE:${UPDATED_FILE}:"
		  echo "FILENAME:${FILENAME}:"
		  echo "RES:${RES}:"
		  exit 1
	       fi
	   fi

	done

	echo "Saving revision number '${REMOTE_VERSION}' to ${REVISION_FILE}"
	echo ${REMOTE_VERSION} > ${REVISION_FILE}
fi



Once you have this script updated, just add it to cron, at whatever frequency you like.

Ex:


*/5 * * * * /www/bin/svn.sh 2>&1 > /tmp/svn.sh.out

 1 2 3 Next →
Choose from full feed or comments feed.
Jesse Charbneau's blog is powered by Habari 0.7.1.
Theme: hMallow2. Administrator admin.