<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Posts on Greg Reinbach</title>
		<link>https://reinbach.com/posts/</link>
		<description>Recent content in Posts on Greg Reinbach</description>
		<generator>Hugo -- gohugo.io</generator>
		<language>en-us</language>
		<managingEditor>greg@reinbach.com (Greg Reinbach)</managingEditor>
		<webMaster>greg@reinbach.com (Greg Reinbach)</webMaster>
		<lastBuildDate>Sun, 31 Dec 2023 14:06:49 -0500</lastBuildDate>
		<atom:link href="https://reinbach.com/posts/index.xml" rel="self" type="application/rss+xml" />
		
		<item>
			<title>Argocd on GKE Cluster with access to EKS Cluster</title>
			<link>https://reinbach.com/posts/argocd-gke-access-eks/</link>
			<pubDate>Sun, 31 Dec 2023 14:06:49 -0500</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/argocd-gke-access-eks/</guid>
			<description>&lt;p&gt;With &lt;code&gt;ArgoCD&lt;/code&gt; running on a GKE cluster and needing to access/add an EKS cluster, the following worked for me;&lt;/p&gt;
&lt;p&gt;After adding the cluster to ArgoCD as normal, take note of the user ARN used in the cluster&amp;rsquo;s configuration.
Found in the &lt;code&gt;users&lt;/code&gt; section of the kubectl configuration for the cluster.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: &amp;lt;ca-cert&amp;gt;
    server: https://....eks.amazonaws.com
  name: https://....eks.amazonaws.com
contexts:
- context
    cluster: https://....eks.amazonaws.com
    namespace: argocd
    user: https://....eks.amazonaws.com
  name: https://....eks.amazonaws.com
current-context: https://....eks.amazonaws.com
kind: Config
preferences: {}
users:
- name: https://....eks.amazonaws.com
  user:
   exec:
     apiVersion: client.authentication.k8s.io/v1beta1
     args:
     - aws
     - --cluster-name
     - &amp;lt;cluster-name&amp;gt;
     - --role-arn
     - arn:aws:eks:&amp;lt;aws-region&amp;gt;:&amp;lt;account-id&amp;gt;:cluster/&amp;lt;cluster-name&amp;gt; # this is the user ARN to take note of
     command:i argocd-k8s-auth
     env: null
     interactiveMode: Never
     provideClusterInfo: false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then add the &lt;code&gt;aws-access-key-id&lt;/code&gt; and &lt;code&gt;aws-secret-access-key&lt;/code&gt; for that user to both the argocd server and application contoller services.
For example, in my case I&amp;rsquo;m making use of helm to install/setup ArgoCD, so the &lt;code&gt;values.yaml&lt;/code&gt; includes the following configuration changes;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>With <code>ArgoCD</code> running on a GKE cluster and needing to access/add an EKS cluster, the following worked for me;</p>
<p>After adding the cluster to ArgoCD as normal, take note of the user ARN used in the cluster&rsquo;s configuration.
Found in the <code>users</code> section of the kubectl configuration for the cluster.</p>
<pre><code>apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: &lt;ca-cert&gt;
    server: https://....eks.amazonaws.com
  name: https://....eks.amazonaws.com
contexts:
- context
    cluster: https://....eks.amazonaws.com
    namespace: argocd
    user: https://....eks.amazonaws.com
  name: https://....eks.amazonaws.com
current-context: https://....eks.amazonaws.com
kind: Config
preferences: {}
users:
- name: https://....eks.amazonaws.com
  user:
   exec:
     apiVersion: client.authentication.k8s.io/v1beta1
     args:
     - aws
     - --cluster-name
     - &lt;cluster-name&gt;
     - --role-arn
     - arn:aws:eks:&lt;aws-region&gt;:&lt;account-id&gt;:cluster/&lt;cluster-name&gt; # this is the user ARN to take note of
     command:i argocd-k8s-auth
     env: null
     interactiveMode: Never
     provideClusterInfo: false
</code></pre>
<p>Then add the <code>aws-access-key-id</code> and <code>aws-secret-access-key</code> for that user to both the argocd server and application contoller services.
For example, in my case I&rsquo;m making use of helm to install/setup ArgoCD, so the <code>values.yaml</code> includes the following configuration changes;</p>
<pre><code>...
controler:
   ...
  env:
  - name: AWS_ACCESS_KEY_ID
    valueFrom:
      secretKeyRef:
        name: aws-cluster-user
        key: aws-access-key-id
  - name: AWS_SECRET_ACCESS_KEY
    valueFrom:
      secretKeyRef:
        name: aws-cluster-user
        key: aws-secret-access-key
  ...
server:
  ...
  env:
  - name: AWS_ACCESS_KEY_ID
    valueFrom:
      secretKeyRef:
        name: aws-cluster-user
        key: aws-access-key-id
  - name: AWS_SECRET_ACCESS_KEY
    valueFrom:
      secretKeyRef:
        name: aws-cluster-user
        key: aws-secret-access-key
  ...
</code></pre>
<p>See <a href="https://argo-cd.readthedocs.io/en/stable/faq/#argo-cd-is-unable-to-connect-to-my-cluster-how-do-i-troubleshoot-it">ArgoCD FAQs</a> for some troubleshooting help.</p>
]]></content>
		</item>
		
		<item>
			<title>Async Python Class</title>
			<link>https://reinbach.com/posts/async-python-class/</link>
			<pubDate>Tue, 19 Dec 2023 06:30:45 -0500</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/async-python-class/</guid>
			<description>&lt;p&gt;If needing to run async code when initializing a Class, the following worked for me;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class A():
  async def async_init(self):
    await self.calc()

    return self

  def __await__(self):
    return self.async_init().__await__()

  async def calc(self):
    return 1 + 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A full example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/usr/bin/python
import asyncio

class A():
    def __init__(self):
        self.sum = await self.calc()
    
    async def async_init(self):
        self.sum = await self.calc()

        return self

    def __await__(self):
        return self.async_init().__await__()

    async def calc(self):
        return 1 + 1

async def main():
    a = await A().calc()

    print(a)


if __name__ == &amp;quot;__main__&amp;quot;:
    asyncio.run(main())
&lt;/code&gt;&lt;/pre&gt;</description>
			<content type="html"><![CDATA[<p>If needing to run async code when initializing a Class, the following worked for me;</p>
<pre><code>class A():
  async def async_init(self):
    await self.calc()

    return self

  def __await__(self):
    return self.async_init().__await__()

  async def calc(self):
    return 1 + 1
</code></pre>
<p>A full example:</p>
<pre><code>#!/usr/bin/python
import asyncio

class A():
    def __init__(self):
        self.sum = await self.calc()
    
    async def async_init(self):
        self.sum = await self.calc()

        return self

    def __await__(self):
        return self.async_init().__await__()

    async def calc(self):
        return 1 + 1

async def main():
    a = await A().calc()

    print(a)


if __name__ == &quot;__main__&quot;:
    asyncio.run(main())
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>Pipenv and GCP Python Artifact</title>
			<link>https://reinbach.com/posts/pipenv-gcp-python-artifact/</link>
			<pubDate>Thu, 23 Nov 2023 07:08:02 -0500</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/pipenv-gcp-python-artifact/</guid>
			<description>&lt;p&gt;It took me a while to figure out how to get &lt;code&gt;pipenv&lt;/code&gt; to work nicely with a GCP Python Artifact, so I thought I&amp;rsquo;d record the steps I took to make things work for me.&lt;/p&gt;
&lt;h2 id=&#34;step-1-add-source-to-pipfile&#34;&gt;Step 1: Add &lt;code&gt;[[source]]&lt;/code&gt; to &lt;code&gt;Pipfile&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;As usual you&amp;rsquo;ll want to add the relevant &lt;code&gt;[[source]]&lt;/code&gt; information to your &lt;code&gt;Pipfile&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[[source]]
name = &amp;#34;gcp&amp;#34;
url = &amp;#34;https://oauth2access@&amp;lt;location&amp;gt;-python.pkg.dev/&amp;lt;project&amp;gt;/&amp;lt;repo-name&amp;gt;/simple&amp;#34;
verify_ssl = true
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;oauth2access&lt;/code&gt; part can actually be any user name, GCP docs do refer to &lt;code&gt;_json_key_base64&lt;/code&gt; at times.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>It took me a while to figure out how to get <code>pipenv</code> to work nicely with a GCP Python Artifact, so I thought I&rsquo;d record the steps I took to make things work for me.</p>
<h2 id="step-1-add-source-to-pipfile">Step 1: Add <code>[[source]]</code> to <code>Pipfile</code></h2>
<p>As usual you&rsquo;ll want to add the relevant <code>[[source]]</code> information to your <code>Pipfile</code></p>
<pre tabindex="0"><code>[[source]]
name = &#34;gcp&#34;
url = &#34;https://oauth2access@&lt;location&gt;-python.pkg.dev/&lt;project&gt;/&lt;repo-name&gt;/simple&#34;
verify_ssl = true
</code></pre><p>The <code>oauth2access</code> part can actually be any user name, GCP docs do refer to <code>_json_key_base64</code> at times.</p>
<h2 id="step-2-addupdate-pipenv-section-in-pipfile">Step 2: Add/update <code>[pipenv]</code> section in <code>Pipfile</code></h2>
<p>You need to disable pip input in <code>Pipfile</code>, this is the part that took me a while to figure out.</p>
<pre tabindex="0"><code>[pipenv]
disable_pip_input = false
</code></pre><h2 id="step-3-install-keyring-and-keyringsgoogle-artifactregistry-auth">Step 3: Install <code>keyring</code> and <code>keyrings.google-artifactregistry-auth</code></h2>
<p>In order for <code>pipenv</code> to know to use google authentication process you need to install the relevant keyring libraries.</p>
<pre tabindex="0"><code>pipenv install keyring keyrings.google-artifactregistry-auth --dev
</code></pre><p>Note if you have a package listed in the <code>Pipfile</code> that references the GCP source, then you will need to install the keyring libraries via pip first.</p>
<pre tabindex="0"><code>pipenv run python3 -m pip install keyring keyrings.google-artifactregistry-auth
</code></pre><h2 id="step-4-add-google-credentials">Step 4: Add Google credentials</h2>
<p>Either set the credentials with <code>GOOGLE_APPLICATION_CREDENTIALS</code> env var.</p>
<pre tabindex="0"><code>echo &#34;GOOGLE_APPLICATION_CREDENTIALS=/path/to/gsa_key.json&#34; &gt; .env
</code></pre><p>Make sure to re-spawn the shell within the virtualenv to load the env vars from <code>.env</code> if necessary.</p>
<p>or you can make use of <code>gcloud</code> to login.</p>
<pre tabindex="0"><code>gcloud auth login
</code></pre><p>Refer to the <a href="https://cloud.google.com/artifact-registry/docs/python/authentication#keyring-user">Google Docs</a> for more information on setting up credentials.</p>
<h2 id="step-5-add-package-located-in-gcp-python-artifact">Step 5: Add package located in GCP Python artifact</h2>
<p>You can now install any package from your GCP Python artifact.</p>
<pre tabindex="0"><code>pipenv install &lt;package-name&gt; --index=gcp
</code></pre>]]></content>
		</item>
		
		<item>
			<title>Traefik, Goaccess, and Systemd</title>
			<link>https://reinbach.com/posts/traefik-goaccess-systemd/</link>
			<pubDate>Tue, 02 Feb 2021 07:34:01 -0500</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/traefik-goaccess-systemd/</guid>
			<description>&lt;p&gt;Looking to make use of &lt;a href=&#34;https://goaccess.io&#34;&gt;GoAccess&lt;/a&gt; for analytics behind &lt;a href=&#34;https://traefik.io/&#34;&gt;Traefik&lt;/a&gt; proxy and have these running via &lt;a href=&#34;https://systemd.io/&#34;&gt;Systemd&lt;/a&gt; services. The following snippets of configs etc may be of help.&lt;/p&gt;
&lt;p&gt;With the user of &lt;code&gt;Traefik&lt;/code&gt; for the proxy, enable the &lt;a href=&#34;https://doc.traefik.io/traefik/observability/access-logs/&#34;&gt;Access Logs&lt;/a&gt; configuration and set the &lt;code&gt;filePath&lt;/code&gt; option.&lt;/p&gt;
&lt;p&gt;If you have multiple websites on the server and you want to track them separately (running their own instance of GoAccess) then you can setup a &lt;code&gt;Systemd&lt;/code&gt; service that pipes the access logs to a separate log file for &lt;code&gt;GoAccess&lt;/code&gt; to process for each of the websites.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Looking to make use of <a href="https://goaccess.io">GoAccess</a> for analytics behind <a href="https://traefik.io/">Traefik</a> proxy and have these running via <a href="https://systemd.io/">Systemd</a> services. The following snippets of configs etc may be of help.</p>
<p>With the user of <code>Traefik</code> for the proxy, enable the <a href="https://doc.traefik.io/traefik/observability/access-logs/">Access Logs</a> configuration and set the <code>filePath</code> option.</p>
<p>If you have multiple websites on the server and you want to track them separately (running their own instance of GoAccess) then you can setup a <code>Systemd</code> service that pipes the access logs to a separate log file for <code>GoAccess</code> to process for each of the websites.</p>
<p>For example;</p>
<p><code>/etc/systemd/system/multi-user.target.wants/example-analytics-filter.service</code></p>
<pre tabindex="0"><code>[Unit]
Description=Filter Example Access Logs

[Service]
Type=simple
ExecStart=/bin/sh -c &#39;/usr/bin/tail -f /var/log/traefik/access.log | \
                  grep -i --line-buffered &#34;\-example\-&#34;&#39;
KillMode=mixed
StandardOutput=file:/opt/goaccess/data/access_example.log
Restart=always
PrivateTmp=false

[Install]
WantedBy=multi-user.target
</code></pre><p>This service is continuously processing the <code>Traefik</code> access log file and updating the <code>/opt/goaccess/data/access_example.log</code> file. We will use this file as the log file for <code>GoAccess</code> to process.</p>
<p>Now create a <code>GoAccess</code> service file for each instance;</p>
<p><code>/etc/systemd/system/multi-user.target.wants/example-analytics.service</code></p>
<pre tabindex="0"><code>[Unit]
Description=Example Live Log Analyzer
After=example-analytics-filter.service

[Service]
Type=simple
ExecStart=/usr/local/bin/goaccess \
               --log-file /opt/goaccess/data/access_example.log \
               --log-format COMMON \
               --html-report-title &#34;Example Statistics&#34; \
               --port 7891 \
               --ws-url example.com:7890 \
               --real-time-html \
               --output /home/www/example/analytics/index.html \
               --geoip-database /opt/goaccess/geoip/GeoLite2-City.mmdb \
               --db-path /opt/goaccess/data/example \
               --persist \
               --restore
ExecStop=/bin/kill -9 ${MAINPID}
PrivateTmp=false
Restart=always

[Install]
WantedBy=multi-user.target
</code></pre><p>Seeing that we want to be flexible to have multiple <code>GoAccess</code> instances running for each site, we set the <code>--port</code> option to a different value for each instance, in this instance it is <code>--port 7891</code>, the next instance can be <code>--port 7892</code> etc. For the <code>--ws-url</code> option we just need to change the domain name to match each website, but keep the same port number (<code>7890</code>) for each instance.</p>
<p>Lastly we have have the <code>Traefik</code> configuration to proxy everything.
In the static configuration file we have the following;</p>
<p><code>/etc/traefik/traefik.toml</code></p>
<pre tabindex="0"><code>[entryPoints]
  [entryPoints.web]
    address = &#34;:80&#34;
  [entryPoints.web-secure]
    address = &#34;:443&#34;
  [entryPoints.analytics]
    address = &#34;:7890&#34;

[providers]
  [providers.file]
    directory = &#34;/etc/traefik/conf.d&#34;
    watch = true

[certificatesResolvers.letsencrypt.acme]
  email = &#34;certs@example.com&#34;
  storage = &#34;acme.json&#34;
  [certificatesResolvers.letsencrypt.acme.httpChallenge]
    entryPoint = &#34;web&#34;

[accessLog]
  filePath = &#34;/var/log/traefik/access.log&#34;
</code></pre><p>We have some middlewares we want to make use of;</p>
<p><code>/etc/traefik/conf.d/middleware.toml</code></p>
<pre tabindex="0"><code>http]
  [http.middlewares]
    [http.middlewares.https-redirect.redirectScheme]
      scheme = &#34;https&#34;
      permanent = true
      realm = &#34;example.com&#34;

   [http.middlewares.ssl-header.headers]
      [http.middlewares.ssl-header.headers.customRequestHeaders]
        X-Forwarded-Proto = &#34;https&#34;
</code></pre><p>Then for each website instance we have running;</p>
<p><code>/etc/traefik/conf.d/example.toml</code></p>
<pre tabindex="0"><code>[http]
  [http.routers]
    [http.routers.http-example-router]
      entryPoints = [&#34;web&#34;]
      service = &#34;service-example&#34;
      rule = &#34;Host(`example.com`,`www.example.com`)&#34;
      middlewares = [&#34;https-redirect&#34;]

    [http.routers.analytics-example-router]
      entryPoints = [&#34;analytics&#34;]
      service = &#34;service-analytics-example&#34;
      rule = &#34;Host(`example.com`,`www.example.com`)&#34;
      middlewares = [&#34;ssl-header&#34;]
      [http.routers.analytics-example-router.tls]
        certResolver = &#34;letsencrypt&#34;
        [[http.routers.analytics-example-router.tls.domains]]
          main = &#34;example.com&#34;
          sans = [&#34;www.example.com&#34;]

    [http.routers.https-example-router]
      entryPoints = [&#34;web-secure&#34;]
      service = &#34;service-example&#34;
      rule = &#34;Host(`example.com`,`www.example.com`)&#34;
      [http.routers.https-example-router.tls]
        certResolver = &#34;letsencrypt&#34;
        [[http.routers.https-example-router.tls.domains]]
          main = &#34;example.com&#34;
          sans = [&#34;www.example.com&#34;]

  [http.services]
    [http.services.service-example]
      [http.services.service-example.loadBalancer]
        [[http.services.service-example.loadBalancer.servers]]
          url = &#34;http://127.0.0.1:3000&#34;

    [http.services.service-analytics-example]
      [http.services.service-analytics-example.loadBalancer]
        [[http.services.service-analytics-example.loadBalancer.servers]]
          url = &#34;http://127.0.0.1:7891&#34;
</code></pre><p>What is not showng in this solution is the service that is running at <code>http://127.0.0.1:3000</code> that is serving upthe relevant files for the example website.</p>
<p>In the example configurations above it is expected that the service running at <code>http://127.0.0.1:3000</code> will serve the <code>/home/www/example/analytics/index.html</code> when prompted with the path <code>/analytics</code>.</p>
]]></content>
		</item>
		
		<item>
			<title>Traefik, Django and ALLOWED_HOSTS</title>
			<link>https://reinbach.com/posts/traefik-django-allowed-hosts/</link>
			<pubDate>Thu, 31 Dec 2020 11:51:44 -0500</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/traefik-django-allowed-hosts/</guid>
			<description>&lt;p&gt;When setting up &lt;a href=&#34;https://www.djangoproject.com/&#34;&gt;Django&lt;/a&gt; behind &lt;a href=&#34;https://traefik.io/traefik/&#34;&gt;Traefik&lt;/a&gt; you want to make a few tweaks to cleanly handle the Django &lt;code&gt;ALLOWED_HOSTS&lt;/code&gt; setting.&lt;/p&gt;
&lt;p&gt;Firstly you want to decide whether or not the Django application should be accessible directly by IP address, if so, make sure that the IP address is added to the &lt;code&gt;ALLOWED_HOSTS&lt;/code&gt; setting.&lt;/p&gt;
&lt;p&gt;If not, then you want to have the Django application listening on &lt;code&gt;localhost&lt;/code&gt; and not the external IP address.&lt;/p&gt;
&lt;p&gt;There are 2 ways for Traefik to handle checking the host headers;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>When setting up <a href="https://www.djangoproject.com/">Django</a> behind <a href="https://traefik.io/traefik/">Traefik</a> you want to make a few tweaks to cleanly handle the Django <code>ALLOWED_HOSTS</code> setting.</p>
<p>Firstly you want to decide whether or not the Django application should be accessible directly by IP address, if so, make sure that the IP address is added to the <code>ALLOWED_HOSTS</code> setting.</p>
<p>If not, then you want to have the Django application listening on <code>localhost</code> and not the external IP address.</p>
<p>There are 2 ways for Traefik to handle checking the host headers;</p>
<h1 id="option-1">Option 1:</h1>
<p>The simplest way is to make use of the <a href="https://doc.traefik.io/traefik/routing/routers/#rule">HostHeader</a> rule in the router;</p>
<pre tabindex="0"><code>http:
  routers:
    router1:
      rule: &#34;HostHeader(`example.com`, `www.example.com`)&#34;
      service: myService
</code></pre><h1 id="option-2">Option 2:</h1>
<p>A more convoluted option is to make use of the Traefik <a href="https://doc.traefik.io/traefik/middlewares/headers/#allowedhosts">allowedHosts</a> middleware headers to allow only valid hosts.</p>
<p>A basic sample would be;</p>
<pre tabindex="0"><code>http:
  routers:
    router1:
      rule: &#34;Host(`example.com`, `www.example.com`)&#34;
      service: myService
      middlewares:
        - &#34;myHosts&#34;

  middlewares:
    myHosts:
      headers:
        allowedHosts:
          - &#34;example.com&#34;
          - &#34;www.example.com&#34;
</code></pre><p>And to ensure that it&rsquo;s all working correctly;</p>
<pre tabindex="0"><code># valid request
curl -H &#34;HOST: example.com&#34; http://example.com

# invalid HTTP_HOST header
curl -H &#34;HOST: wrong.example.com&#34; http://example.com
</code></pre>]]></content>
		</item>
		
		<item>
			<title>Bayete</title>
			<link>https://reinbach.com/posts/bayete/</link>
			<pubDate>Mon, 28 Dec 2020 06:51:34 -0500</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/bayete/</guid>
			<description>&lt;p&gt;Whenever joining a new startup organization the first step has always been setting up a development environment for the team. Initially, in wanting to keep costs low, we preferred to self-host the various services that we wanted to make use of. It was not hard work, more tedious and repetitious and I had the skillset to do this.&lt;/p&gt;
&lt;p&gt;Over time the maintenance of the development environment generally requires updates to the services/servers and the adding/removing of users as the team members change. This could lead to a deficiency in the solution if not enough team members had the skillset or inclination to perform these tasks periodically.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Whenever joining a new startup organization the first step has always been setting up a development environment for the team. Initially, in wanting to keep costs low, we preferred to self-host the various services that we wanted to make use of. It was not hard work, more tedious and repetitious and I had the skillset to do this.</p>
<p>Over time the maintenance of the development environment generally requires updates to the services/servers and the adding/removing of users as the team members change. This could lead to a deficiency in the solution if not enough team members had the skillset or inclination to perform these tasks periodically.</p>
<p>So after having set up development environments a few times for different organizations. I started thinking it would be nice if there was a solution that provided this management of self-hosted environments, and hence <a href="https://bayete.com">Bayete</a> was born.</p>
]]></content>
		</item>
		
		<item>
			<title>Checking SMTP Email</title>
			<link>https://reinbach.com/posts/check-smtp/</link>
			<pubDate>Sun, 27 Dec 2020 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/check-smtp/</guid>
			<description>&lt;p&gt;When checking that your SMTP settings work properly it is most helpful to run each SMTP step individually.&lt;/p&gt;
&lt;p&gt;I ended up down a rabbit hole, when attempting to check my SMTP settings in a Django application. An &lt;code&gt;smtplib.SMTPServerDisconnected&lt;/code&gt; error was occurring each time. I thought this was related to closed SMPT ports (465/587), and went so far as to open a ticket with hosting provider asking for the relevant ports to be opened for my servers.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>When checking that your SMTP settings work properly it is most helpful to run each SMTP step individually.</p>
<p>I ended up down a rabbit hole, when attempting to check my SMTP settings in a Django application. An <code>smtplib.SMTPServerDisconnected</code> error was occurring each time. I thought this was related to closed SMPT ports (465/587), and went so far as to open a ticket with hosting provider asking for the relevant ports to be opened for my servers.</p>
<p>But alas, it was a simple bloody misconfigured username! So actually, I was failing to authenticate.
Compounding the issue, was that locally I the correct username, but on the server I have the username misconfigured.</p>
<p>When I finally did each step manually, the issue was easy to see.</p>
<p>Below are some step by step actions to send SMTP email with python;</p>
<pre><code>import smtplib
from email.mime.text import MIMEText

msg = MIMEText(&quot;Testing email&quot;)
msg['Subject'] = &quot;Hello&quot;
msg[&quot;From&quot;] = &quot;no-reply@example.com&quot;
msg[&quot;To&quot;] = &quot;to@example.com&quot;

s = smtplib.SMTP(&quot;smtp.example.com&quot;, 587)
s.login(&quot;postmaster@example.com&quot;, &quot;supersecret&quot;)
s.sendmail(msg[&quot;From&quot;], msg[&quot;To&quot;], msg.as_string())
s.quit()
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>Issue updating setting value in Django Environ</title>
			<link>https://reinbach.com/posts/django-environ/</link>
			<pubDate>Thu, 10 Sep 2020 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/django-environ/</guid>
			<description>&lt;p&gt;Django environ makes use of &lt;code&gt;setdefault&lt;/code&gt; so if you are looking to change a settings value in a environment file and are within a virtualenv you may need to exit/enter the virtualenv for the change(s) to take place. It took me a while to figure this one out.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Django environ makes use of <code>setdefault</code> so if you are looking to change a settings value in a environment file and are within a virtualenv you may need to exit/enter the virtualenv for the change(s) to take place. It took me a while to figure this one out.</p>
]]></content>
		</item>
		
		<item>
			<title>Pass</title>
			<link>https://reinbach.com/posts/pass/</link>
			<pubDate>Thu, 10 Sep 2020 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/pass/</guid>
			<description>&lt;p&gt;I am embarassed to say that I have only just lately discovered &lt;a href=&#34;https://www.passwordstore.org/&#34;&gt;&lt;code&gt;pass&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Can&amp;rsquo;t believe it took me so long, but now that I have, very happy with it. Nice and simple to make use of it.&lt;/p&gt;
&lt;p&gt;I highly recommend taking a look at it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I am embarassed to say that I have only just lately discovered <a href="https://www.passwordstore.org/"><code>pass</code></a>.</p>
<p>Can&rsquo;t believe it took me so long, but now that I have, very happy with it. Nice and simple to make use of it.</p>
<p>I highly recommend taking a look at it.</p>
]]></content>
		</item>
		
		<item>
			<title>Use YAML file format for AWS stack templates</title>
			<link>https://reinbach.com/posts/use-yaml-format-aws-stack-templates/</link>
			<pubDate>Fri, 12 May 2017 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/use-yaml-format-aws-stack-templates/</guid>
			<description>&lt;p&gt;When making use of &lt;a href=&#34;https://aws.amazon.com/cloudformation/&#34;&gt;AWS CloudFormation&lt;/a&gt; there is currently a file size limit of 51200 bytes on stack templates.&lt;/p&gt;
&lt;p&gt;On a reasonable size setup you can quickly hit that limit using JSON format, while YAML format will take you a while longer.
A quick example of a file size comparison between the two file formats;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;stack.yaml - 3.3K
stack.json - 5.6K
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to convert from JSON to YAML you can do that with the following python code snippet.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>When making use of <a href="https://aws.amazon.com/cloudformation/">AWS CloudFormation</a> there is currently a file size limit of 51200 bytes on stack templates.</p>
<p>On a reasonable size setup you can quickly hit that limit using JSON format, while YAML format will take you a while longer.
A quick example of a file size comparison between the two file formats;</p>
<pre><code>stack.yaml - 3.3K
stack.json - 5.6K
</code></pre>
<p>If you want to convert from JSON to YAML you can do that with the following python code snippet.</p>
<pre><code>#!/env/bin python

import json
import yaml

with open(&quot;stack.json&quot;) as fj:
    with open(&quot;stack.yaml&quot;, &quot;w&quot;) as fy:
        yaml.dump(json.load(fj), fy)
</code></pre>
<p>Another option is to handle large stack templates is to make use of <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html">Transform</a></p>
]]></content>
		</item>
		
		<item>
			<title>Tarfile Tip</title>
			<link>https://reinbach.com/posts/tarfile-tip/</link>
			<pubDate>Wed, 30 Nov 2016 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/tarfile-tip/</guid>
			<description>&lt;p&gt;Working with tar files and attempting to create a py.test fixture of a tar file and I ran into an issue.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m using &lt;a href=&#34;https://docs.python.org/3.5/library/tarfile.html&#34;&gt;TarFile&lt;/a&gt; package on python 3.5&lt;/p&gt;
&lt;p&gt;My initial fixture was setup as;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@pytest.fixture
def file_tar(tmpdir, tmpdir_factory):
    fn = tmpdir_factory.mktemp(&amp;quot;tar&amp;quot;).join(&amp;quot;test.tar&amp;quot;)
    tf = tarfile.TarFile(str(fn), &amp;quot;w&amp;quot;)
    p1 = tmpdir.mkdir(&amp;quot;src1&amp;quot;).join(&amp;quot;test1.txt&amp;quot;)
    p1.write(&amp;quot;text 1 content&amp;quot;)
    tf.add(p1)
    p2 = tmpdir.mkdir(&amp;quot;src2&amp;quot;).join(&amp;quot;test2.txt&amp;quot;)
    p2.write(&amp;quot;text 2 content&amp;quot;)
    tf.add(str(p2))
    tf.close()
    return fn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But I ended up with an empty file in the tar&amp;rsquo;d file fixture, and that was causing issues when attempting to extract the contents of the tar&amp;rsquo;d file. As it is an empty file and results in the following error/exception &lt;code&gt;tarfile.ReadError: empty file&lt;/code&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Working with tar files and attempting to create a py.test fixture of a tar file and I ran into an issue.</p>
<p>I&rsquo;m using <a href="https://docs.python.org/3.5/library/tarfile.html">TarFile</a> package on python 3.5</p>
<p>My initial fixture was setup as;</p>
<pre><code>@pytest.fixture
def file_tar(tmpdir, tmpdir_factory):
    fn = tmpdir_factory.mktemp(&quot;tar&quot;).join(&quot;test.tar&quot;)
    tf = tarfile.TarFile(str(fn), &quot;w&quot;)
    p1 = tmpdir.mkdir(&quot;src1&quot;).join(&quot;test1.txt&quot;)
    p1.write(&quot;text 1 content&quot;)
    tf.add(p1)
    p2 = tmpdir.mkdir(&quot;src2&quot;).join(&quot;test2.txt&quot;)
    p2.write(&quot;text 2 content&quot;)
    tf.add(str(p2))
    tf.close()
    return fn
</code></pre>
<p>But I ended up with an empty file in the tar&rsquo;d file fixture, and that was causing issues when attempting to extract the contents of the tar&rsquo;d file. As it is an empty file and results in the following error/exception <code>tarfile.ReadError: empty file</code></p>
<p>Changing the fixture to the following, resolved the issue;</p>
<pre><code>@pytest.fixture
def file_tar(tmpdir, tmpdir_factory):
    fn = tmpdir_factory.mktemp(&quot;tar&quot;).join(&quot;test.tar&quot;)
    p1 = tmpdir.mkdir(&quot;src1&quot;).join(&quot;test1.txt&quot;)
    p1.write(&quot;text 1 content&quot;)
    p2 = tmpdir.mkdir(&quot;src2&quot;).join(&quot;test2.txt&quot;)
    p2.write(&quot;text 2 content&quot;)
    with tarfile.open(str(fn), &quot;w&quot;) as tf:
        tf.add(p1)
        tf.add(str(p2))
    return fn
</code></pre>
<p>I guess that is more pythonic as well.</p>
]]></content>
		</item>
		
		<item>
			<title>Setuptools - Upload Error With Python 3.5</title>
			<link>https://reinbach.com/posts/setuptools-classifiers-upload-python3-5/</link>
			<pubDate>Thu, 13 Oct 2016 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/setuptools-classifiers-upload-python3-5/</guid>
			<description>&lt;p&gt;Came across a funky error attempting to upload a package to PyPi using Python 3.5&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ python setup.py sdist bdist_wheel upload


...


Traceback (most recent call last):
  File &amp;quot;setup.py&amp;quot;, line 45, in &amp;lt;module&amp;gt;
    install_requires=[&#39;django&amp;gt;=1.10&#39;]
  File &amp;quot;/usr/lib64/python3.5/distutils/core.py&amp;quot;, line 148, in setup
    dist.run_commands()
  File &amp;quot;/usr/lib64/python3.5/distutils/dist.py&amp;quot;, line 955, in run_commands
    self.run_command(cmd)
  File &amp;quot;/usr/lib64/python3.5/distutils/dist.py&amp;quot;, line 974, in run_command
    cmd_obj.run()
  File &amp;quot;/usr/lib64/python3.5/distutils/command/upload.py&amp;quot;, line 63, in run
    self.upload_file(command, pyversion, filename)
  File &amp;quot;/usr/lib64/python3.5/distutils/command/upload.py&amp;quot;, line 162, in upload_file
    body.write(value)
TypeError: a bytes-like object is required, not &#39;str&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;setup.py&lt;/code&gt; file was along these lines&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Came across a funky error attempting to upload a package to PyPi using Python 3.5</p>
<pre><code>$ python setup.py sdist bdist_wheel upload


...


Traceback (most recent call last):
  File &quot;setup.py&quot;, line 45, in &lt;module&gt;
    install_requires=['django&gt;=1.10']
  File &quot;/usr/lib64/python3.5/distutils/core.py&quot;, line 148, in setup
    dist.run_commands()
  File &quot;/usr/lib64/python3.5/distutils/dist.py&quot;, line 955, in run_commands
    self.run_command(cmd)
  File &quot;/usr/lib64/python3.5/distutils/dist.py&quot;, line 974, in run_command
    cmd_obj.run()
  File &quot;/usr/lib64/python3.5/distutils/command/upload.py&quot;, line 63, in run
    self.upload_file(command, pyversion, filename)
  File &quot;/usr/lib64/python3.5/distutils/command/upload.py&quot;, line 162, in upload_file
    body.write(value)
TypeError: a bytes-like object is required, not 'str'
</code></pre>
<p>The <code>setup.py</code> file was along these lines</p>
<pre><code>#!python
setup(
    name='project-name',
    ...
    platforms=['any'],
    license='MIT License',
    classifiers=(
        'Environment :: Web Environment',
        'Framework :: Django',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
    ),
    packages=find_packages(),
    install_requires=['django&gt;=1.10']
)
</code></pre>
<p>Took me a while to figure out what the issue was, and why the error, but alas is appears that the <code>classifiers</code> needs to be a list and not a tuple.</p>
<p>So changing the <code>setup.py</code> file to something like this</p>
<pre><code>#!python
setup(
    name='project-name',
    ...
    platforms=['any'],
    license='MIT License',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.5',
    ],
    packages=find_packages(),
    install_requires=['django&gt;=1.10']
)
</code></pre>
<p>Fixed the issue.</p>
]]></content>
		</item>
		
		<item>
			<title>Golang - Web - Templating</title>
			<link>https://reinbach.com/posts/golang-web-templating/</link>
			<pubDate>Sat, 04 Apr 2015 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/golang-web-templating/</guid>
			<description>&lt;p&gt;Full templating functionality in our website. We want to be able to pass in data to the templates and determine which templates are to be used when generating our response.&lt;/p&gt;
&lt;p&gt;This is a continuation of the &lt;a href=&#34;https://reinbach.com/golang-webapps-1.html&#34;&gt;Golang Web Apps&lt;/a&gt; and the source code can be found at &lt;a href=&#34;https://github.com/reinbach/golang-webapp-guide&#34;&gt;https://github.com/reinbach/golang-webapp-guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To better organize the code we move all the templating functionality, the templates, and the static files into a separate directory. Which now gives us the following file layout.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Full templating functionality in our website. We want to be able to pass in data to the templates and determine which templates are to be used when generating our response.</p>
<p>This is a continuation of the <a href="/golang-webapps-1.html">Golang Web Apps</a> and the source code can be found at <a href="https://github.com/reinbach/golang-webapp-guide">https://github.com/reinbach/golang-webapp-guide</a>.</p>
<p>To better organize the code we move all the templating functionality, the templates, and the static files into a separate directory. Which now gives us the following file layout.</p>
<pre><code>.
├── server.go
└── template
    ├── constants.go
    ├── context.go
    ├── html
    │   └── ...
    ├── render.go
    └── static
        └── ...
</code></pre>
<p>The render functioned is tweaked in a couple of ways;</p>
<ul>
<li>A context parameter (data for the template) is passed to the render function</li>
<li>A list of templates is now expected instead of a single template.</li>
</ul>
<p>The <code>UpdateTemplateList</code> function is used to prepend the full path to the templates.</p>
<pre><code>#!python
func UpdateTemplateList(tmpls []string) []string {
     d := GetAbsDir(&quot;template&quot;, TEMPLATE_DIR)
     for i, v := range tmpls {
         tmpls[i] = filepath.Join(d, v)
     }
     return tmpls
 }
</code></pre>
<p>And for that we made use of a constant, and so went a step further and moved all our constants into a sepatate <code>constants</code> file, which now has the following;</p>
<pre><code>const (
      STATIC_URL     string = &quot;/static/&quot;
      STATIC_ROOT    string = &quot;static/&quot;
      TEMPLATE_DIR   string = &quot;html/&quot;
      PARENT_PACKAGE string = &quot;template&quot;
 )
</code></pre>
<p>If we wanted to rename the directories, we would need to just update this file.</p>
<p>With those above changes we now changed our <code>home</code> and <code>about</code> functions to the following;</p>
<pre><code>func Home(c web.C, w http.ResponseWriter, r *http.Request) {
     ctx := template.NewContext()
     ctx.Add(&quot;HomePage&quot;, true)
     template.Render(c, w, r, append(templates, &quot;home.html&quot;), ctx)
}


func About(c web.C, w http.ResponseWriter, r *http.Request) {
     ctx := template.NewContext()
     ctx.Add(&quot;AboutPage&quot;, true)
     template.Render(c, w, r, append(templates, &quot;about.html&quot;), ctx)
}
</code></pre>
<p>Lastly we also make use of <a href="https://goji.io/">goji</a> to handle routing and middleware extensibility for us. This requires a small changes to our <code>main</code> function in the <code>server.go</code> file. We simple swap out most of the <code>http.HandleFunc</code> calls with <code>goji.Get</code> and use <code>goji.Serve()</code> instead of the <code>http.ListenAndServe(&quot;:8000&quot;, nil)</code> So the <code>main</code> function looks like;</p>
<pre><code>func main() {
    http.HandleFunc(template.STATIC_URL, template.StaticHandler)
    goji.Get(&quot;/&quot;, Home)
    goji.Get(&quot;/about&quot;, About)
    goji.NotFound(NotFound)


    goji.Serve()
}
</code></pre>
<p>As you may have noticed we also added a <code>NotFound</code> to catch any addresses that we cannot resolve.</p>
<pre><code>func NotFound(c web.C, w http.ResponseWriter, r *http.Request) {
    template.Render(c, w, r, append(templates, &quot;404.html&quot;),
        template.NewContext())
}
</code></pre>
<p>And now we have a separate module that handles the template rendering and serving of static files for us.</p>
]]></content>
		</item>
		
		<item>
			<title>Golang - Web - Guide</title>
			<link>https://reinbach.com/posts/golang-web-guide/</link>
			<pubDate>Fri, 03 Apr 2015 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/golang-web-guide/</guid>
			<description>&lt;p&gt;A multi-part article about developing a website with Golang, with each article about a specific piece of functionality that is common for a complete website.&lt;/p&gt;
&lt;p&gt;Previously I have done a large amount of development with the &lt;a href=&#34;https://www.djangoproject.com/&#34;&gt;Django&lt;/a&gt; framework. I like it because it has everything and it allows one to develop a website quickly, and so there will be a lot of influence from that in these articles.&lt;/p&gt;
&lt;p&gt;The reason I made use of Golang is because I wanted to see how simple it would be to implement a lot of this functionality with mainly the Golang standard packages.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A multi-part article about developing a website with Golang, with each article about a specific piece of functionality that is common for a complete website.</p>
<p>Previously I have done a large amount of development with the <a href="https://www.djangoproject.com/">Django</a> framework. I like it because it has everything and it allows one to develop a website quickly, and so there will be a lot of influence from that in these articles.</p>
<p>The reason I made use of Golang is because I wanted to see how simple it would be to implement a lot of this functionality with mainly the Golang standard packages.</p>
<p>So following articles are available;</p>
<ul>
<li><a href="/golang-web-templating.html">Templating</a></li>
<li>Testing</li>
<li>Multiple Apps</li>
<li>Config</li>
<li>Form</li>
<li>Database</li>
<li>Logging</li>
<li>Session</li>
<li>Auth</li>
<li>Cli</li>
</ul>
<p>Each article attempts to cover a particular piece of functionality needed in a website.
Source code is available on github at <a href="https://github.com/reinbach/golang-webapp-guide">golang-webapp-guide</a></p>
<p>A while back I wrote about implementing <a href="/golang-webapps-1.html">basic site</a> functionality, this will expand on that a lot more.</p>
]]></content>
		</item>
		
		<item>
			<title>Django - Passing Extra Params To Formsets</title>
			<link>https://reinbach.com/posts/django-formsets-with-extra-params/</link>
			<pubDate>Wed, 28 Jan 2015 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/django-formsets-with-extra-params/</guid>
			<description>&lt;p&gt;The scenario is that we want to use formsets on a model, but the model has a foreign key, and we only want a subset of the elements referenced by the foreign key.&lt;/p&gt;
&lt;p&gt;i.e. We don&amp;rsquo;t want all of the options returned by the foreign key to be shown.&lt;/p&gt;
&lt;p&gt;I really like the Django class based views and use them as much as possible. I find that they make my life a lot easier. So when I needed to make use of some formsets in a particular view, but need the formsets to only display a subset of the elements referenced by the foreign key in the model, and tackled it in the following manner;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>The scenario is that we want to use formsets on a model, but the model has a foreign key, and we only want a subset of the elements referenced by the foreign key.</p>
<p>i.e. We don&rsquo;t want all of the options returned by the foreign key to be shown.</p>
<p>I really like the Django class based views and use them as much as possible. I find that they make my life a lot easier. So when I needed to make use of some formsets in a particular view, but need the formsets to only display a subset of the elements referenced by the foreign key in the model, and tackled it in the following manner;</p>
<p>Here is our sample model, in this example when creating a transaction I only want to show those Accounts, referenced by account_debit / account_debit that are applicable / associated to the user making the request;</p>
<pre><code>#!python
class Transaction(models.Model):
    account_debit = models.ForeignKey(Account, related_name=&quot;debit&quot;,
                                      verbose_name=&quot;debit&quot;)
    account_credit = models.ForeignKey(Account, related_name=&quot;credit&quot;,
                                       verbose_name=&quot;credit&quot;)
    amount = models.DecimalField(decimal_places=2, max_digits=8)
    summary = models.CharField(max_length=50)
    description = models.CharField(max_length=250, blank=True)
    date = models.DateField()
</code></pre>
<p>We create our normal model form, and the work happens in the <code>TransactionBaseFormSet</code>, we override <code>BaseFormSet</code> and in the <code>_construct</code> method we implement the logic that determines the account_debit/account_credit choices;</p>
<pre><code>#!python
class TransactionForm(forms.ModelForm):
    class Meta:
        model = Transaction
        exclude = [&quot;description&quot;]




class TransactionBaseFormSet(BaseFormSet):
    def __init__(self, *args, **kwargs):
        self.user = kwargs.pop(&quot;user&quot;)
        super(TransactionBaseFormSet, self).__init__(*args, **kwargs)


    def _construct_form(self, i, **kwargs):
        form = super(TransactionBaseFormSet, self)._construct_form(i, **kwargs)
        account_choices = get_account_choices(self.user)
        form.fields[&quot;account_debit&quot;].choices = account_choices
        form.fields[&quot;account_credit&quot;].choices = account_choices
        form.fields[&quot;DELETE&quot;].label = &quot;Duplicate&quot;
        return form




TransactionFormSet = formset_factory(TransactionForm, can_delete=True, extra=0,
                                     formset=TransactionBaseFormSet)
</code></pre>
<p>And to get the user object into the formset we create a class based view normally and in the get_form_kwargs method we pass in the relevant user object we need/want;</p>
<pre><code>#!python
class TransactionImportConfirmView(FormView):
    template_name = &quot;import.html&quot;
    form_class = TransactionFormSet
    success_url = reverse_lazy(&quot;accounts.transaction.list&quot;)


    def get_form_kwargs(self):
        kwargs = super(TransactionImportConfirmView, self).get_form_kwargs()
        kwargs[&quot;user&quot;] = self.request.user
        return kwargs
</code></pre>
<p>And there we have it, we just had to really override the <code>BaseFormSet</code> and weave what magic we wanted in the <code>_construct</code> method and ensure we pass in any parameters we needed with the logic as we&rsquo;re all set.</p>
]]></content>
		</item>
		
		<item>
			<title>Django - Recursive Templates</title>
			<link>https://reinbach.com/posts/django-recursive-templates/</link>
			<pubDate>Tue, 23 Dec 2014 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/django-recursive-templates/</guid>
			<description>&lt;p&gt;The scenario I had was that of a table showing a list of accounts and these accounts had subaccounts. I wanted a simple way to display these subaccounts, but indented slightly relative to their parent. And I did not know the number of levels involved.&lt;/p&gt;
&lt;p&gt;The following is the way I went about solving this in this instance was to call django templates recursively.&lt;/p&gt;
&lt;p&gt;Create a templatetag to handle the display of displaying indentation character the correct number of times;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>The scenario I had was that of a table showing a list of accounts and these accounts had subaccounts. I wanted a simple way to display these subaccounts, but indented slightly relative to their parent. And I did not know the number of levels involved.</p>
<p>The following is the way I went about solving this in this instance was to call django templates recursively.</p>
<p>Create a templatetag to handle the display of displaying indentation character the correct number of times;</p>
<pre><code>#!python
from django import template
from django.template.defaultfilters import stringfilter


register = template.Library()




@register.filter
@stringfilter
def repeat(value, arg):
    return value * int(arg)
</code></pre>
<p>Then in the templates, we have the initial code that calls the rows template;</p>
<pre><code>#!html
&lt;tbody&gt;
  {% for account in object_list %}
    {% with depth=0 %}
      {% include &quot;row.html&quot; %}
    {% endwith %}
  {% endfor %}
&lt;/tbody&gt;
</code></pre>
<p>and the row template calls itself when applicable;</p>
<pre><code>#!html
&lt;tr&gt;
  &lt;td&gt;
    {{ &quot;-&quot;|repeat:depth }}
    {{ account.name }}
  &lt;/td&gt;
&lt;/tr&gt;


{% if account.is_category %}
  {% with depth=depth|add:&quot;1&quot; %}
    {% for account in account.subaccounts %}
      {% include &quot;row.html&quot; %}
    {% endfor %}
  {% endwith %}
{% endif %}
</code></pre>
<p>####Caveats</p>
<ul>
<li>Not a ridiculous number of accounts, less than 100</li>
<li>Do not expect a large number of levels, maybe 3 or 4 at most</li>
</ul>
<p>I have not measured to see how crazy this may be in processing/resources as yet, but from everyday usage so far it has not been an issue. So if not experiencing any performance issues, I&rsquo;m not going to waste time trying to find out if there are any.</p>
]]></content>
		</item>
		
		<item>
			<title>Golang Web Apps</title>
			<link>https://reinbach.com/posts/golang-webapps-1/</link>
			<pubDate>Sat, 05 Apr 2014 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/golang-webapps-1/</guid>
			<description>&lt;p&gt;This is a short simple guide about using golang for web application development.&lt;/p&gt;
&lt;p&gt;The idea is that we start with the straight golang net/http package and slowly develop a more complex web application each time as our needs grow. Adding a component, or functionality to the system to solve the identified need.&lt;/p&gt;
&lt;p&gt;All code can be found at &lt;a href=&#34;https://github.com/reinbach/golang-webapp-guide&#34;&gt;https://github.com/reinbach/golang-webapp-guide&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;basics&#34;&gt;Basics&lt;/h2&gt;
&lt;p&gt;Firstly we start with the absolute basics. Which is to handle a request and return a response.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This is a short simple guide about using golang for web application development.</p>
<p>The idea is that we start with the straight golang net/http package and slowly develop a more complex web application each time as our needs grow. Adding a component, or functionality to the system to solve the identified need.</p>
<p>All code can be found at <a href="https://github.com/reinbach/golang-webapp-guide">https://github.com/reinbach/golang-webapp-guide</a></p>
<h2 id="basics">Basics</h2>
<p>Firstly we start with the absolute basics. Which is to handle a request and return a response.</p>
<pre><code>#!golang
package main


import (
    &quot;io&quot;
    &quot;log&quot;
    &quot;net/http&quot;
)


func Home(w http.ResponseWriter, req *http.Request) {
    io.WriteString(w, &quot;Hello World!&quot;)
}


func main() {
    http.HandleFunc(&quot;/&quot;, Home)
    err := http.ListenAndServe(&quot;:8000&quot;, nil)
    if err != nil {
    	log.Fatal(&quot;ListenAndServe: &quot;, err)
    }
}
</code></pre>
<p>Save the above to a file (eg: <code>server.go</code>) and then you can run it with the following;</p>
<pre><code>go run server.go
</code></pre>
<p>And pointing our browser at <code>http://localhost:8000</code> you will get the following response;</p>
<pre><code>Hello World!
</code></pre>
<p>Awesome, we have a web application! Sadly it only returns string responses, and we want more. We want to return HTML, so it looks like a proper website.</p>
<h2 id="html">HTML</h2>
<p>To convert to HTML responses we replace the &ldquo;io&rdquo; package with the &ldquo;html/template&rdquo; package. We also want more than 1 page in our website. So we create a function to render the HTML templates, to keep things a little DRY, update the <code>Home</code> function, and add an <code>About</code> page. Now our <code>server.go</code> file looks like the following.</p>
<pre><code>#!golang
package main


import (
    &quot;fmt&quot;
    &quot;html/template&quot;
    &quot;log&quot;
    &quot;net/http&quot;
)


func Home(w http.ResponseWriter, req *http.Request) {
    render(w, &quot;index.html&quot;)
}


func About(w http.ResponseWriter, req *http.Request) {
    render(w, &quot;about.html&quot;)
}


func render(w http.ResponseWriter, tmpl string) {
    tmpl = fmt.Sprintf(&quot;templates/%s&quot;, tmpl)
    t, err := template.ParseFiles(tmpl)
    if err != nil {
    	log.Print(&quot;template parsing error: &quot;, err)
    }
    err = t.Execute(w, &quot;&quot;)
    if err != nil {
    	log.Print(&quot;template executing error: &quot;, err)
    }
}


func main() {
    http.HandleFunc(&quot;/&quot;, Home)
    http.HandleFunc(&quot;/about/&quot;, About)
    err := http.ListenAndServe(&quot;:8000&quot;, nil)
    if err != nil {
    	log.Fatal(&quot;ListenAndServe: &quot;, err)
    }
}
</code></pre>
<p>Don&rsquo;t forget we need to add the <code>index.html</code> and <code>about.html</code> file. In the same directory as the <code>server.go</code> file create a <code>templates</code> directory and in that directory place the <code>index.html</code> and <code>about.html</code> files. So we have the following file layout.</p>
<pre><code>.
├── server.go
└── templates
    ├── about.html
    └── index.html
</code></pre>
<p>So we have HTML pages, but they are lacking. We need to add some CSS to give our website some pop. Let&rsquo;s make use of <a href="http://getbootstrap.com/">Bootstrap</a>, it&rsquo;s a fantastic base to build a website on. At the same time let&rsquo;s make our templates a little DRYier by using a <code>base.html</code> file and the individual pages having just the content applicable to them.</p>
<h2 id="static">STATIC</h2>
<p>To serve our static content we can make use of <code>http.ServeContent</code> to do all the work for us. The nice thing about this, is that it handles the setting of the Content-Type for us. <a href="http://golang.org/pkg/net/http/#ServeContent">See the docs for more information</a>.</p>
<pre><code>#!golang
func StaticHandler(w http.ResponseWriter, req *http.Request) {
    static_file := req.URL.Path[len(STATIC_URL):]
    if len(static_file) != 0 {
    	f, err := http.Dir(STATIC_ROOT).Open(static_file)
    	if err == nil {
    		content := io.ReadSeeker(f)
    		http.ServeContent(w, req, static_file, time.Now(), content)
    		return
    	}
    }
    http.NotFound(w, req)
}
</code></pre>
<p>We also now have a <code>base.html</code> which is used in each response, so we tweak the render function to parse the <code>base.html</code> and pass in the <code>Context</code> to the template.</p>
<pre><code>#!golang
func render(w http.ResponseWriter, tmpl string, context Context) {
    context.Static = STATIC_URL
    tmpl_list := []string{&quot;templates/base.html&quot;,
    	fmt.Sprintf(&quot;templates/%s.html&quot;, tmpl)}
    t, err := template.ParseFiles(tmpl_list...)
    if err != nil {
    	log.Print(&quot;template parsing error: &quot;, err)
    }
    err = t.Execute(w, context)
    if err != nil {
    	log.Print(&quot;template executing error: &quot;, err)
    }
}
</code></pre>
<p>With those changes we now have the following for our <code>server.go</code> file;</p>
<pre><code>#!golang
package main


import (
    &quot;fmt&quot;
    &quot;html/template&quot;
    &quot;io&quot;
    &quot;log&quot;
    &quot;net/http&quot;
    &quot;time&quot;
)


const STATIC_URL string = &quot;/static/&quot;
const STATIC_ROOT string = &quot;static/&quot;


type Context struct {
    Title  string
    Static string
}


func Home(w http.ResponseWriter, req *http.Request) {
    context := Context{Title: &quot;Welcome!&quot;}
    render(w, &quot;index&quot;, context)
}


func About(w http.ResponseWriter, req *http.Request) {
    context := Context{Title: &quot;About&quot;}
    render(w, &quot;about&quot;, context)
}


func render(w http.ResponseWriter, tmpl string, context Context) {
    context.Static = STATIC_URL
    tmpl_list := []string{&quot;templates/base.html&quot;,
    	fmt.Sprintf(&quot;templates/%s.html&quot;, tmpl)}
    t, err := template.ParseFiles(tmpl_list...)
    if err != nil {
    	log.Print(&quot;template parsing error: &quot;, err)
    }
    err = t.Execute(w, context)
    if err != nil {
    	log.Print(&quot;template executing error: &quot;, err)
    }
}


func StaticHandler(w http.ResponseWriter, req *http.Request) {
    static_file := req.URL.Path[len(STATIC_URL):]
    if len(static_file) != 0 {
    	f, err := http.Dir(STATIC_ROOT).Open(static_file)
    	if err == nil {
    		content := io.ReadSeeker(f)
    		http.ServeContent(w, req, static_file, time.Now(), content)
    		return
    	}
    }
    http.NotFound(w, req)
}


func main() {
    http.HandleFunc(&quot;/&quot;, Home)
    http.HandleFunc(&quot;/about/&quot;, About)
    http.HandleFunc(STATIC_URL, StaticHandler)
    err := http.ListenAndServe(&quot;:8000&quot;, nil)
    if err != nil {
    	log.Fatal(&quot;ListenAndServe: &quot;, err)
    }
}
</code></pre>
<p>And our <code>index.html</code> file looks like;</p>
<pre><code>{{ define &quot;content&quot; }}
  &lt;div class=&quot;page-header&quot;&gt;
    &lt;h1&gt;{{ .Title }}&lt;/h1&gt;
  &lt;/div&gt;
  &lt;p&gt;We have a HTML web page, woot!&lt;/p&gt;
{{ end }}
</code></pre>
<p>The <code>about.html</code> will look very similar, but with content changed.</p>
<p>And our <code>base.html</code> file looks like;</p>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
    &lt;title&gt;Golang WebApp&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;{{ .Static }}css/bootstrap.min.css&quot; type=&quot;text/css&quot;&gt;
    &lt;link rel=&quot;shortcut icon&quot; href=&quot;{{ .Static }}img/favicon.ico&quot;&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;nav class=&quot;navbar navbar-default&quot; role=&quot;navigation&quot;&gt;
      &lt;div class=&quot;container&quot;&gt;
        &lt;div class=&quot;navbar-header&quot;&gt;
          &lt;a class=&quot;navbar-brand&quot; href=&quot;/&quot;&gt;Golang WebApp&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class=&quot;collapse navbar-collapse&quot;&gt;
          &lt;ul class=&quot;nav navbar-nav&quot;&gt;
            &lt;li&gt;&lt;a href=&quot;/about/&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/nav&gt;
    &lt;div class=&quot;container&quot;&gt;
      {{ template &quot;content&quot; . }}
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>We have set our static path as a constant in the <code>server.go</code> and are passing it to the <code>base.html</code> template via the context. This allows us to change the path/location of the static content in one location. Don&rsquo;t forget to download <a href="http://getbootstrap.com/">Bootstrap</a> and place the files in the <code>static/</code> directory. Which should result in the following file layout;</p>
<pre><code>.
├── server.go
├── static
│   ├── css
│   │   ├── bootstrap.min.css
│   │   └── ...
│   ├── fonts
│   │   └── ...
│   ├── img
│   │   └── favicon.ico
│   └── js
│       └── ...
└── templates
    ├── about.html
    ├── base.html
    └── index.html
</code></pre>
<p>Nice, now we have the basis for a decent website that can be styled to our heart&rsquo;s content. At this point we have the basis for a static website.</p>
]]></content>
		</item>
		
		<item>
			<title>Git Reflog</title>
			<link>https://reinbach.com/posts/reflog/</link>
			<pubDate>Sat, 15 Mar 2014 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/reflog/</guid>
			<description>&lt;p&gt;Git reflog just saved my bacon.&lt;/p&gt;
&lt;p&gt;Last week my commit message referenced the wrong ticket and in attempting to fix the commit message I accidentally reset our develop branch of the project to the master branch. In short, I wiped out all our changes in the project! A few months of work gone, poof!
Well, Git is a distributed repo system so everyone still had the original correct repo, but to top things off I had also pushed these changes to our our central repo server. Awesome!&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Git reflog just saved my bacon.</p>
<p>Last week my commit message referenced the wrong ticket and in attempting to fix the commit message I accidentally reset our develop branch of the project to the master branch. In short, I wiped out all our changes in the project! A few months of work gone, poof!
Well, Git is a distributed repo system so everyone still had the original correct repo, but to top things off I had also pushed these changes to our our central repo server. Awesome!</p>
<p>Anyway a quick chat with a team mate, who informed me about <a href="http://git-scm.com/docs/git-reflog">reflog in git</a>, I was back to the races. A couple of deletes using reflog I was back to normal and breathing easy again.</p>
<pre><code>git reflog delete master@{X}
</code></pre>
<p>With <code>X</code> being the reference number of the entry to remove.</p>
<p>So while <code>git log</code> will show you the current logs for the branch, <code>git reflog</code> records the updates on the branch tips.</p>
<p>So if you appear to have reset your branch to the beginning of time and you need to get back to the present. <code>git reflog</code> may be the tool for you to do that.</p>
]]></content>
		</item>
		
		<item>
			<title>Block SSH Attacks</title>
			<link>https://reinbach.com/posts/iptables/</link>
			<pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/iptables/</guid>
			<description>&lt;p&gt;Periodically one of my servers gets hit by SSH brute force attacks, and I finally got tired of manually dealing with it.&lt;/p&gt;
&lt;p&gt;Previously I would go through the following flow;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get a notification that my server load was increasing&lt;/li&gt;
&lt;li&gt;Log into the sever&lt;/li&gt;
&lt;li&gt;Check/confirm that it was the usual issue, by looking at the logs&lt;/li&gt;
&lt;li&gt;Check where the offending IP address is originating from.&lt;/li&gt;
&lt;li&gt;Add an iptables rule to block the offending IP address &lt;code&gt;iptables -I INPUT -s &amp;lt;OFFENDING_IP&amp;gt; -j DROP&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Watch as the load returned to normal&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So after a little research, with the goal of not wanting anything fancy or crazy to install and/or setup. I decided to go with a few more iptable rules to try and mitigate the issue, as per &lt;a href=&#34;http://la-samhna.de/library/brutessh.html#3&#34;&gt;Rainer Wichmann&lt;/a&gt;. It is an old posting, but looks exactly like the kind of rules I&amp;rsquo;m looking for;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Periodically one of my servers gets hit by SSH brute force attacks, and I finally got tired of manually dealing with it.</p>
<p>Previously I would go through the following flow;</p>
<ul>
<li>Get a notification that my server load was increasing</li>
<li>Log into the sever</li>
<li>Check/confirm that it was the usual issue, by looking at the logs</li>
<li>Check where the offending IP address is originating from.</li>
<li>Add an iptables rule to block the offending IP address <code>iptables -I INPUT -s &lt;OFFENDING_IP&gt; -j DROP</code></li>
<li>Watch as the load returned to normal</li>
</ul>
<p>So after a little research, with the goal of not wanting anything fancy or crazy to install and/or setup. I decided to go with a few more iptable rules to try and mitigate the issue, as per <a href="http://la-samhna.de/library/brutessh.html#3">Rainer Wichmann</a>. It is an old posting, but looks exactly like the kind of rules I&rsquo;m looking for;</p>
<pre><code>iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set \
--name SSH -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 60 --hitcount 4 \
--rttl --name SSH -j LOG --log-prefix &quot;SSH_brute_force &quot;
iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 60 --hitcount 4 \
--rttl --name SSH -j DROP
</code></pre>
<p>There is also a whitelisting option, but seeing that I have a dynamic IP address, I didn&rsquo;t see that as being exactly helpful.</p>
]]></content>
		</item>
		
		<item>
			<title>Hangman</title>
			<link>https://reinbach.com/posts/hangman/</link>
			<pubDate>Wed, 01 Jan 2014 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/hangman/</guid>
			<description>&lt;p&gt;Onto the next stage of game development, developing a Hangman game.&lt;/p&gt;
&lt;p&gt;Actually Hangman can be developed instead of a text adventure game if text adventure games are not your thing. As with a text adventure game, Hangman is very much straight programming, and nothing fancy.&lt;/p&gt;
&lt;p&gt;The one interesting thing I did in my version of the Hangman game was to make use of the algorithm R(3.4.2) (Waterman&amp;rsquo;s &amp;ldquo;Reservoir Algorithm&amp;rdquo;) from Knuth&amp;rsquo;s &amp;ldquo;The Art of Computer Programming&amp;rdquo; (simplified version). I used it to generate my random word.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Onto the next stage of game development, developing a Hangman game.</p>
<p>Actually Hangman can be developed instead of a text adventure game if text adventure games are not your thing. As with a text adventure game, Hangman is very much straight programming, and nothing fancy.</p>
<p>The one interesting thing I did in my version of the Hangman game was to make use of the algorithm R(3.4.2) (Waterman&rsquo;s &ldquo;Reservoir Algorithm&rdquo;) from Knuth&rsquo;s &ldquo;The Art of Computer Programming&rdquo; (simplified version). I used it to generate my random word.</p>
<pre><code>#!python
def get_random_word():
    # using algorithm R(3.4.2) (Waterman's &quot;Reservoir Algorithm&quot;)
    # from Knuth's &quot;The Art of Computer Programming&quot; (simplified version)
    #
    # get random word from word file
    # - ignore words that are less than 3 chars
    with open(WORD_FILE, &quot;r&quot;) as fp:
        line = next(fp)
        for num, aline in enumerate(fp):
            if len(aline) &lt;= 2 or random.randrange(num + 2):
                continue
            line = aline
        return line.strip()
</code></pre>
<p>Source: <a href="http://stackoverflow.com/questions/3540288/how-do-i-read-a-random-line-from-one-file-in-python">StackOverflow</a></p>
<p>I grabbed a list of words from <a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/share/dict/web2?rev=1.12;content-type=text%2Fplain">FreeBSD</a>. This list of words is a text file with a word per line. So to select a random word I need to select a random line. With that in mind I used the above algorithm to randomly select a line from the word file, thus giving me my random word.</p>
<p>The rest of the program is pretty straight forward.</p>
<p>Source is at <a href="https://github.com/reinbach/hangman">https://github.com/reinbach/hangman</a></p>
<p>Onto the next step&hellip;</p>
]]></content>
		</item>
		
		<item>
			<title>Text Adventure</title>
			<link>https://reinbach.com/posts/text-adventure/</link>
			<pubDate>Tue, 31 Dec 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/text-adventure/</guid>
			<description>&lt;p&gt;Still working on learning game development and the first step is to create a text adventure game, so says all the articles on learning game development.&lt;/p&gt;
&lt;p&gt;So that is something I have done. The storyline is pretty much non-existant, but the programming part of it is there. I think, anyway. I actually enjoyed creating this more than I thought I would.&lt;/p&gt;
&lt;p&gt;The nice part about it is that the framework is there. The storyling and flow of the adventure is added to the mapping.py and text.py files. So it is simple enough to develop the storyline into something reasonable. Definitely need to work on my storylines.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Still working on learning game development and the first step is to create a text adventure game, so says all the articles on learning game development.</p>
<p>So that is something I have done. The storyline is pretty much non-existant, but the programming part of it is there. I think, anyway. I actually enjoyed creating this more than I thought I would.</p>
<p>The nice part about it is that the framework is there. The storyling and flow of the adventure is added to the mapping.py and text.py files. So it is simple enough to develop the storyline into something reasonable. Definitely need to work on my storylines.</p>
<p>Source is at <a href="https://github.com/reinbach/text-adventure">https://github.com/reinbach/text-adventure</a></p>
<p>Onto the next step&hellip;</p>
]]></content>
		</item>
		
		<item>
			<title>Sockjs Examples</title>
			<link>https://reinbach.com/posts/sockjs-example/</link>
			<pubDate>Mon, 30 Dec 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/sockjs-example/</guid>
			<description>&lt;p&gt;Came across &lt;a href=&#34;https://github.com/igm/sockjs-go/sockjs&#34;&gt;sockjs for go&lt;/a&gt; and seeing that I had created some code examples using socket.io and python, I decided to do the same using golang of sockjs, as an excuse to play with it.&lt;/p&gt;
&lt;p&gt;So far the examples are pretty simple.&lt;/p&gt;
&lt;p&gt;But I got to play with tickers and goroutines in go, so that was nice. I actually used the net/http package for handling the requests and did a little template parsing. It is really nice to be able to use base packages to achieve all this. It makes go really nice to play with.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Came across <a href="https://github.com/igm/sockjs-go/sockjs">sockjs for go</a> and seeing that I had created some code examples using socket.io and python, I decided to do the same using golang of sockjs, as an excuse to play with it.</p>
<p>So far the examples are pretty simple.</p>
<p>But I got to play with tickers and goroutines in go, so that was nice. I actually used the net/http package for handling the requests and did a little template parsing. It is really nice to be able to use base packages to achieve all this. It makes go really nice to play with.</p>
<p>The examples can be found at <a href="https://github.com/reinbach/sockjs-go-example">https://github.com/reinbach/sockjs-go-example</a></p>
]]></content>
		</item>
		
		<item>
			<title>Html/Templates Parsing Multiple Files</title>
			<link>https://reinbach.com/posts/html-templates-parsing-multiple-files/</link>
			<pubDate>Fri, 27 Dec 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/html-templates-parsing-multiple-files/</guid>
			<description>&lt;p&gt;Working with Django templating engine or Jinja2 you have the ability to inherit/extend templates. which I find very helpful in keeping things DRY. Now working on a golang app I wanted something similar and this is how I ended up doing it using the base packages.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m sticking with the base packages for my first few apps, so I can actually learn them. When starting out with Python, I used Django mainly and I feel that was not the correct thing to do, as Django black boxed a lot of functionality and it took a while to get a deeper understanding.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Working with Django templating engine or Jinja2 you have the ability to inherit/extend templates. which I find very helpful in keeping things DRY. Now working on a golang app I wanted something similar and this is how I ended up doing it using the base packages.</p>
<p>I&rsquo;m sticking with the base packages for my first few apps, so I can actually learn them. When starting out with Python, I used Django mainly and I feel that was not the correct thing to do, as Django black boxed a lot of functionality and it took a while to get a deeper understanding.</p>
<p>Anyway back to golang and templating. Here I&rsquo;m making use of the <a href="http://golang.org/pkg/html/template/">html/template</a> package.</p>
<p>Create the <code>base</code> file;</p>
<pre><code>#!html
&lt;html&gt;
  &lt;body&gt;
    &lt;h1&gt;{{ template &quot;title&quot; }}&lt;/h1&gt;


    {{ template &quot;content&quot; }}
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>So here we are expecting a couple of overrides, <code>title</code> and <code>content</code> which the templates that extend this <code>base</code> file need to provide. A sample file extending this <code>base</code>;</p>
<pre><code>#!html
{{ define &quot;title&quot; }}About{{ end }}


{{ define &quot;content&quot; }}
  &lt;p&gt;About us page now&lt;/p&gt;
{{ end }}
</code></pre>
<p>In this file you can see that we define the <code>title</code> and <code>content</code> information, which is used/needed by the <code>base</code> file.</p>
<p>Now we can parse these files with the html/template package and the final result will be the combination of these 2 files.</p>
<pre><code>t, err := template.ParseFiles(&quot;base.html&quot;, &quot;index.html&quot;)
</code></pre>
<p>The order of the files provided in this call is important. You will always want the <code>base.html</code> file to be the first file in the list, otherwise you will end up with a blank result.</p>
<p>A complete sample go file that does this;</p>
<pre><code>#!golang
package main


import (
    &quot;flag&quot;
    &quot;fmt&quot;
    &quot;html/template&quot;
    &quot;os&quot;
)


var (
    file string
)


func init() {
    flag.StringVar(&amp;file, &quot;file&quot;, &quot;index.html&quot;, &quot;template file&quot;)
    flag.Parse()
}


func main() {
    t, err := template.ParseFiles(&quot;base.html&quot;, file)
    if err != nil {
    	fmt.Println(&quot;template parse error: &quot;, err)
    	return
    }
    err = t.Execute(os.Stdout, &quot;&quot;)
    if err != nil {
    	fmt.Println(&quot;template executing error: &quot;, err)
    	return
    }
}
</code></pre>
<p>Make use the html files are in the same dir as the above file, you can then run it and see the results;</p>
<pre><code>$ go run main.go


&lt;html&gt;
  &lt;body&gt;
    &lt;h1&gt;Home&lt;/h1&gt;




  &lt;p&gt;We are at the home page&lt;/p&gt;


  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>Or pass in the file option to use a the <code>about.html</code> file</p>
<pre><code>$ go run main.go -file=about.html


&lt;html&gt;
  &lt;body&gt;
    &lt;h1&gt;About&lt;/h1&gt;




  &lt;p&gt;About us page now&lt;/p&gt;


  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>Take the above with a grain of salt. I&rsquo;m just starting out with golang and this is just the solution I came up with that works well for me at the moment. Also note that html/template is an extension of <a href="http://golang.org/pkg/text/template/">text/template</a>, so this should be applicable there as well, so not just limited to html.</p>
<p>Source files can be found at <a href="https://github.com/reinbach/html-template-example">https://github.com/reinbach/html-template-example</a></p>
]]></content>
		</item>
		
		<item>
			<title>Benchmark Golang, C, And Python</title>
			<link>https://reinbach.com/posts/benchmark/</link>
			<pubDate>Thu, 26 Dec 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/benchmark/</guid>
			<description>&lt;p&gt;I was wondering how performant Golang is, so I decided to put together a little benchmarking example for myself.&lt;/p&gt;
&lt;p&gt;So I started with Python, which is what I know best and created the following simple script;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/usr/bin/env python


def fac(n):
    if n == 0:
        return 1
    return n * fac(n - 1)


if __name__ == &amp;quot;__main__&amp;quot;:
    t = 0
    for j in range(100000):
        for i in range(8):
            t += fac(i)
    print(&amp;quot;total: {0}&amp;quot;.format(t))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The reason for the &lt;code&gt;total&lt;/code&gt; output, was to have a check to ensure that I was getting the same results in each of the scripts. To make sure that they are doing the same amount of work.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I was wondering how performant Golang is, so I decided to put together a little benchmarking example for myself.</p>
<p>So I started with Python, which is what I know best and created the following simple script;</p>
<pre><code>#!/usr/bin/env python


def fac(n):
    if n == 0:
        return 1
    return n * fac(n - 1)


if __name__ == &quot;__main__&quot;:
    t = 0
    for j in range(100000):
        for i in range(8):
            t += fac(i)
    print(&quot;total: {0}&quot;.format(t))
</code></pre>
<p>The reason for the <code>total</code> output, was to have a check to ensure that I was getting the same results in each of the scripts. To make sure that they are doing the same amount of work.</p>
<p>Running the script gives us the following execution time;</p>
<pre><code>$ time ./factorial.py


total: 591400000


real    0m1.055s
user    0m1.053s
sys     0m0.000s
</code></pre>
<p>So I am getting about 1s in total execution time. Not bad.</p>
<p>Now the same code sample in C, to see what the time execution would be;</p>
<pre><code>#!c
#include &lt;stdio.h&gt;


int fac(int);


int fac(int n) {
  if (n == 0) {
    return 1;
  }
  return n * fac(n - 1);
}


main() {
  int i, j;
  int t = 0;


  for (j = 0; j &lt; 100000; j++) {
    for (i = 0; i &lt;= 7; i++) {
      t += fac(i);
    }
  }


  printf(&quot;total: %d\n&quot;, t);
}
</code></pre>
<p>Compile and execute the above snippet of code;</p>
<pre><code>$ gcc factorial.c -o factorial
$ time ./factorial


total: 591400000


real    0m0.029s
user    0m0.027s
sys     0m0.000
</code></pre>
<p>Ok, that&rsquo;s quite an improvement. This is C, so we do expect there to be a great improvement.</p>
<p>Finally we create our code sample in Go;</p>
<pre><code>#!go
package main


import &quot;fmt&quot;


func fact(n int) int {
    if n == 0 {
        return 1
    }
    return n * fact(n-1)
}


func main() {
    t := 0
    for j := 0; j &lt; 100000; j++ {
        for i := range []int{1, 2, 3, 4, 5, 6, 7, 8} {
            t += fact(i)
        }
    }
    fmt.Println(&quot;total: &quot;, t)
}
</code></pre>
<p>Then build and run the code sample and we get the following;</p>
<pre><code>$ go build factorial.go
$ time ./factorial


total:  591400000


real    0m0.026s
user    0m0.020s
sys     0m0.003s
</code></pre>
<p>So, that&rsquo;s pretty much the same as C, which is excellent. The best part of it all, is that it is actually fun to code in Go compared to C. Python was always an attraction for me as the language is a breeze to work with and enjoyable programming with it. Go is also a nice language to work with and it&rsquo;s really fast to boot. So I&rsquo;m very excited about the language.</p>
]]></content>
		</item>
		
		<item>
			<title>Martini</title>
			<link>https://reinbach.com/posts/martini/</link>
			<pubDate>Tue, 24 Dec 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/martini/</guid>
			<description>&lt;p&gt;Still playing with golang and &lt;a href=&#34;http://codebot.io/doc/pkg/github.com/codegangsta/martini&#34;&gt;Martini&lt;/a&gt; is a package that I think I will be doing a lot of work with, seeing that web applications are what I am constantly working on.&lt;/p&gt;
&lt;p&gt;The nice thing about Martini is that it relies heavily on net/http and it a very thin layer to it. Creating a web application is straight forward and simple enough. It will be interesting to work on a larger application with it to get a better feel for it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Still playing with golang and <a href="http://codebot.io/doc/pkg/github.com/codegangsta/martini">Martini</a> is a package that I think I will be doing a lot of work with, seeing that web applications are what I am constantly working on.</p>
<p>The nice thing about Martini is that it relies heavily on net/http and it a very thin layer to it. Creating a web application is straight forward and simple enough. It will be interesting to work on a larger application with it to get a better feel for it.</p>
<p>These tutorials on it were interesting and helpful;</p>
<ul>
<li><a href="http://blog.gopheracademy.com/day-11-martini">Build a Christmas List with Martini</a></li>
<li><a href="http://0value.com/build-a-restful-API-with-Martini">Build a RESTful API with Martini</a></li>
</ul>
]]></content>
		</item>
		
		<item>
			<title>Go Go Go</title>
			<link>https://reinbach.com/posts/go-go-go/</link>
			<pubDate>Mon, 23 Dec 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/go-go-go/</guid>
			<description>&lt;p&gt;Golang has been a fascination for some time, and I have finally jumped in and started learning about the language.&lt;/p&gt;
&lt;p&gt;Started off with the &lt;a href=&#34;http://tour.golang.org&#34;&gt;Tour of Go&lt;/a&gt;, and lately the &lt;a href=&#34;http://blog.gopheracademy.com/go-advent-2013&#34;&gt;Go Advent&lt;/a&gt; has been very helpful. The Go Advent series was really nice as it introduced a wide varied list of applications/uses of go. A number of them that I would not have even looked at or been aware of.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve just finished going through the &lt;a href=&#34;https://gobyexample.com/&#34;&gt;By Example&lt;/a&gt; list, which was great as I find this method is the best way for me to learn. The next step is to work on a personal project and actually put together something using Go.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Golang has been a fascination for some time, and I have finally jumped in and started learning about the language.</p>
<p>Started off with the <a href="http://tour.golang.org">Tour of Go</a>, and lately the <a href="http://blog.gopheracademy.com/go-advent-2013">Go Advent</a> has been very helpful. The Go Advent series was really nice as it introduced a wide varied list of applications/uses of go. A number of them that I would not have even looked at or been aware of.</p>
<p>I&rsquo;ve just finished going through the <a href="https://gobyexample.com/">By Example</a> list, which was great as I find this method is the best way for me to learn. The next step is to work on a personal project and actually put together something using Go.</p>
<p>The question is what exactly should that project be.</p>
]]></content>
		</item>
		
		<item>
			<title>That&#39;S A First</title>
			<link>https://reinbach.com/posts/a-first/</link>
			<pubDate>Mon, 28 Oct 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/a-first/</guid>
			<description>&lt;p&gt;Well that&amp;rsquo;s a first, I was moving my monitoring system to a new server and decided to go back to using Nagios instead
if Icinga and was looking into setting up NRPE on the remote server and did a quick Google on that and lo and behold
the first entry in the Google results was an entry written by me on how to do that :)&lt;/p&gt;
&lt;p&gt;You would think I would remember that I write these things. Anyway, it is fun seeing that there.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well that&rsquo;s a first, I was moving my monitoring system to a new server and decided to go back to using Nagios instead
if Icinga and was looking into setting up NRPE on the remote server and did a quick Google on that and lo and behold
the first entry in the Google results was an entry written by me on how to do that :)</p>
<p>You would think I would remember that I write these things. Anyway, it is fun seeing that there.</p>
<p>Well the fun was short lived, when I realized the link did not work. I had just updated my DNS for the domain and
forgotten to setup the leading &lsquo;www.&rsquo; for the domain&hellip; doh!</p>
]]></content>
		</item>
		
		<item>
			<title>Still Going</title>
			<link>https://reinbach.com/posts/still-going/</link>
			<pubDate>Thu, 24 Oct 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/still-going/</guid>
			<description>&lt;p&gt;So I have been slowly working through the &lt;a href=&#34;https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro&#34;&gt;Noob to Pro&lt;/a&gt; wikibook.
Finally I am starting to understand the UI to Blender! I&amp;rsquo;ve just reached the section on animation.&lt;/p&gt;
&lt;p&gt;Blender is a tool that I have always wanted to learn how to use. I have been aware of Blender since the days when the
community bought it from the company that went bankrupt and open sourced it. That was a number of years ago.
And now I am actually able to do a few little things with it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>So I have been slowly working through the <a href="https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro">Noob to Pro</a> wikibook.
Finally I am starting to understand the UI to Blender! I&rsquo;ve just reached the section on animation.</p>
<p>Blender is a tool that I have always wanted to learn how to use. I have been aware of Blender since the days when the
community bought it from the company that went bankrupt and open sourced it. That was a number of years ago.
And now I am actually able to do a few little things with it.</p>
<p>The only thing with the &lsquo;Noob to Pro&rsquo; wikibook is that a number of the tutorials are for older versions of blender
and I have some trouble converting the steps to the new UI.</p>
<p>I have now just realized the the <a href="http://wiki.blender.org/index.php/Doc:2.6/Manual">User Manual</a> is a lot more up to
date with the latest version of Blender and it appears to be a better starting point in learning Blender.
So now I am working through that, I&rsquo;ve just gotten through the first few chapters/pages.</p>
<p>I have also been lurking in a number of forums on reddit. Mainly;</p>
<ul>
<li><a href="http://www.reddit.com/r/linux_gaming">Linux Gaming</a></li>
<li><a href="http://www.reddit.com/r/gamedev/">Game Dev</a></li>
<li><a href="http://www.reddit.com/r/IndieGaming/">Indie Gaming</a></li>
</ul>
<p>And I am learning quite a bit from the postings there, from resources for programming to what to do to learn to draw.</p>
]]></content>
		</item>
		
		<item>
			<title>Game Dev</title>
			<link>https://reinbach.com/posts/game-dev/</link>
			<pubDate>Mon, 23 Sep 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/game-dev/</guid>
			<description>&lt;p&gt;I&amp;rsquo;ve decided I want to develop a game(s) and this is the start of that process.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been developing websites and web applications for over 10 years and I am looking to do something different.
I still very much enjoy developing web applications and that is still what I do on a fulltime basis.&lt;/p&gt;
&lt;p&gt;Now I want to develop games and do something a little differently, to learn new languages and create something other than web applications. I have always been interested in games, seeing that I play them a lot and my boys are growing up and playing them as well. So this would be something more to interact with them on as well. They can be my beta testers.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I&rsquo;ve decided I want to develop a game(s) and this is the start of that process.</p>
<p>I&rsquo;ve been developing websites and web applications for over 10 years and I am looking to do something different.
I still very much enjoy developing web applications and that is still what I do on a fulltime basis.</p>
<p>Now I want to develop games and do something a little differently, to learn new languages and create something other than web applications. I have always been interested in games, seeing that I play them a lot and my boys are growing up and playing them as well. So this would be something more to interact with them on as well. They can be my beta testers.</p>
<p>So this is going to be my little side project for a while. I expect it will take me probably about 5 years to develop a reasonable game, seeing that I have a lot to learn. The web applications I develop use Python mainly and sure you can develop games using Python with PyGame libs etc, but I want to make use of C/C++ or maybe Go (will need a lot od libs developed) as I want to learn more languages and expect the game I want to develop will need to make use of a faster language.</p>
<p>So it is safe to say that I am really clueless at the moment about game development, so this will be a long journey and that is ok. I&rsquo;ll keep doing it so long as I am enjoying it. I&rsquo;m not wanting to work for any game development company, I want to have a lot of freedom in deciding on what and how I do things. This is a hobby for me and I want it to be fun.</p>
<p>I think my first steps are;</p>
<ul>
<li>to initially go back and really learn C as a good basis.</li>
<li>learn how to use <a href="http://www.blender.org/">Blender</a></li>
</ul>
<p>My expectations are;</p>
<ul>
<li>to have fun</li>
<li>learn new things</li>
<li>this is going to be a long and slow process.</li>
<li>doing something completely different to what I&rsquo;m doing now</li>
<li>maybe sell a game or 2</li>
</ul>
]]></content>
		</item>
		
		<item>
			<title>Git</title>
			<link>https://reinbach.com/posts/git/</link>
			<pubDate>Sat, 01 Jun 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/git/</guid>
			<description>&lt;p&gt;At my new job we use &lt;a href=&#34;http://git-scm.com/&#34;&gt;Git&lt;/a&gt; exclusively, while previously I had been using &lt;a href=&#34;http://mercurial.selenic.com/&#34;&gt;Mecurial&lt;/a&gt;. Even though I&amp;rsquo;d used Git for my projects hosted on Github.com, those are mainly personal projects, which did not require much collaboration with other developers. So the Git add/commit/push commands pretty much sufficed most of the time.&lt;/p&gt;
&lt;p&gt;But after a few weeks of using Git extensively at WFP where we make use of the &lt;a href=&#34;https://github.com/nvie/gitflow&#34;&gt;Git Flow&lt;/a&gt; process, I must say I am really enjoying Git and grasping the branching aspect of things a lot better. I would still not classify myself as a expert of Git by any stretch of the imagination, but I do feel like I have moved past the crawling stage.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>At my new job we use <a href="http://git-scm.com/">Git</a> exclusively, while previously I had been using <a href="http://mercurial.selenic.com/">Mecurial</a>. Even though I&rsquo;d used Git for my projects hosted on Github.com, those are mainly personal projects, which did not require much collaboration with other developers. So the Git add/commit/push commands pretty much sufficed most of the time.</p>
<p>But after a few weeks of using Git extensively at WFP where we make use of the <a href="https://github.com/nvie/gitflow">Git Flow</a> process, I must say I am really enjoying Git and grasping the branching aspect of things a lot better. I would still not classify myself as a expert of Git by any stretch of the imagination, but I do feel like I have moved past the crawling stage.</p>
<p>As I&rsquo;ve mentioned, we make use of Git Flow, so installing that helps things a little. It&rsquo;s not really needed as the Git commands are simple enough, it does help with streamlining/automating a few tasks though.</p>
<p>See <a href="https://github.com/nvie/gitflow/wiki/Installation">Git Flow installation instructions</a> if you want to make use of it.</p>
<h2 id="general">General</h2>
<p>My daily Git routine generally revolves around the following commands;</p>
<pre><code># list of branches
git branch


# work on a particular branch
git checkout &lt;branch&gt;


# see status of changes
git status


# see changes for particular file
git diff &lt;file&gt;


# remove changes made to the file
git checkout &lt;file&gt;


# add a file to the list of files to be commited
git add &lt;file&gt;


# committing changes, -m if I want to add a comment inline with the command
git commit [-m]


# when merging, the Git commit message is pretty decent, so add to it, rather than overwriting it
git merge &lt;branch&gt;


# pull changes from remote to your branch
git pull &lt;remote&gt; &lt;branch&gt;


# push your changes to the remote server
git push &lt;remote&gt; &lt;branch&gt;


# delete remote branch, this command is slightly weird. Note colon, that's needed
git push &lt;remote&gt; :&lt;remote_branch&gt;


# delete a branch locally
# -D if there are changes in the branch you don't care about
git branch -d &lt;branch&gt;
</code></pre>
<p>See <a href="http://git-scm.com/documentation">Git Documentation</a> for more complete information.</p>
<h2 id="stashing">Stashing</h2>
<p>If I need to &ldquo;park&rdquo; my changes so I can do a pull/push or some action that needs the branch(es) to be &lsquo;clean&rsquo;, making use of stash is really helpful.</p>
<pre><code># show the list of currently stashed items
git stash list


# create a stash of the changes in branch
git stash


# apply the stashed item to the current branch
# this applies the stash to the current branch and leaves it in the stash list
# it applies the first stash item if none provided
git stash apply [&lt;stash&gt;]


# if you want to apply the first stash and remove it from the stash list
git stash pop


# to remove a stash item from the stash list
git stash drop [&lt;stash&gt;]


# to see the stash changes in greater detail
git stash show -p [&lt;stash&gt;]
</code></pre>
<p>See <a href="http://git-scm.com/book/en/Git-Tools-Stashing">Git Tools - Stashing</a> for more information on stashing.</p>
<h2 id="branching-with-git-flow">Branching with Git Flow</h2>
<p>Git Flow makes use of the following &ldquo;types&rdquo; of branches. Featrure/Release/Hotfix and each of those are handled in the same manner. So you just need to replace the command with the relevant type of branch you are dealing with.</p>
<pre><code># start a new branch
git flow &lt;branch_type&gt; start &lt;name&gt;


# to merge and remove the branch
git flow &lt;branch_type&gt; finish &lt;name&gt;
</code></pre>
<p>These are the commands I mainly use with Git Flow, there are a bunch of others, but I find the Git commands are simple enough to use. See <a href="https://github.com/nvie/gitflow">Git Flow</a> for more information of the other commands.</p>
<h2 id="undo">Undo</h2>
<p>Oops, need to undo a commit</p>
<pre><code>git reset HEAD~1
</code></pre>
<p>See <a href="http://git-scm.com/docs/git-reset">Git-Reset</a> for detail information on resetting.</p>
]]></content>
		</item>
		
		<item>
			<title>Rackspace Arch Linux Database Server</title>
			<link>https://reinbach.com/posts/rackspace-arch-databaseserver/</link>
			<pubDate>Mon, 27 May 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/rackspace-arch-databaseserver/</guid>
			<description>&lt;p&gt;This is how I setup my database servers on Rackspace. I make use of PostgreSQL.&lt;/p&gt;
&lt;p&gt;My preferred Linux distro is &lt;a href=&#34;https://www.archlinux.org/&#34;&gt;Arch Linux&lt;/a&gt;, so when setting up the server on &lt;a href=&#34;https://www.rackspace.com/&#34;&gt;Rackspace&lt;/a&gt; that is the distro I select and the rest of the instructions are applicable to that distro.&lt;/p&gt;
&lt;p&gt;Once the server has been created and is up and running, I update the system. See &lt;a href=&#34;%7Cfilename%7Crackspace-server-arch.md&#34;&gt;previous article&lt;/a&gt; on the steps I take to do that.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This is how I setup my database servers on Rackspace. I make use of PostgreSQL.</p>
<p>My preferred Linux distro is <a href="https://www.archlinux.org/">Arch Linux</a>, so when setting up the server on <a href="https://www.rackspace.com/">Rackspace</a> that is the distro I select and the rest of the instructions are applicable to that distro.</p>
<p>Once the server has been created and is up and running, I update the system. See <a href="%7Cfilename%7Crackspace-server-arch.md">previous article</a> on the steps I take to do that.</p>
<h2 id="setup-postgresql">Setup PostgreSQL</h2>
<pre><code>pacman -S postgresql (Y)
systemd-tmpfiles --create postgresql.conf
mkdir /var/lib/postgres/data
chown -c -R postgres:postgres /var/lib/postgres
su - postgres
initdb -D '/var/lib/postgres/data'
systemctl start postgresql
systemctl enable postgresql


vi /var/lib/postgres/data/postgresql.conf
# set listen_address variable
set listen_addresses = '*'


# set password for postgres user
passwd postgres
su - postgres
psql -c &quot;alter user postgres with password '&lt;password&gt;'&quot; -d template1


# setup relevant connection parameters that you want to allow to have access
vi /var/lib/postgres/data/pg_hba.conf
# IPv4 local connections:
host   all   all   &lt;your_desired_ip_address&gt;/32   md5
# change the local users not be trusted by require a password
local   all         all    md5


# restart postgres to pick up changes
systemctl restart postgresql
</code></pre>
<h2 id="setup-backup-script">Setup backup script</h2>
<p>I have a simple database backup script that runs daily and makes a backup of each database.</p>
<pre><code># need steps to setup backup scripts
mkdir -p /opt/backup/database
chown -R postgres:postgres /opt/backup/database/


# move backup script into place
mv database_backup.py /etc/cron.daily/
chmod 700 /etc/cron.daily/database_backup.py


# update crontabs to run script daily
# add following to cron
MAILTO=&lt;email_address&gt;
0 3 * * * * root /etc/cron.daily/database_backup.py


# add .pgpass so script can access database
vi ~/.pgpass
*:*:*:postgres:&lt;password&gt;


# set decent permissions for file
chmod 600 ~/.pgpass


# install relevant database libraries so script actually works
pacman -S python-psycopg2
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>Rackspace Arch Linux Webserver</title>
			<link>https://reinbach.com/posts/rackspace-arch-webserver/</link>
			<pubDate>Mon, 27 May 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/rackspace-arch-webserver/</guid>
			<description>&lt;p&gt;This is how I setup my web servers on Rackspace. I make use of nginx and uWSGI where the websites make use of a few different frameworks, mainly Django, Flask, and plain static HTML sites.&lt;/p&gt;
&lt;p&gt;My preferred Linux distro is &lt;a href=&#34;https://www.archlinux.org/&#34;&gt;Arch Linux&lt;/a&gt;, so when setting up the server on &lt;a href=&#34;https://www.rackspace.com/&#34;&gt;Rackspace&lt;/a&gt; that is the distro I select and the rest of the instructions are applicable to that distro.&lt;/p&gt;
&lt;p&gt;Once the server has been created and is up and running, I update the system. See &lt;a href=&#34;%7Cfilename%7Crackspace-server-arch.md&#34;&gt;previous article&lt;/a&gt; on the steps I take to do that.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This is how I setup my web servers on Rackspace. I make use of nginx and uWSGI where the websites make use of a few different frameworks, mainly Django, Flask, and plain static HTML sites.</p>
<p>My preferred Linux distro is <a href="https://www.archlinux.org/">Arch Linux</a>, so when setting up the server on <a href="https://www.rackspace.com/">Rackspace</a> that is the distro I select and the rest of the instructions are applicable to that distro.</p>
<p>Once the server has been created and is up and running, I update the system. See <a href="%7Cfilename%7Crackspace-server-arch.md">previous article</a> on the steps I take to do that.</p>
<h2 id="setup-nginx">Setup nginx</h2>
<pre><code># install nginx
pacman -S nginx


# setup nginx to start when server starts
systemctl enable nginx
systemctl start nginx


# update nginx.conf (/etc/nginx/nginx.conf) file
vi /etc/nginx/nginx.conf


# comment out server settings
# and add the following to the bottom of the file;
include /opt/nginx/conf/sites/*;
</code></pre>
<p>I place the various sites nginx config files in <code>/opt/nginx/conf/sites/</code> so need to create the directory.</p>
<pre><code>mkdir -p /opt/nginx/conf/sites/
</code></pre>
<h2 id="setup-uwsgi">Setup uWSGI</h2>
<pre><code># install uWSGI
cd /opt/
wget https://aur.archlinux.org/packages/uw/uwsgi/uwsgi.tar.gz
tar -zxvf uwsgi.tar.gz
cd /opt/uwsgi
makepkg --asroot
pacman -U uwsgi*.pkg.*
cp emperor.uwsgi.service  /etc/systemd/system/uwsgi.service


# setup uwsgi user and log files
useradd -c 'uwsgi user'  --system --no-create-home uwsgi
mkdir -p /var/log/uwsgi
chown -R uwsgi /var/log/uwsgi


# update emperor.ini file
vi /etc/uwsgi/emperor.ini


# emperor.ini contents
[uwsgi]
uid = &lt;uwsgi_uid&gt; # &lt;- get this from the /etc/passwd file
logto = /var/log/uwsgi/uwsgi.log
emperor = /etc/uwsgi/apps
master = 1


# start up uwsgi
systemctl enable uwsgi
systemctl start uwsgi
</code></pre>
<h2 id="setup-virtualenv">Setup VirtualEnv</h2>
<p>I setup each of the websites in it&rsquo;s own virtual environment.</p>
<pre><code>pacman -S python-virtualenvwrapper


# create/update ~/.bashrc and add relevant virtualenv wrapper details
vi ~/.bashrc


# add virtualenv wrapper details to .bashrc file
export WORKON_HOME=~/env
source /usr/bin/virtualenvwrapper.sh
</code></pre>
<h2 id="various-other-required-libs">Various other required libs</h2>
<p>Install the relevant repo clients you make use of. For me that is Git and Mecurial.</p>
<pre><code>pacman -S git
</code></pre>
<p>Depending on which databases you make use of you may need the relevant database libs. I make use of PostgreSQL for my database needs most of the time and the sites require psycopg2, which in turn needs the postgresql libs.</p>
<pre><code>pacman -S  postgresql-libs
</code></pre>
<p>And that is it, I&rsquo;m now all set to ran my fabric scripts, which setup and/or update the relevant site.</p>
]]></content>
		</item>
		
		<item>
			<title>Nagios Nrpe On Arch Linux</title>
			<link>https://reinbach.com/posts/nagios-nrpe-arch-linux/</link>
			<pubDate>Sun, 26 May 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/nagios-nrpe-arch-linux/</guid>
			<description>&lt;p&gt;Lately I have been setting up a number of servers running Arch Linux and have wanted to monitor them from a central Nagios/Icinga server and these are the steps I take to set these servers up as remote servers that Nagios/Icinga can check via NRPE.&lt;/p&gt;
&lt;p&gt;Thankfully things have gotten a lot simpler overtime and there are decent AUR packages that one can make use of. I&amp;rsquo;ve already converted these servers to be making use of systemd. See &lt;a href=&#34;%7Cfilename%7Crackspace-server-arch.md&#34;&gt;previous article on setting up a base server using systemd&lt;/a&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Lately I have been setting up a number of servers running Arch Linux and have wanted to monitor them from a central Nagios/Icinga server and these are the steps I take to set these servers up as remote servers that Nagios/Icinga can check via NRPE.</p>
<p>Thankfully things have gotten a lot simpler overtime and there are decent AUR packages that one can make use of. I&rsquo;ve already converted these servers to be making use of systemd. See <a href="%7Cfilename%7Crackspace-server-arch.md">previous article on setting up a base server using systemd</a></p>
<p>On the remote servers do the following;</p>
<pre><code># required libs
pacman -S base-devel openssl


# Nagios NRPE
cd /opt/
wget  https://aur.archlinux.org/packages/na/nagios-nrpe/nagios-nrpe.tar.gz
tar -zxvf nagios-nrpe.tar.gz
cd nagios-nrpe
makepkg --asroot
pacman -U nagios-nrpe-*.pkg.tar.xz
systemctl enable nrpe
systemctl start nrpe


# Nagios Plugins
cd /opt/
wget https://aur.archlinux.org/packages/na/nagios-plugins/nagios-plugins.tar.gz
tar -zxvf nagios-plugins.tar.gz
cd nagios-plugins
pacman -S net-snmp
makepkg --asroot
pacman -U nagios-plugins-*.pkg.tar.xz
</code></pre>
<p>Lastly the NRPE config file needs to be tweaked, to allow requests from the Nagios/Icinga central server, update the location of the conf.d file, and to uncomment the commands you want to allow;</p>
<pre><code>vi /etc/nrpe/nrpe.cfg


# set allowed_hosts to nagios server's IP (72.47.237.156)
allowed_hosts=&lt;ip_address_of_nagios_server&gt;


# update include_dir to absolute path for conf.d dir
include_dir=/etc/nrpe/conf.d/


# uncomment the commands you want to allow being called


# restart nrpe daemon to pick up changes
systemctl restart nrpe
</code></pre>
<p>NOTE: With this setup the NRPE is configured to not accept parameters on the requests. So you cannot make use of <code>$ARG1$</code> etc in your commands. This is for security purposes. So you have to hardcode the relevant commands in the NRPE config file, or tweak the config file to allow parameters to be accepted.</p>
<p>You should now be all set to define the relevant services on the Nagios/Icinga server to check the remote server.</p>
]]></content>
		</item>
		
		<item>
			<title>Rackspace Arch Linux Server</title>
			<link>https://reinbach.com/posts/rackspace-arch-server/</link>
			<pubDate>Sun, 26 May 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/rackspace-arch-server/</guid>
			<description>&lt;p&gt;This is how I setup my servers on Rackspace. My preferred Linux distro is &lt;a href=&#34;https://www.archlinux.org/&#34;&gt;Arch Linux&lt;/a&gt;, so when setting up the server on &lt;a href=&#34;https://www.rackspace.com/&#34;&gt;Rackspace&lt;/a&gt; that is the distro I select and the rest of the instructions are applicable to that distro.&lt;/p&gt;
&lt;p&gt;Once the server has been created and is up and running. These are the steps I go through to get the base system in place.&lt;/p&gt;
&lt;h2 id=&#34;update-system&#34;&gt;update system&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;pacman -Syu
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;convert-to-systemd&#34;&gt;convert to systemd&lt;/h2&gt;
&lt;p&gt;Currently Arch Linux still makes use of rc.d for running it&amp;rsquo;s daemons, but is in the process of changing to systemd. So we are going to move to systemd now, which should make things easier in the long run. Make use of the &lt;a href=&#34;https://wiki.archlinux.org/index.php/Systemd&#34;&gt;systemd installation instructions&lt;/a&gt; to do this;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This is how I setup my servers on Rackspace. My preferred Linux distro is <a href="https://www.archlinux.org/">Arch Linux</a>, so when setting up the server on <a href="https://www.rackspace.com/">Rackspace</a> that is the distro I select and the rest of the instructions are applicable to that distro.</p>
<p>Once the server has been created and is up and running. These are the steps I go through to get the base system in place.</p>
<h2 id="update-system">update system</h2>
<pre><code>pacman -Syu
</code></pre>
<h2 id="convert-to-systemd">convert to systemd</h2>
<p>Currently Arch Linux still makes use of rc.d for running it&rsquo;s daemons, but is in the process of changing to systemd. So we are going to move to systemd now, which should make things easier in the long run. Make use of the <a href="https://wiki.archlinux.org/index.php/Systemd">systemd installation instructions</a> to do this;</p>
<pre><code>pacman -S systemd
</code></pre>
<p>Edit your grub boot file and have the system boot into using systemd. Add the following snippet <code>init=/usr/lib/systemd/systemd</code> to the end of the <code>kernel</code> line, so it looks like <code>kernel /boot/vmlinuz-linux root=/dev/xvda1 ro console=hvc0 init=/usr/lib/systemd/systemd</code>. Then reboot the system.</p>
<pre><code>vi /boot/grub/menu.lst
# update kernel line
reboot
</code></pre>
<p>After system has rebooted, you can confirm that systemd is running with the following;</p>
<pre><code>car /proc/1/comm
</code></pre>
<p>Which should return the string <code>systemd</code></p>
<p>Now we want to convert the relevant process to systemd;</p>
<pre><code>systemctl enable sshd
systemctl enable syslog-ng
</code></pre>
<p>The final steps are to set the hostname and to clean up old packages and reset grub boot file;</p>
<pre><code>hostnamectl set-hostname &lt;your_hostname&gt;
pacman -R sysvinit
pacman -S systemd-sysvcompat
vi /boot/grub/menu.lst
# reset kernel line
reboot
</code></pre>
<p>Once this is complete we now have a base system that we can save a server image of and then use this server image to create other servers from. We can now create Webservers or Database servers from this base server.</p>
<p>If you make use of Nagios/Icinga to monitor your servers, you can then <a href="%7Cfilename%7Cnagios-nrpe-arch-linux.md">setup NRPE on the remote servers</a>.</p>
]]></content>
		</item>
		
		<item>
			<title>Nginx &#43; Uwsgi - Emperor</title>
			<link>https://reinbach.com/posts/nginx-uwsgi-emperor/</link>
			<pubDate>Sat, 11 May 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/nginx-uwsgi-emperor/</guid>
			<description>&lt;p&gt;I upgraded my rackspace server to the new generation version and made some slight changes to the nginx and uwsgi setup. The websites now make use of a slightly different nginx and uWSGI configuration setup.&lt;/p&gt;
&lt;p&gt;The main change is with the &lt;a href=&#34;https://projects.unbit.it/uwsgi/&#34;&gt;uWSGI&lt;/a&gt; files and I am making use of the &lt;a href=&#34;http://uwsgi-docs.readthedocs.org/en/latest/Emperor.html&#34;&gt;Emperor&lt;/a&gt; configuration rather. This is the suggested method if one has a number of apps on a single server.&lt;/p&gt;
&lt;p&gt;This change required me tweaking the nginx config file and setting up a uwsgi configuration file for the websites. I modified the main nginx config file by adding &lt;code&gt;include /opt/nginx/conf/sites/*;&lt;/code&gt; to it so each of the websites separate nginx conf files would be read and implemented.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I upgraded my rackspace server to the new generation version and made some slight changes to the nginx and uwsgi setup. The websites now make use of a slightly different nginx and uWSGI configuration setup.</p>
<p>The main change is with the <a href="https://projects.unbit.it/uwsgi/">uWSGI</a> files and I am making use of the <a href="http://uwsgi-docs.readthedocs.org/en/latest/Emperor.html">Emperor</a> configuration rather. This is the suggested method if one has a number of apps on a single server.</p>
<p>This change required me tweaking the nginx config file and setting up a uwsgi configuration file for the websites. I modified the main nginx config file by adding <code>include /opt/nginx/conf/sites/*;</code> to it so each of the websites separate nginx conf files would be read and implemented.</p>
<p>Then for each website the following config files would be setup;</p>
<h2 id="nginx-config">nginx config</h2>
<pre><code>server {
    listen 80;
    server_name *.example.com;
    error_log /var/log/nginx/example-error.log;
    access_log /var/log/nginx/example-access.log;


    location / {
        uwsgi_pass 127.0.0.1:9001;
        include uwsgi_params;
    }
}
</code></pre>
<p>This is a very simple example, the main part is the <code>location</code> section where I pass in the Port number that the uWSGI instance will be running on and the default <code>include uwsgi_params</code>.</p>
<h2 id="uwsgi-config">uwsgi config</h2>
<pre><code>[uwsgi]
chdir = /opt/sites/example/
master = true
threads = 20
socket = 127.0.0.1:9001
callable = app
module = uwsgi_app
logto = /var/log/uwsgi/example.log
virtualenv = /opt/sites/example/
processes = 4
</code></pre>
<p>I make use of the <code>ini</code> config style and each website will have one of these. The <code>socket</code> value needs to match up with the <code>uwsgi_pass</code> value used in the nginx config file.</p>
<p>I make use of virtualenv to manage/handle the website instances and so the <code>virtualenv</code> option is included.</p>
<p><code>module</code> points to the wsgi file in the website and that file will depend on the framework (Django, Flask etc. in my instance) being used for the website.</p>
<p><code>callable</code> value needs to match the param that the wsgi file is using to set the website instance to.</p>
<p>Then depending on the framework used for the web site their would be a wsgi file setup to instantiate the website.</p>
<h2 id="django-wsgi-file-sample">Django wsgi file sample</h2>
<pre><code>import sys
import os


sys.path.append(os.path.abspath(&quot;{0}/{1}&quot;.format(
    os.path.dirname(__file__),
    &quot;example&quot;
)))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'


import django.core.handlers.wsgi


app = django.core.handlers.wsgi.WSGIHandler()
</code></pre>
<p>Note the <code>app</code> param is what needs to match what the <code>callable</code> value is in the uWSGI config file.</p>
<h2 id="flask-wsgi-file-sample">Flask wsgi file sample</h2>
<pre><code>import sys
import os


sys.path.append(os.path.dirname(os.path.abspath(__file__)))


from example import app


if __name__ == '__main__':
    app.run()
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>World Food Programme (Wfp)</title>
			<link>https://reinbach.com/posts/wfp/</link>
			<pubDate>Sat, 11 May 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/wfp/</guid>
			<description>&lt;p&gt;I have resigned from CashStar and I am now contracting with World Food Programme (&lt;a href=&#34;http://www.wfp.org&#34;&gt;wfp.org&lt;/a&gt;). This is my attempt to do good in the world, for my work to have meaning and to be a positive effect on society or the world. All that feel good stuff.&lt;/p&gt;
&lt;p&gt;Granted I am not doing anything specifically that is having a profound effect on the world, or that I am not tackling some huge coding problem personally. But I believe the work I am doing now is a small contribution, and the sum of our parts in the organization is having a great impact on humanity and that makes me feel good.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have resigned from CashStar and I am now contracting with World Food Programme (<a href="http://www.wfp.org">wfp.org</a>). This is my attempt to do good in the world, for my work to have meaning and to be a positive effect on society or the world. All that feel good stuff.</p>
<p>Granted I am not doing anything specifically that is having a profound effect on the world, or that I am not tackling some huge coding problem personally. But I believe the work I am doing now is a small contribution, and the sum of our parts in the organization is having a great impact on humanity and that makes me feel good.</p>
<p>WFP is a large organization and things move slowly compared to what I am used to. I am coming from a startup where things happened quickly. So that is going to be a bit of a transistion and something that I need to keep in mind.</p>
<p>On the opposite side of the coin, I think that WFP will have a much better life / work balance and that counts for a lot in my book.</p>
<p>As with everything there are pros and cons, but this is something that I have been wanting to do for some time now and I am very excited to be actually doing it.</p>
]]></content>
		</item>
		
		<item>
			<title>Pycon Us 2013</title>
			<link>https://reinbach.com/posts/us-pycon-2013/</link>
			<pubDate>Wed, 20 Mar 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/us-pycon-2013/</guid>
			<description>&lt;p&gt;PyCon US 2013 was my first python conference and the experience was very interesting on a number of levels.&lt;/p&gt;
&lt;p&gt;The conference was in Santa Clara, CA this year, which is pretty much the epicenter of the start up world for programmers and software engineers. I had never been to the Santa Clara area before so it was nice to get a limited view of the area. Sadly I did not get to travel around the area much. I went to the conference, stayed at the hotel and headed home right afterwards.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>PyCon US 2013 was my first python conference and the experience was very interesting on a number of levels.</p>
<p>The conference was in Santa Clara, CA this year, which is pretty much the epicenter of the start up world for programmers and software engineers. I had never been to the Santa Clara area before so it was nice to get a limited view of the area. Sadly I did not get to travel around the area much. I went to the conference, stayed at the hotel and headed home right afterwards.</p>
<p>It was impressive seeing the number of people there. There were 2,500 attendees. That does not seem like a large number of people, but seeing them all in one room/area makes you realize that it is a fair number of people.</p>
<p>There were people from all walks of life, a nice cross section. Something like 30 - 40 languages were spoken and ladies made up around 20% of the attendees. The whole event felt very relaxed with a common theme of how to be accepting and inviting to those wanting to learn Python or programming in general.</p>
<p>The talks were many and wide ranging. Thankfully most of them should end up on <a href="http://pyvideo.org/category/33/pycon-us-2013">pyvideo.org</a> for everyone to access them. As soon as I got home I was looking up one of the talks I attended on <a href="https://speakerdeck.com/search?q=pycon+2013">Speaker Deck</a>, trying to get more information about it and to test things out. Some of the talks were packed, so it is a good idea to get to them early. Otherwise you could be standing or peering over someone&rsquo;s shoulder.</p>
<p>There were also a number of scheduled periods for 5 min lightning talks, which doesn&rsquo;t sound like much, but it was impressive. The topics were all over the place, with a lot of humour involved. This is something you want to make sure you get to see.</p>
<p>The question becomes, do you need to go to these conferences. It costs a fair bit and requires a large amount of your time. You can get all the information you need from the Internet, videos and slides of the talks at the conference are uploaded. These you can access from the comfort of your home. So why go? Well, even with all those options, I would say that it is absolutely worth your while in going.</p>
<p>It is very intensive, a lot of knowledge being presented on a wide range of topics. So you are being exposed and challenged on a number of fronts that you would probably not even consider. You get to see/meet people that you normally would never. Being an introvert, networking is something I am terrible at, but you end up having no choice. It&rsquo;s happening whether you like it or not. And it really wasn&rsquo;t so bad, because everyone I met was really friendly and helpful.</p>
<p>The next PyCon US is in Montreal, Canada. That&rsquo;s a lot closer for me, and I will be attending that one, if I have my way.</p>
<p>Lastly, a big shout out to all the volunteers in making PyCon US 2013 happen. Thank you!</p>
]]></content>
		</item>
		
		<item>
			<title>Cpanel And Pci Compliance</title>
			<link>https://reinbach.com/posts/cpanel-pci-compliance/</link>
			<pubDate>Mon, 11 Mar 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/cpanel-pci-compliance/</guid>
			<description>&lt;p&gt;These are the steps I went through to lock down a cPanel instance running on CentOS for PCI Compliance.&lt;/p&gt;
&lt;p&gt;Lately I have been setting up a number of &lt;a href=&#34;https://cpanel.net/&#34;&gt;cPanel&lt;/a&gt; instances for a client and that is a pretty straightforward process. cPanel have decent &lt;a href=&#34;http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/WebHome&#34;&gt;installation instructions&lt;/a&gt; on how to do this and their script pretty much does most of the work.&lt;/p&gt;
&lt;p&gt;One of the cPanel instances required to be PCI compliant and that wasn&amp;rsquo;t as clear compared to the installation instructions. The steps you will need to take to be PCI Compliant will depend on the company running the scan, the website you are scanning and what they identify as issues. In my instance it was SecurityMetrics who ran the scan and I ended up taking the following steps to become PCI Compliant;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>These are the steps I went through to lock down a cPanel instance running on CentOS for PCI Compliance.</p>
<p>Lately I have been setting up a number of <a href="https://cpanel.net/">cPanel</a> instances for a client and that is a pretty straightforward process. cPanel have decent <a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/WebHome">installation instructions</a> on how to do this and their script pretty much does most of the work.</p>
<p>One of the cPanel instances required to be PCI compliant and that wasn&rsquo;t as clear compared to the installation instructions. The steps you will need to take to be PCI Compliant will depend on the company running the scan, the website you are scanning and what they identify as issues. In my instance it was SecurityMetrics who ran the scan and I ended up taking the following steps to become PCI Compliant;</p>
<p><strong>CGI scipts</strong>, especially the guestbook.cgi script was a big no no. The quickest and most effective way to disable these scripts was to make use of an .htaccess file. This only works if you don&rsquo;t want to make use of the guestbook.cgi script.</p>
<pre><code># /usr/local/cpanel/cgi-sys/.htaccess
RewriteEngine On
RewriteRule ^guestbook.cgi$ [G,L]
</code></pre>
<p><strong>Packages with Security Issues</strong>. OpenSSL and BIND versions failed the CPI scan, but a quick check of the CVE values in the changelog of these packages indicated that the relevant issue had been resolved. <!-- raw HTML omitted --> is the CVE value that the PCI scan indicates that is failing. The step works for any package that is marked as having a security hole, if your system is already up to date.</p>
<pre><code>rpm -q --changelog openssl | grep &lt;CVE-string&gt;
rpm -q --changelog bind | grep &lt;CVE-string&gt;
</code></pre>
<p>If the results show in the changelog that the CVE value has been fixed you can then inform the entity doing the PCI scan.</p>
<p><strong>Apache Configuration</strong>. In the cPanel interface under Sevice Configuration &gt; Apache Configuration &gt; Global Configuration. There are PCI Recommendations for some of the settings. Follow these recommendations. Don&rsquo;t forget to rebuild the apache configuration and restart it, otherwise the changes will not take effect.</p>
<p><strong>Firewall</strong>. Finally install <a href="http://www.configserver.com/cp/csf.html">ConfigServer Security &amp; Firewall (CSF)</a>. The installation is pretty straightforward and once that is done, you can config and run tests via the cPanel interface. This resolved most of the issues, once I had installed it and followed most of the suggestions provided when running it&rsquo;s test.</p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="http://serverfault.com/questions/322489/how-do-i-properly-disable-cgi-scripts-e-g-guestbook-cgi-on-whm">CGI Script</a></li>
<li><a href="http://bobcares.com/blog/?p=911">CVE Checks</a></li>
<li><a href="http://www.hosting.com/support/cpanelvps/pci-compliance-in-cpanel">PCI Compliance in cPanel</a></li>
<li><a href="http://www.v-nessa.net/2008/04/14/moving-towards-pci-compliance-with-cpanel">Moving Towards PCI Compliance with cPanel</a></li>
<li><a href="http://www.configserver.com/cp/csf.html">CSF</a></li>
</ul>
]]></content>
		</item>
		
		<item>
			<title>Django Rest Framework</title>
			<link>https://reinbach.com/posts/django-rest-framework/</link>
			<pubDate>Tue, 05 Mar 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/django-rest-framework/</guid>
			<description>&lt;p&gt;A look at &lt;a href=&#34;http://django-rest-framework.org/&#34;&gt;Django REST Framework&lt;/a&gt; for developing nice RESTful Web APIs.&lt;/p&gt;
&lt;p&gt;We are very much a Django shop at the company I work at and have moved to a Service Orientated Architecture (SOA). Well there are some legacy applications that are in the process of being moved into this sort of artchiture. A number of libraries have been used to help with the various APIs developed, these have mainly been &lt;a href=&#34;https://bitbucket.org/jespern/django-piston/wiki/Home&#34;&gt;Piston&lt;/a&gt; and &lt;a href=&#34;&#34;&gt;TastyPie&lt;/a&gt;.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A look at <a href="http://django-rest-framework.org/">Django REST Framework</a> for developing nice RESTful Web APIs.</p>
<p>We are very much a Django shop at the company I work at and have moved to a Service Orientated Architecture (SOA). Well there are some legacy applications that are in the process of being moved into this sort of artchiture. A number of libraries have been used to help with the various APIs developed, these have mainly been <a href="https://bitbucket.org/jespern/django-piston/wiki/Home">Piston</a> and <a href="">TastyPie</a>.</p>
<p>There are great <a href="http://stackoverflow.com/questions/8430579/django-restful-api-django-piston-vs-django-tastypie">discussions and comparisons</a> out on the Tubes about these various libraries. But I must say version 2 of <a href="http://django-rest-framework.org/">Django REST Framework</a> is looking great.</p>
<p>Django REST Framework feels like it handles a lot more possibilities, that you are not limited or forced down a particular path. You have the Serialization shim, but other than that you can structure your WEB Api code the way that most suites you.</p>
<p>You can make use of functional or class views, but if you have a general model and setup and no need to get fancy there are the relevant helper classes that do that necessary magic for you. Actually it appears there are helper functions/classes at all levels no matter which direction you can with structuring your WEB Api. There are even mixins you can make use of if you make use of classes for your views and want a little help with some functionality.</p>
<p>Their <a href="http://django-rest-framework.org/tutorial/1-serialization.html">tutorial</a> is great and covers all these areas. The added bonus of this library is the Web Interface that pops up, it really helps with creating data and interacting with the WEB Api a lot simpler.</p>
]]></content>
		</item>
		
		<item>
			<title>Pelican</title>
			<link>https://reinbach.com/posts/pelican/</link>
			<pubDate>Mon, 04 Mar 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/pelican/</guid>
			<description>&lt;p&gt;Blog changed to use &lt;a href=&#34;http://docs.getpelican.com&#34;&gt;Pelican&lt;/a&gt; and my thoughts on it.&lt;/p&gt;
&lt;p&gt;Well that escalated quickly! I was wanting to update the look and feel of this blog, felt it needed a little touch up.&lt;/p&gt;
&lt;p&gt;I had read and heard about various blog systems that were very static, with the relevant files being pre-generated and pushed to the server. The benefit being that this simplified things on the server side, server would be able to handle large loads etc. Also the blog entries could be versioned stored in a repo easily enough.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Blog changed to use <a href="http://docs.getpelican.com">Pelican</a> and my thoughts on it.</p>
<p>Well that escalated quickly! I was wanting to update the look and feel of this blog, felt it needed a little touch up.</p>
<p>I had read and heard about various blog systems that were very static, with the relevant files being pre-generated and pushed to the server. The benefit being that this simplified things on the server side, server would be able to handle large loads etc. Also the blog entries could be versioned stored in a repo easily enough.</p>
<p>So it appears things lined up this past week. I ran across a blurb saying that <a href="http://kernel.org">kernel.org</a> just updated their site to make use of <a href="http://docs.getpelican.com">Pelican</a>, and I decided to take a look at it. Well that quickly turned into me trying out the tutorial, then moving onto the rest of the documentation and working on developing a theme and before I knew it, I had just redone my site.</p>
<p>I created a quick python script to pull my blog entries and generate the relevant markdown files. Luckily my blog makes use of markdown, so that was simple enough.</p>
<p>A quick nginx conf change, which included adding a rewrite rule for old links and voila things are up and running with a new theme etc.</p>
<p>So I&rsquo;m extremely impressed with <a href="http://docs.getpelican.com">Pelican</a>, they have done a fantastic job and it&rsquo;s very easy to use. The packaged commands with it make it a breeze doing the various tasks you need to do. I really like making use of my normal editor (Emacs) to write articles and the bonus is that the articles are now stored in the repo as well.</p>
]]></content>
		</item>
		
		<item>
			<title>Django 1.3 To 1.5 Update</title>
			<link>https://reinbach.com/posts/django-13-15-update/</link>
			<pubDate>Thu, 28 Feb 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/django-13-15-update/</guid>
			<description>&lt;p&gt;Just updated this site from Django 1.3 to 1.5 and hit the following nuances&lt;/p&gt;
&lt;h2 id=&#34;generic-view-changes&#34;&gt;Generic view changes&lt;/h2&gt;
&lt;p&gt;This has changed a bit, and I was only using it to generate the robots.txt file. So I just moved it to a simple view. So no longer use generic views.&lt;/p&gt;
&lt;h2 id=&#34;syndication-contrib-changes&#34;&gt;Syndication contrib changes&lt;/h2&gt;
&lt;p&gt;I just needed to change the import path and tweak the url settings file a bit. Actually a lot simpler now. See the &lt;a href=&#34;https://docs.djangoproject.com/en/1.5/ref/contrib/syndication/&#34;&gt;syndication page&lt;/a&gt; for more information.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just updated this site from Django 1.3 to 1.5 and hit the following nuances</p>
<h2 id="generic-view-changes">Generic view changes</h2>
<p>This has changed a bit, and I was only using it to generate the robots.txt file. So I just moved it to a simple view. So no longer use generic views.</p>
<h2 id="syndication-contrib-changes">Syndication contrib changes</h2>
<p>I just needed to change the import path and tweak the url settings file a bit. Actually a lot simpler now. See the <a href="https://docs.djangoproject.com/en/1.5/ref/contrib/syndication/">syndication page</a> for more information.</p>
<h2 id="allowed_hosts">ALLOWED_HOSTS</h2>
<p>Due to potential CSRF issues this setting is now needed in the settings.</p>
<pre><code>ALLOWED_HOSTS = ['.reinbach.com']
</code></pre>
<p>The dot allows any subdomain to work as well.</p>
<h2 id="admin-static-files">Admin static files</h2>
<p>The path location changed, it is now. So I just needed to change my nginx.conf file to have the /static/admin path point to the new location, which is;</p>
<pre><code>django/contrib/admin/static/admin/
</code></pre>
<p>That was pretty much all I needed to do, now I&rsquo;m at the latest and greatest. Granted this site is really basic with not much functionality within it. So no major tweaks needed. But still nice when it is quick and simple to jump up to a new release.</p>
]]></content>
		</item>
		
		<item>
			<title>Cross Posting Forms With Auth Token</title>
			<link>https://reinbach.com/posts/cross-posting-forms-auth-token/</link>
			<pubDate>Sat, 16 Feb 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/cross-posting-forms-auth-token/</guid>
			<description>&lt;p&gt;On a follow up to &lt;a href=&#34;http://www.reinbach.com/blog/cross-posting-forms&#34;&gt;Cross Posting Forms&lt;/a&gt; I wanted to be able to authenticate the user and decided to make use of an auth token, which would then be set client side and the client would supply it in each subsequent request.&lt;/p&gt;
&lt;p&gt;Well that was added simply enough on the client side, but it took me a while to realize why it was not working on the server side of things.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>On a follow up to <a href="http://www.reinbach.com/blog/cross-posting-forms">Cross Posting Forms</a> I wanted to be able to authenticate the user and decided to make use of an auth token, which would then be set client side and the client would supply it in each subsequent request.</p>
<p>Well that was added simply enough on the client side, but it took me a while to realize why it was not working on the server side of things.</p>
<p>I finally realized that when adding new headers to the requests, I need to add them to the headers list in the crossdomain decorator so that they pass through;</p>
<pre><code>@app.route(&quot;/login&quot;, methods=['POST')
@crossdomain(origin='*', headers='origin, x-requested-with, content-type, accept, authtoken')
def login():
    ...&lt;snip&gt;...
</code></pre>
<p>Otherwise it would be stripped out of the headers and I would end up constantly asking the client to authenticate and get no where.</p>
]]></content>
		</item>
		
		<item>
			<title>Node.Js</title>
			<link>https://reinbach.com/posts/nodejs/</link>
			<pubDate>Sat, 16 Feb 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/nodejs/</guid>
			<description>&lt;p&gt;Lately I&amp;rsquo;m doing more and more Javascript development and attempting to improve my skill set there. And I&amp;rsquo;m finding that I am using &lt;a href=&#34;http://nodejs.org/&#34;&gt;Node.js&lt;/a&gt; more in development and when learning Javascript.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s very handy to be able to write a snippet of Javascript code in your default editor and then use node to run it. Especially for learning and just trying something out. I find that a lot better than trying to make use of the browser Javscript consoles or scratch pads.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Lately I&rsquo;m doing more and more Javascript development and attempting to improve my skill set there. And I&rsquo;m finding that I am using <a href="http://nodejs.org/">Node.js</a> more in development and when learning Javascript.</p>
<p>It&rsquo;s very handy to be able to write a snippet of Javascript code in your default editor and then use node to run it. Especially for learning and just trying something out. I find that a lot better than trying to make use of the browser Javscript consoles or scratch pads.</p>
<p>Also Node is really fantastic when making use of testacular etc for running the various unit and end to end tests on ones project.</p>
<p>I&rsquo;m not mkaing use of Node just yet in production as I&rsquo;m happy with my current production setup (nginx, uwsgi) and would rather continue to keep that simple and minimal for now.</p>
]]></content>
		</item>
		
		<item>
			<title>Cross Posting Forms</title>
			<link>https://reinbach.com/posts/cross-posting-forms/</link>
			<pubDate>Fri, 25 Jan 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/cross-posting-forms/</guid>
			<description>&lt;p&gt;My application has 2 different components. An API written in Flask and a JS Application using AngularJS and these are served from different locations/domains. So the API needed to implement &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS&#34;&gt;HTTP Access Controls CORS&lt;/a&gt; to allow the requests from different domains.&lt;/p&gt;
&lt;p&gt;For the API, I used the following &lt;a href=&#34;http://flask.pocoo.org/snippets/56/&#34;&gt;view decorator&lt;/a&gt; and I also added&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;f.required_methods = [&#39;OPTIONS&#39;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the decorator function as suggested in the comments. I then implemented the decorator in the following manner;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>My application has 2 different components. An API written in Flask and a JS Application using AngularJS and these are served from different locations/domains. So the API needed to implement <a href="https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS">HTTP Access Controls CORS</a> to allow the requests from different domains.</p>
<p>For the API, I used the following <a href="http://flask.pocoo.org/snippets/56/">view decorator</a> and I also added</p>
<pre><code>f.required_methods = ['OPTIONS']
</code></pre>
<p>to the decorator function as suggested in the comments. I then implemented the decorator in the following manner;</p>
<pre><code>@app.route(&quot;/login&quot;, methods=['POST')
@crossdomain(origin='*', headers='origin, x-requested-with, content-type, accept')
def login():
    ...&lt;snip&gt;...
</code></pre>
<p>Once that was done the calls from the JS Applicatin worked.</p>
<p>To improve things, I&rsquo;ll probably move the headers param into the decorator function and make it a default rather than having to type it every time.</p>
]]></content>
		</item>
		
		<item>
			<title>Server For Angularjs App</title>
			<link>https://reinbach.com/posts/server-for-angularjs-app/</link>
			<pubDate>Thu, 24 Jan 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/server-for-angularjs-app/</guid>
			<description>&lt;p&gt;Working on my &lt;a href=&#34;https://github.com/reinbach/finance&#34;&gt;Finance App&lt;/a&gt; I wanted the website to be a standalone JS application for which I am using &lt;a href=&#34;http://angularjs.org/&#34;&gt;AngularJS&lt;/a&gt;. To make that happen I needed a simple server to deliver the necessary javascript, css and html files that make up the javascript application to the client (browser).&lt;/p&gt;
&lt;p&gt;So I decided to make use of &lt;a href=&#34;http://werkzeug.pocoo.org/&#34;&gt;Werkzeug&lt;/a&gt; and ended up with the following straight forward &lt;a href=&#34;https://gist.github.com/4623828&#34;&gt;python code&lt;/a&gt; to deliver the application code.&lt;/p&gt;
&lt;p&gt;I wanted to stick with the angular-seed application format/layout of code and so the static files are delivered via the SharedDataMiddleware with the relevant paths defined there.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Working on my <a href="https://github.com/reinbach/finance">Finance App</a> I wanted the website to be a standalone JS application for which I am using <a href="http://angularjs.org/">AngularJS</a>. To make that happen I needed a simple server to deliver the necessary javascript, css and html files that make up the javascript application to the client (browser).</p>
<p>So I decided to make use of <a href="http://werkzeug.pocoo.org/">Werkzeug</a> and ended up with the following straight forward <a href="https://gist.github.com/4623828">python code</a> to deliver the application code.</p>
<p>I wanted to stick with the angular-seed application format/layout of code and so the static files are delivered via the SharedDataMiddleware with the relevant paths defined there.</p>
<p>HTML files are delivered in the normal manner. A couple of improvements could be to only allow .html files and robots.txt files. It&rsquo;s still early days in the development of this project, so things may change as I learn more.</p>
]]></content>
		</item>
		
		<item>
			<title>Angularjs</title>
			<link>https://reinbach.com/posts/angularjs/</link>
			<pubDate>Sun, 20 Jan 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/angularjs/</guid>
			<description>&lt;p&gt;A while back at work I started using backbone.js for the UI part of the project. It was interesting and sadly I did not spend much time on the project before being pulled off to work on other tasks.&lt;/p&gt;
&lt;p&gt;This week I wanted to get back to working on JS frameworks/application as I need one for my &lt;a href=&#34;http://www.reinbach.com/blog/finance-app&#34;&gt;Finance App&lt;/a&gt;. For the browser UI application portion of the app, I wanted to make a purely JS application and I decided to try out &lt;a href=&#34;http://angularjs.org/&#34;&gt;AngularJS&lt;/a&gt; after reading some good things about it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A while back at work I started using backbone.js for the UI part of the project. It was interesting and sadly I did not spend much time on the project before being pulled off to work on other tasks.</p>
<p>This week I wanted to get back to working on JS frameworks/application as I need one for my <a href="http://www.reinbach.com/blog/finance-app">Finance App</a>. For the browser UI application portion of the app, I wanted to make a purely JS application and I decided to try out <a href="http://angularjs.org/">AngularJS</a> after reading some good things about it.</p>
<p>I&rsquo;ve since gone through their <a href="http://docs.angularjs.org/tutorial">Tutorial</a> and was introduced to <a href="http://vojtajina.github.com/testacular/">Testacular</a> for running unit tests and <a href="http://pivotal.github.com/jasmine/">Jasmine</a> for the end 2 end testing. In the past I&rsquo;ve not done much in the way of testing for JS code and these look fantastic, and hopefully I will get a lot better with testing JS code. I plan to do a lot for this application.</p>
<p>At the moment, I&rsquo;ve cloned the <a href="https://github.com/angular/angular-seed">angular-seed</a> project and starting to setup my application, while I work my way through the <a href="http://docs.angularjs.org/guide">Guide</a>. The examples and the testing make use of node.js, which is fine for unit testing. But my production servers make use of nginx and uWSGI for the webserver, so I&rsquo;m needing to sort out that aspect of things before progressing too much.</p>
]]></content>
		</item>
		
		<item>
			<title>Finance App</title>
			<link>https://reinbach.com/posts/finance-app/</link>
			<pubDate>Sun, 20 Jan 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/finance-app/</guid>
			<description>&lt;p&gt;All my expenses are paid via a credit card and once or twice a month I settle the account. But I also I like to track my expenses closely. I have a number of different bank accounts for the various expenses, to which I allocate a certain amount each pay period from my income. Eg: Insurance account where I allocate a set month to this account from my salary and then when the insurance is due I hopefully have enough money in the account to pay for it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>All my expenses are paid via a credit card and once or twice a month I settle the account. But I also I like to track my expenses closely. I have a number of different bank accounts for the various expenses, to which I allocate a certain amount each pay period from my income. Eg: Insurance account where I allocate a set month to this account from my salary and then when the insurance is due I hopefully have enough money in the account to pay for it.</p>
<p>So this requires me to allocate each of the expenses to the relevant expense account, as I need to draw the relevant amount from each of the expense accounts.</p>
<p>I actually use <a href="http://www.gnucash.org/">GnuCash</a> to track my finances, which is a great application and has served me well. The issue I have is with my process and I am starting to find it a bit montonous having to work out the various expenses on the credit card and allocate them accordingly. So I&rsquo;ve finally decided to do something about it and put together an application that will hopefully make things a lot more steamlined for me.</p>
<p>For some time now I have been tending towards developing applications that have a clear and distinct separation between the UI aspect of the application and the business logic. In order to accomplish this I am developing a solid API application that can serve/handle the various UI applications.</p>
<p>The various UI applications are applications that are developed for the browser, Android, IOS etc.</p>
<p>I&rsquo;m still working through the various nuances of making this work the way I like and hopefully by the end of this application I will have a solid framework/method of how best to handle this.</p>
<p>To see how things are going you can follow via the <a href="https://github.com/reinbach/finance">GitHub repo</a></p>
]]></content>
		</item>
		
		<item>
			<title>2013 Goals</title>
			<link>https://reinbach.com/posts/2013-goals/</link>
			<pubDate>Sun, 06 Jan 2013 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/2013-goals/</guid>
			<description>&lt;p&gt;My Goals for 2013 are;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;develop Finance app and at least 5 other mini apps&lt;/li&gt;
&lt;li&gt;Learn 2 new languages (Go, Haskell)&lt;/li&gt;
&lt;li&gt;Develop at least 1 App for Android and IOS&lt;/li&gt;
&lt;li&gt;Read the following books; The C Programming Language, Programming Pearls, The Algorithm Design Manual&lt;/li&gt;
&lt;li&gt;Improve my writing: write 52 blog entries (1/week)&lt;/li&gt;
&lt;li&gt;Go on 3 family vacations&lt;/li&gt;
&lt;li&gt;Excerise on a regular basis&lt;/li&gt;
&lt;/ul&gt;</description>
			<content type="html"><![CDATA[<p>My Goals for 2013 are;</p>
<ul>
<li>develop Finance app and at least 5 other mini apps</li>
<li>Learn 2 new languages (Go, Haskell)</li>
<li>Develop at least 1 App for Android and IOS</li>
<li>Read the following books; The C Programming Language, Programming Pearls, The Algorithm Design Manual</li>
<li>Improve my writing: write 52 blog entries (1/week)</li>
<li>Go on 3 family vacations</li>
<li>Excerise on a regular basis</li>
</ul>
]]></content>
		</item>
		
		<item>
			<title>Mountain Lion Setup</title>
			<link>https://reinbach.com/posts/mountain-lion-setup/</link>
			<pubDate>Fri, 31 Aug 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/mountain-lion-setup/</guid>
			<description>&lt;p&gt;Most of my development is with Python, Django, Gevent, ZeroMQ and mainly with Web Applications. With that in mind I just upgraded to the latest mac osx &amp;ldquo;Mountain Lion&amp;rdquo; and did the following to get myself setup.&lt;/p&gt;
&lt;p&gt;First things first get XCode and install the Command Line Tools package, and make sure it is up to date. Or you can make use of the stand alone CLI package.&lt;/p&gt;
&lt;p&gt;Next install &amp;ldquo;homebrew&amp;rdquo;, can&amp;rsquo;t leave home without it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Most of my development is with Python, Django, Gevent, ZeroMQ and mainly with Web Applications. With that in mind I just upgraded to the latest mac osx &ldquo;Mountain Lion&rdquo; and did the following to get myself setup.</p>
<p>First things first get XCode and install the Command Line Tools package, and make sure it is up to date. Or you can make use of the stand alone CLI package.</p>
<p>Next install &ldquo;homebrew&rdquo;, can&rsquo;t leave home without it.</p>
<p>With most of my development making use of Python, I make use of virtualenv and virtualenvwrapper to separate the various projects.</p>
<pre><code>brew install virtualenv
brew install virtualenvwrapper
</code></pre>
<p>I like to make use of Gevent in a lot of projects, but to be able to installed gevent in the various virtualenv, libevent needs to be installed globally for gevent to build against.</p>
<pre><code>brew install libevent
</code></pre>
<p>MySQL is used as the database for some projects. Grabbed the  and ran into an issue with the lib not being found, so created a symbolic link for it;</p>
<pre><code>sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
</code></pre>
<p>Less is used for css styling and that is compressed as well. So needed node.js and relevant less package;</p>
<pre><code>brew install node.js
curl https://npmjs.org/install.sh | sh
npm install --global less
</code></pre>
<p>This pretty much gets me to the state that I like to have as a development machine. Hopefully I remembered everything here.</p>
]]></content>
		</item>
		
		<item>
			<title>Simple Test Runner</title>
			<link>https://reinbach.com/posts/simple-test-runner/</link>
			<pubDate>Wed, 25 Jul 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/simple-test-runner/</guid>
			<description>&lt;p&gt;Working on a prototype using &lt;a href=&#34;http://flask.pocoo.org/docs/&#34;&gt;Flask&lt;/a&gt; and wanted a test runner as the unit tests were starting to grow.&lt;/p&gt;
&lt;p&gt;I wanted something that was easy to add news tests to and allow me to spread them over multiple files/modules. The project has the following dir. structure;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;|- config.py
|- /project
    ... snip ...
|- /tests
    |- api_config_type.py
|- runserver.py
| -test_runner.py &amp;lt;- this is the test runner script
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So the script starts off updating the sys.path, as to allow the tests to be able to access the relevant modules in the project&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Working on a prototype using <a href="http://flask.pocoo.org/docs/">Flask</a> and wanted a test runner as the unit tests were starting to grow.</p>
<p>I wanted something that was easy to add news tests to and allow me to spread them over multiple files/modules. The project has the following dir. structure;</p>
<pre><code>|- config.py
|- /project
    ... snip ...
|- /tests
    |- api_config_type.py
|- runserver.py
| -test_runner.py &lt;- this is the test runner script
</code></pre>
<p>So the script starts off updating the sys.path, as to allow the tests to be able to access the relevant modules in the project</p>
<pre><code>sys.path.append(os.path.abspath(__file__))
</code></pre>
<p>Next I setup the list of the test modules I want to pull in a run each time I call the test runner. This is a simple list of them;</p>
<pre><code>test_modules = [
    'tests.api_config_type'
]
</code></pre>
<p>The next bit is the meat of it all. Here we loop through the test_modules list and import the test_cases from them which is another simple list. The test cases list in the module would look something like this;</p>
<pre><code>test_cases = [APIConfigTypeTest, APIConfigKeyTest]
</code></pre>
<p>Which holds the test cases you want to include in the test runner. So as the test runner loops through these test cases it uses UnitTest&rsquo;s test loader to load the test cases</p>
<pre><code>suites = []
for test_mod in test_modules:
    _temp = __import__(test_mod, globals(), locals(), ['test_cases'], -1)
    for test_case in _temp.test_cases:
        suites.append(unittest.TestLoader().loadTestsFromTestCase(test_case))
</code></pre>
<p>The result of this is a master suites list of test cases to run. We add that to the test suite and then call the test runner to run them;</p>
<pre><code>alltests = unittest.TestSuite(suites)
runner = unittest.TextTestRunner()
</code></pre>
<p>That&rsquo;s it, not perfect could do with some improvements, but it gets the job done and I&rsquo;m back to writing more tests and adding them simply enough to the test runner.</p>
<p>The complete script (test_runner.py);</p>
<pre><code>import os
import sys
import unittest


sys.path.append(os.path.abspath(__file__))


test_modules = [
    'tests.api_config_type'
]


suites = []
for test_mod in test_modules:
    _temp = __import__(test_mod, globals(), locals(), ['test_cases'], -1)
    for test_case in _temp.test_cases:
        suites.append(unittest.TestLoader().loadTestsFromTestCase(test_case))


alltests = unittest.TestSuite(suites)
runner = unittest.TextTestRunner()


if __name__ == &quot;__main__&quot;:
    runner.run(alltests)
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>More Socket.Io And Zeromq Fun</title>
			<link>https://reinbach.com/posts/more-socketio-and-zeromq-fun/</link>
			<pubDate>Sun, 08 Jul 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/more-socketio-and-zeromq-fun/</guid>
			<description>&lt;p&gt;Playing around with socket.io and zeromq and put together a little triage app. The app has a producer that randoming creates events, which are picked up by the app and tracks them. If any users are connected to the app, the event is send to them. The user can update the event&amp;rsquo;s status, category and/or add comments to the event. These changes are automatically sent to any other user viewing the app at the same time.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Playing around with socket.io and zeromq and put together a little triage app. The app has a producer that randoming creates events, which are picked up by the app and tracks them. If any users are connected to the app, the event is send to them. The user can update the event&rsquo;s status, category and/or add comments to the event. These changes are automatically sent to any other user viewing the app at the same time.</p>
<p><a href="https://github.com/reinbach/mini-triage">https://github.com/reinbach/mini-triage</a></p>
]]></content>
		</item>
		
		<item>
			<title>Web.Py And Uwsgi</title>
			<link>https://reinbach.com/posts/webpy-and-uwsgi/</link>
			<pubDate>Sun, 08 Jul 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/webpy-and-uwsgi/</guid>
			<description>&lt;p&gt;Setting up a site developed with web.py on my servers using nginx and uwsgi and kept running into a couple of issues with uwsgi not responding as expected.&lt;/p&gt;
&lt;p&gt;The first issue was simple enough and uwsgi logs provided the needed information. Python imports were not finding the needed packages. I tweaked the code to update the python paths.&lt;/p&gt;
&lt;p&gt;The second issue took me a moment to work out. I kept seeing the following error in the logs;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Setting up a site developed with web.py on my servers using nginx and uwsgi and kept running into a couple of issues with uwsgi not responding as expected.</p>
<p>The first issue was simple enough and uwsgi logs provided the needed information. Python imports were not finding the needed packages. I tweaked the code to update the python paths.</p>
<p>The second issue took me a moment to work out. I kept seeing the following error in the logs;</p>
<pre><code>&quot;application&quot; must be a callable object in file....
</code></pre>
<p>Now I know I was telling uwsgi via nginx conf file that the application callable object was &ldquo;app&rdquo;. But I got stuck on thinking that nginx was expecting the callable object to be &ldquo;application&rdquo; so I changed the app around to use application, but obviously that did not work.</p>
<p>A little research showed that web.py needs to make use of the following for uwsgi to work;</p>
<pre><code>application = app.wsgifunc()
</code></pre>
<p>Tweaked that to be;</p>
<pre><code>app = app.wsgifunc()
</code></pre>
<p>And everything worked like a charm. The following is the wrapper I used on the application to handle the above issues.</p>
<pre><code>import sys
import os


prev_sys_path = list(sys.path)
sys.path.append(os.path.dirname(os.path.abspath(__file__)))


new_sys_path = [p for p in sys.path if p not in prev_sys_path]
for item in new_sys_path:
    sys.path.remove(item)
    sys.path[:0] = new_sys_path

from code import app


app = app.wsgifunc()


if __name__ == '__main__':
    app.run()
</code></pre>
<p>The part &ldquo;from code import app&rdquo; is the part that pulls in the web.py application. This file is set as the app and as callable in nginx conf file.</p>
]]></content>
		</item>
		
		<item>
			<title>Socket.Io</title>
			<link>https://reinbach.com/posts/socketio/</link>
			<pubDate>Sat, 30 Jun 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/socketio/</guid>
			<description>&lt;p&gt;There are times when you need to communicate between the browser and the server without having to reload the page. That just saves a bunch of bandwidth, improves the user experience and is generally termed as AJAX. But now and then it is helpful to keep this connection between the browser and server open for a more extended time frame. This saves in some processing from opening/closing connections. In the past this has been considered long polling.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>There are times when you need to communicate between the browser and the server without having to reload the page. That just saves a bunch of bandwidth, improves the user experience and is generally termed as AJAX. But now and then it is helpful to keep this connection between the browser and server open for a more extended time frame. This saves in some processing from opening/closing connections. In the past this has been considered long polling.</p>
<p>Now with &ldquo;real time&rdquo; apps or apps that have a more &ldquo;desktop&rdquo; like experience you want to be improve the connection/speed between the client/browser and the server, so keeping a connection open and streaming the relevant data to the browser really helps with this. It&rsquo;s a lot better than having to refresh the page continuously and provides the impression that the web app is more responsive.</p>
<p>This is where <a href="http://socket.io/">socket.io</a> comes into play. It handles most of the issues with keeping this connection open, and especially handles the nuances of each browser. It will make use of websockets where possible and gracefully fail down to using flash for those older browsers.</p>
<p>Now seeing that I make use of Python for more programming fix, thankfully there is the nice package for this called <a href="https://github.com/abourget/gevent-socketio">gevent-socketio</a> that makes things simpler.</p>
<p>So with that I have created a few simple examples with it to get a feel for using it;</p>
<ul>
<li><a href="https://github.com/reinbach/gevent-socketio-example">gevent-socketio-example</a></li>
<li><a href="https://github.com/reinbach/gevent-zmq-socketio-example">gevent-zmq-socketio-example</a></li>
</ul>
<p>Really nice and this opens a lot of possibilities which I hope to play with now.</p>
]]></content>
		</item>
		
		<item>
			<title>Datashare Mini App</title>
			<link>https://reinbach.com/posts/datashare-mini-app/</link>
			<pubDate>Mon, 09 Apr 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/datashare-mini-app/</guid>
			<description>&lt;p&gt;Playing around with gevent and &amp;ldquo;real time&amp;rdquo; updating of the data between browsers viewing/working on the same data.&lt;/p&gt;
&lt;p&gt;So I created a mini app that pushes updates/additions to data in the browser to all users viewing that data.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/reinbach/datashare&#34;&gt;https://github.com/reinbach/datashare&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this mini app the data in the browser is a table with each cell being editable and with the ability to add a new line to the table. As changes are made in each of these cells or a row is added, any of the users viewing this data will see these changes in their browser instantly.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Playing around with gevent and &ldquo;real time&rdquo; updating of the data between browsers viewing/working on the same data.</p>
<p>So I created a mini app that pushes updates/additions to data in the browser to all users viewing that data.</p>
<p><a href="https://github.com/reinbach/datashare">https://github.com/reinbach/datashare</a></p>
<p>In this mini app the data in the browser is a table with each cell being editable and with the ability to add a new line to the table. As changes are made in each of these cells or a row is added, any of the users viewing this data will see these changes in their browser instantly.</p>
]]></content>
		</item>
		
		<item>
			<title>Maintenance Page</title>
			<link>https://reinbach.com/posts/maintenance-page/</link>
			<pubDate>Wed, 07 Mar 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/maintenance-page/</guid>
			<description>&lt;p&gt;I had to move servers for a client and made use of a simple maintenance page to stop data being added to the both the servers as I moved the latest data across.&lt;/p&gt;
&lt;p&gt;The servers had a normal apache instance running, without nginx etc. So I made use of .htaccess and a html page to handle this.&lt;/p&gt;
&lt;p&gt;I put in place a maintenance.html file on the server that looked like this;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I had to move servers for a client and made use of a simple maintenance page to stop data being added to the both the servers as I moved the latest data across.</p>
<p>The servers had a normal apache instance running, without nginx etc. So I made use of .htaccess and a html page to handle this.</p>
<p>I put in place a maintenance.html file on the server that looked like this;</p>
<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Pearl Izumi&lt;/title&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    function delayer() {
        window.location = &quot;/&quot;;
    }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body style=&quot;text-align: center;&quot; onLoad=&quot;setTimeout('delayer()', 5000)&quot;&gt;
    &lt;h3&gt;Currently in maintenance mode&lt;/h3&gt;


    &lt;p&gt;We're making this a better place.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>The javascript is in there to redirect the use back to the home page every 5s to help them keep checking, also to redirect them away from the maintenance.html page. Otherwise when we updated the .htaccess file, and the user tries to reload the site, they may still end up at the maintenance page. Also this does not work well if a user has javascript turned off. So there are a number of things that need to be tweaked to improve this.</p>
<p>The .htaccess file redirects all requests to the maintenance page and is done with the following;</p>
<pre><code>RewriteEngine On
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^67\.255\.207\.160
RewriteRule $ /maintenance.html [R=307,L]
</code></pre>
<p>If you need to open the site up to other IP addresses, you can add extra &ldquo;REMOTE_HOST&rdquo; lines with the relevant IP address.
In this instance all requests are sent to the maintenance.html page, so that makes it tricky to add images and styling to your maintenance page. To do that in this case, you would need to link to images/css files off this server at another server.</p>
<p>So that was it. To turn the maintenance page on and off, just un/comment the rewrite rules in the .htaccess page. You probably also want to rename the maintenance page to something else, that is not accessible by the webserver, to prevent people accidentally accessing it.</p>
<p>I now also make use of this maintenance page when doing updates to the site.</p>
]]></content>
		</item>
		
		<item>
			<title>Multiple Postgres Database Backup</title>
			<link>https://reinbach.com/posts/multiple-postgres-database-backup/</link>
			<pubDate>Wed, 07 Mar 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/multiple-postgres-database-backup/</guid>
			<description>&lt;p&gt;I have a number of small databases on a PostgreSQL server, and wanted a simple script to backup these databases and store them locally for each day of the week.&lt;/p&gt;
&lt;p&gt;So I created a python script to do the work for me, it will handle any new databases that are added, so I don&amp;rsquo;t have to worry about setting up a backup script each time I create a new database.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have a number of small databases on a PostgreSQL server, and wanted a simple script to backup these databases and store them locally for each day of the week.</p>
<p>So I created a python script to do the work for me, it will handle any new databases that are added, so I don&rsquo;t have to worry about setting up a backup script each time I create a new database.</p>
<p>You can find the script at <a href="https://gist.github.com/90b45a8259ad0b906554">https://gist.github.com/90b45a8259ad0b906554</a></p>
<p>The script makes use of the .pgpass file, so you need to setup a .pgpass file for the user running the script, that stores the access params to psql so that the pg_dump call will work. See [see http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html](see <a href="http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html">http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html</a>)</p>
<p>The script is something to get started with and will only work with small databases that have low traffic.</p>
<p>Setup up a crontab to run the script.</p>
<pre><code>0 3 * * * * root /etc/cron.daily/psql_backup.py
</code></pre>
<p>Then there is a separate rsync script to pull the database instances off the server to another location/data center.</p>
]]></content>
		</item>
		
		<item>
			<title>Icinga</title>
			<link>https://reinbach.com/posts/icinga/</link>
			<pubDate>Fri, 24 Feb 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/icinga/</guid>
			<description>&lt;p&gt;It was about time I put together some monitoring system for the  servers I have running on rackspace. I decided to make use of &lt;a href=&#34;https://www.icinga.org/&#34;&gt;Icinga&lt;/a&gt;, which is a fork of &lt;a href=&#34;http://www.nagios.org/&#34;&gt;Nagios&lt;/a&gt; and meant to be more actively developed. The web interface looks a lot nicer and it makes use of all the nagios plugins.&lt;/p&gt;
&lt;p&gt;I followed the &lt;a href=&#34;http://docs.icinga.org/latest/en/quickstart.html&#34;&gt;quickstart guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have a server outside of rackspace and decided to make use of that to monitor the rackspace servers, sadly though this server runs CentOS and did not have the latest versions of PCRE (&amp;gt; 7.6) version  available in order to run the new web interface available for Icinga, so had to resort back to the classic interface.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>It was about time I put together some monitoring system for the  servers I have running on rackspace. I decided to make use of <a href="https://www.icinga.org/">Icinga</a>, which is a fork of <a href="http://www.nagios.org/">Nagios</a> and meant to be more actively developed. The web interface looks a lot nicer and it makes use of all the nagios plugins.</p>
<p>I followed the <a href="http://docs.icinga.org/latest/en/quickstart.html">quickstart guide</a>.</p>
<p>I have a server outside of rackspace and decided to make use of that to monitor the rackspace servers, sadly though this server runs CentOS and did not have the latest versions of PCRE (&gt; 7.6) version  available in order to run the new web interface available for Icinga, so had to resort back to the classic interface.</p>
<p>Seeing that I was monitoring a couple of remote servers and hopefully the number of them will grow over time, I decided to make use of <a href="http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details">Nagios NRPE plugin</a> for the remote monitoring. This is meant to be a less resource intensive manner in monitoring although a little less secure than using SSH.</p>
<p>This required setting up the Nagios nrpe plugin on the remote servers as well as the <a href="http://nagiosplugins.org/">Nagios plugins</a>. I made use of both the nagios setup and the <a href="http://docs.icinga.org/latest/en/nrpe.html">Icinga NRPE</a> instructions for the remote servers. The extra step was to create a user/group for nagios, otherwise the make install would not work.</p>
<p>When making changes to your configuration, it&rsquo;s a good idea to run one of the following before reloading or restarting the Icinga daemon;</p>
<pre><code>/usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
/etc/init.d/icinga checkconfig
/etc/init.d/icinga show-errors
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>Riak</title>
			<link>https://reinbach.com/posts/riak/</link>
			<pubDate>Thu, 12 Jan 2012 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/riak/</guid>
			<description>&lt;p&gt;I&amp;rsquo;ve been playing around with &lt;a href=&#34;http://basho.com/products/riak-overview/&#34;&gt;Riak&lt;/a&gt; lately and wanted to make use of the &lt;a href=&#34;https://github.com/basho/riak-python-client&#34;&gt;python client&lt;/a&gt;. Ran into a small issue setting it all up in virtualenv. My system is Arch Linux.&lt;/p&gt;
&lt;p&gt;After making sure protobuf was installed system wide, currently the latest version is 2.4.1.
In my virtualenv I did the following to get it all sorted out;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar -jxvf protobuf-2.4.1.tar.bz2
cd protobuf-2.4.1/python/
python setup.py install
pip install riak
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Make sure you download the protobuf version that matches what you installed system wide. See &lt;a href=&#34;http://code.google.com/p/protobuf/downloads/list&#34;&gt;download page&lt;/a&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I&rsquo;ve been playing around with <a href="http://basho.com/products/riak-overview/">Riak</a> lately and wanted to make use of the <a href="https://github.com/basho/riak-python-client">python client</a>. Ran into a small issue setting it all up in virtualenv. My system is Arch Linux.</p>
<p>After making sure protobuf was installed system wide, currently the latest version is 2.4.1.
In my virtualenv I did the following to get it all sorted out;</p>
<pre><code>wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar -jxvf protobuf-2.4.1.tar.bz2
cd protobuf-2.4.1/python/
python setup.py install
pip install riak
</code></pre>
<p>Make sure you download the protobuf version that matches what you installed system wide. See <a href="http://code.google.com/p/protobuf/downloads/list">download page</a></p>
<p>Running &ldquo;pip install riak&rdquo; first and it was attempting to pull in a protobuf library from basho and for some reason it was failing. So did the above and things look good.</p>
]]></content>
		</item>
		
		<item>
			<title>Browserstack</title>
			<link>https://reinbach.com/posts/browserstack/</link>
			<pubDate>Sun, 09 Oct 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/browserstack/</guid>
			<description>&lt;p&gt;Being a web developer I am constantly needing to test/debug web applications against the various browsers and I have always found the IE family to be a pain. Ignoring the non-standard issues of these browsers etc. My main issue is having to load up Windows to be able to get to them, this has usually required me having virtual environments running or having dual booting machines. On top the extra steps etc to get Windows up and running there is also the requirement of having to have a license for Windows just to test their browsers.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Being a web developer I am constantly needing to test/debug web applications against the various browsers and I have always found the IE family to be a pain. Ignoring the non-standard issues of these browsers etc. My main issue is having to load up Windows to be able to get to them, this has usually required me having virtual environments running or having dual booting machines. On top the extra steps etc to get Windows up and running there is also the requirement of having to have a license for Windows just to test their browsers.</p>
<p>Today I tried out <a href="http://www.browserstack.com/">BrowserStack</a>. I had to debug a site in IE9, and after a quick signup, I was at the dashboard and able to load up the site in IE9 and troubleshoot my issue. I was given 60min of free time, which is nice, as it allowed me to try out the service and get comfortable with it.</p>
<p>The neat thing about BrowserStack is that they provide a number of debug tools, eg: Firebug Lite, in the browser that they start up. You don&rsquo;t have to install these, all you have to worry about is the issue you are dealing with.</p>
<p>A couple of caveats came up;</p>
<ul>
<li>
<p>I tried to do Local Testing and that crashed on me. It makes use of a Java applet and that is what appeared to crash on me. I was running Chrome for this and did not try other browsers, as I just moved to a URL that was accessible outside of my dev environment. A troubleshooting ticket was automatically sent to them, so hopefully that will get sorted out.</p>
</li>
<li>
<p>There is a little latency when using the service, but with what is actually happening that is expected. It was not horrendous and I was still able to be productive. Not something I would like to spend a lot of time in, but fine for troubleshooting and quick testing.</p>
</li>
</ul>
<p>So overall I&rsquo;m happy with the service, makes me excited to think that I can blow away my VM Window instances and no longer have to worry about dual booting etc.</p>
<p><em>[update 2/23/2012]</em> After using this service some more, I&rsquo;ve run into issues with it being very slow and painful to use at times. I was not as productive as it was initially. So I&rsquo;m heading back to the good &lsquo;ol VMs.</p>
]]></content>
		</item>
		
		<item>
			<title>Sphinx</title>
			<link>https://reinbach.com/posts/sphinx/</link>
			<pubDate>Fri, 07 Oct 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/sphinx/</guid>
			<description>&lt;p&gt;In an effort to improve the documenting of my code and some of my projects, I have been looking at the various tools/projects out there that help with this sort of thing. One of them being &lt;a href=&#34;http://sphinx.pocoo.org/&#34;&gt;Sphinx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So the idea is that I want to really have a single source for the documentation, and ideally it would be driven by the code. But alas that is really hard to do, so the idea is to add docstrings to your code. These can be read by the sphinx code during a build to help generate the necessary documentation.
The markup/down makes use of &lt;a href=&#34;http://docutils.sourceforge.net/&#34;&gt;reStructured Text&lt;/a&gt; which is simple to learn and make use of.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>In an effort to improve the documenting of my code and some of my projects, I have been looking at the various tools/projects out there that help with this sort of thing. One of them being <a href="http://sphinx.pocoo.org/">Sphinx</a>.</p>
<p>So the idea is that I want to really have a single source for the documentation, and ideally it would be driven by the code. But alas that is really hard to do, so the idea is to add docstrings to your code. These can be read by the sphinx code during a build to help generate the necessary documentation.
The markup/down makes use of <a href="http://docutils.sourceforge.net/">reStructured Text</a> which is simple to learn and make use of.</p>
<p>I ran a test build against a project I had just started and was very impressed with the results. I actually got a fair amount of information from my code that I told the sphinx build to include. The code had very little dostrings in it at the time, so that was nice to see.</p>
<p>There is a sphinx-quickstart script that helps to generate the conf.py file and there are a large number of available settings/options you can choose. One being the creation of a makefile, which makes it very easy to rebuild the documentation, with</p>
<pre><code>make html
</code></pre>
<p>And you have HTML files created of your documentation. You can switch out the &ldquo;html&rdquo; option/argument for Latex and various others.</p>
<p>This is just a scratch of what Sphinx is capable of, but I have the basics down and will continue using it and growing/developing my documentation of my codes and projects.</p>
<p>There is a very cool documentation hosting tool out there called <a href="http://readthedocs.org/">Read the Docs</a> and that can import your Sphinx generated docs.</p>
]]></content>
		</item>
		
		<item>
			<title>Sqlalchemy</title>
			<link>https://reinbach.com/posts/sqlalchemy/</link>
			<pubDate>Mon, 26 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/sqlalchemy/</guid>
			<description>&lt;p&gt;Working on a web application using the Flask and so made use of &lt;a href=&#34;http://www.sqlalchemy.org/&#34;&gt;SQLAlchemy&lt;/a&gt; for the database abstraction layer on a PostgreSQL database instance.&lt;/p&gt;
&lt;p&gt;My first impressions is that this is very sweet. I am very used to the ORM in Django and have hit a number of limitations with the way it works. I have not enjoyed having to jump Q object to start making use of AND and OR statements. Also the Aggregate and Annotate options are a bit quirky. The Django ORM does the basics and it does it well. But as you need to do more and more complex queries you start to run into limitations, and things start to feel like there is a fair amount of patching.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Working on a web application using the Flask and so made use of <a href="http://www.sqlalchemy.org/">SQLAlchemy</a> for the database abstraction layer on a PostgreSQL database instance.</p>
<p>My first impressions is that this is very sweet. I am very used to the ORM in Django and have hit a number of limitations with the way it works. I have not enjoyed having to jump Q object to start making use of AND and OR statements. Also the Aggregate and Annotate options are a bit quirky. The Django ORM does the basics and it does it well. But as you need to do more and more complex queries you start to run into limitations, and things start to feel like there is a fair amount of patching.</p>
<p>I&rsquo;ve just finished the guide on SQLAlchemy and it appears to provide a very well rounded database abstraction layer. So am very keen to get using it in my project.</p>
<p>Obviously in both options you can always resort to raw sql, but then that kinda defeats the purpose of making use of an ORM. And yes you can insert SQLAlchemy into Django if you like, but I already prefer Jinja2 and pulling up the Django ORM, then there is a lot of patching happening on a framework from the get go and that is not always a good thing.</p>
]]></content>
		</item>
		
		<item>
			<title>Diptoe</title>
			<link>https://reinbach.com/posts/diptoe/</link>
			<pubDate>Tue, 20 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/diptoe/</guid>
			<description>&lt;p&gt;I wanted to have a basic site that can be used to gauge the level of interest in an idea.&lt;/p&gt;
&lt;p&gt;So I created a simple web app called &lt;a href=&#34;https://github.com/reinbach/diptoe&#34;&gt;DipToe&lt;/a&gt; that accepts and stores email addresses in a flat file. Made use of the &lt;a href=&#34;http://flask.pocoo.org/&#34;&gt;Flask&lt;/a&gt; framework and in about 70 lines of code, excluding the html and css, have the site complete. It prompts for an email address and stores this in a flat text file.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I wanted to have a basic site that can be used to gauge the level of interest in an idea.</p>
<p>So I created a simple web app called <a href="https://github.com/reinbach/diptoe">DipToe</a> that accepts and stores email addresses in a flat file. Made use of the <a href="http://flask.pocoo.org/">Flask</a> framework and in about 70 lines of code, excluding the html and css, have the site complete. It prompts for an email address and stores this in a flat text file.</p>
<p>There is validation on the email address, which I pulled out of the Django framework. It also very loosely checks whether the user has entered the email address already and doesn&rsquo;t save it again.</p>
<p>The layout of the page has a large &ldquo;splash&rdquo; area on the home page and an about page as well. It is easy enough to add more pages if needed.</p>
<p>I made use of the <a href="https://github.com/twitter/bootstrap">twitter/bootstrap</a> for most of the css.</p>
]]></content>
		</item>
		
		<item>
			<title>My Stack A Changing</title>
			<link>https://reinbach.com/posts/my-stack-a-changing/</link>
			<pubDate>Thu, 15 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/my-stack-a-changing/</guid>
			<description>&lt;p&gt;Currently I make use of the following simple stack;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Jinja2&lt;/li&gt;
&lt;li&gt;Django&lt;/li&gt;
&lt;li&gt;MySQL / Postgres&lt;/li&gt;
&lt;li&gt;nginx&lt;/li&gt;
&lt;li&gt;Apache&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And based on some of the tasks I have been needing to do (queueing) and handling huge load issues that I have started to encounter. I have started to re-look at this stack.&lt;/p&gt;
&lt;p&gt;I definitely need to get some decent queueing mechanism in place, we have started to make use of &lt;a href=&#34;http://celeryproject.org/&#34;&gt;Celery&lt;/a&gt; at work. But &lt;a href=&#34;http://www.zeromq.org/&#34;&gt;ZeroMQ&lt;/a&gt; sounds really interesting to me, so want to have a look at that some more. Would like to try it out on some projects soon. So some queueing/messaging layer needs to be added to the stack.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Currently I make use of the following simple stack;</p>
<ul>
<li>Jinja2</li>
<li>Django</li>
<li>MySQL / Postgres</li>
<li>nginx</li>
<li>Apache</li>
</ul>
<p>And based on some of the tasks I have been needing to do (queueing) and handling huge load issues that I have started to encounter. I have started to re-look at this stack.</p>
<p>I definitely need to get some decent queueing mechanism in place, we have started to make use of <a href="http://celeryproject.org/">Celery</a> at work. But <a href="http://www.zeromq.org/">ZeroMQ</a> sounds really interesting to me, so want to have a look at that some more. Would like to try it out on some projects soon. So some queueing/messaging layer needs to be added to the stack.</p>
<p>I just read the great article on <a href="http://nichol.as/benchmark-of-python-web-servers">benchmarking python wsgi servers</a> by <a href="http://nichol.as/">Nicholas Piël</a>. Based on the results of all the benchmarking he did and what I am seeing/reading about what others are using in their stack I think I am going to try out <a href="http://www.gevent.org/">gevent</a> and <a href="http://projects.unbit.it/uwsgi/">uwsgi</a>.</p>
<p>I have also started seeing people making use of different types of databases based on the specific need. This varying from graph databases like <a href="http://neo4j.org/">neo4j</a> to key-value store like <a href="http://redis.io/">redis</a> to document orientated databases like <a href="http://www.mongodb.org/">mongoDB</a>.</p>
<p>For the last few years I have been using Django for my framework and this works extremely well. As you get everything that you would need when developing full featured web applications. There is a great community around it and a huge amount of information out there. But since I started doing some Google AppEngine work, Django did not work very well for that, it is not engineered to and there are better frameworks to do this (since then django-nosql has been developed). It got me thinking about other python frameworks and the possibility that they are better in certain instances.</p>
<p>So I have been playing with a few of those and expect that some of them will become part of the stack based on the need. In a similar way that various database instances/types are applicable in certain instances. The main ones that I have looked at are <a href="http://webapp-improved.appspot.com/">webapp2</a>, <a href="http://webpy.org/">webpy</a> and <a href="http://flask.pocoo.org/">Flask</a></p>
<p>On the client side of things, HTML5 is gathering a lot of steam and a number of interesting projects are cropping up around Javascript and CSS. Well when I say cropping up, it is relative to what I am only starting to learn about. May have been around for a while, but I am only just now starting to find out about them.</p>
<p>As the use of javascript has grown, fairly large applications have started to be built in javascript and so some straight Javascript frameworks have been created like <a href="http://knockoutjs.com/">Knockout</a>, <a href="http://www.sproutcore.com/">SproutCore</a>, and <a href="http://documentcloud.github.com/backbone/">backbone.js</a>. There is also <a href="http://jashkenas.github.com/coffee-script/">CoffeScript</a> which is a new language that compiles into Javascript.</p>
<p>While for CSS you have pre-processors being developed that help with the creation and maintenance of stylesheets like <a href="http://lesscss.org/">Less</a>, <a href="http://sass-lang.com/">Sass</a> and <a href="http://oocss.org/">OO Css</a></p>
<p>Lastly an interesting area that growing in popularity is opening a connection between the client (talking the browser here) and server allowing messages to be sent along this connection. <a href="http://websocket.org/">Websockets</a> and <a href="http://socket.io/">socket.io</a> appear to be the most interesting in this area at this point.</p>
<p>So loads of new cool technologies to wrap my head around and learn about. Hopefully implement them in a project soon to get a real feel about them. My stack is starting to expand and that is a great feeling as it makes it a lot more robust and scalable. I&rsquo;m also able to handle and apply better and proper tools to the required solution/application.</p>
]]></content>
		</item>
		
		<item>
			<title>Python-Gnupg</title>
			<link>https://reinbach.com/posts/python-gnupg/</link>
			<pubDate>Tue, 13 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/python-gnupg/</guid>
			<description>&lt;p&gt;At CashStar I had to implement some interactions with files being sent to us and needing to decrypt them on the fly. &lt;a href=&#34;http://www.gnupg.org/&#34;&gt;GPG&lt;/a&gt; was the encryption we were using and I decided to make use of python-gnupg for my side of the code. GnuPrivacyGuard needs to be installed as python-gnupg is a wrapper to that.&lt;/p&gt;
&lt;p&gt;Developing on a mac I found that installing &lt;a href=&#34;http://www.gpgtools.org/installer/index.html&#34;&gt;GPGTools&lt;/a&gt; was the easiest route in doing that. On the servers we would do the normal compiling of the relevant source code to install. There are currently 2 versions of GPG out there 1.41 and 2.018. GPGTools installs both and a bunch of other goodies.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>At CashStar I had to implement some interactions with files being sent to us and needing to decrypt them on the fly. <a href="http://www.gnupg.org/">GPG</a> was the encryption we were using and I decided to make use of python-gnupg for my side of the code. GnuPrivacyGuard needs to be installed as python-gnupg is a wrapper to that.</p>
<p>Developing on a mac I found that installing <a href="http://www.gpgtools.org/installer/index.html">GPGTools</a> was the easiest route in doing that. On the servers we would do the normal compiling of the relevant source code to install. There are currently 2 versions of GPG out there 1.41 and 2.018. GPGTools installs both and a bunch of other goodies.</p>
<p>To install python-gnupg, the ever faithful pip does the trick</p>
<pre><code>pip install python-gnupg
</code></pre>
<p>Now you can do everything you need to do through python. If you run into any issues, a good resource is either the <a href="http://packages.python.org/python-gnupg/">docs</a> or to actually go and <a href="http://code.google.com/p/python-gnupg/downloads/list">download the source</a> and there is a file there called test_gnupg.py that gives you all the example code you need.</p>
]]></content>
		</item>
		
		<item>
			<title>Crap Memory Issues</title>
			<link>https://reinbach.com/posts/crap-memory-issues/</link>
			<pubDate>Tue, 06 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/crap-memory-issues/</guid>
			<description>&lt;p&gt;Looks like my server is running out of ram&amp;hellip; yikes!! I think I am going to move this site to AWS. I have a number of systems running on this server and it is about time I split things up. Also gives me an excuse to make use of AWS.&lt;/p&gt;
&lt;p&gt;So if you have issues or start getting 505 errors. It&amp;rsquo;s due to memory issues!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[updated]&lt;/strong&gt;  It appears there was a conflict in the apache config files dealing with SSL certs. Able to remove these conflicts and things to be a lot stabler of late. The interesting thing is that this is a VPS Server and I am meant to be limited to 512MB or so, but if I run&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Looks like my server is running out of ram&hellip; yikes!! I think I am going to move this site to AWS. I have a number of systems running on this server and it is about time I split things up. Also gives me an excuse to make use of AWS.</p>
<p>So if you have issues or start getting 505 errors. It&rsquo;s due to memory issues!</p>
<p><strong>[updated]</strong>  It appears there was a conflict in the apache config files dealing with SSL certs. Able to remove these conflicts and things to be a lot stabler of late. The interesting thing is that this is a VPS Server and I am meant to be limited to 512MB or so, but if I run</p>
<pre><code>free -m
                 total       used       free     shared    buffers     cached
Mem:           894        416        478          0          0          0
-/+ buffers/cache:        416        478
Swap:            0          0          0
</code></pre>
<p>It was showing a total of 894 MB and that I still had 150MB free, and whenever it got to that point services were being stopped. It appears that PostgreSQL was the first service to go, meaning this site would go down. So that is something to change in regards to monitoring.</p>
]]></content>
		</item>
		
		<item>
			<title>Uwsgi&#43;Nginx&#43;Flask Virtualenv Mac Os X</title>
			<link>https://reinbach.com/posts/uwsgi-nginx-flask-virtualenv-mac-os-x/</link>
			<pubDate>Mon, 05 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/uwsgi-nginx-flask-virtualenv-mac-os-x/</guid>
			<description>&lt;p&gt;Ok the title is a little misleading, I did not manage to get everything happening within the virtualenv. The only part not there is nginx. I have nginx setup system wide.&lt;/p&gt;
&lt;p&gt;There was plenty of resources out there in setting up a &lt;a href=&#34;http://pypi.python.org/pypi/virtualenv&#34;&gt;virtualenv&lt;/a&gt;, so it is assumed that you have that as well as having &lt;a href=&#34;http://www.doughellmann.com/projects/virtualenvwrapper/&#34;&gt;virtualenvwrapper&lt;/a&gt; and &lt;a href=&#34;http://pypi.python.org/pypi/pip&#34;&gt;pip&lt;/a&gt; installed.&lt;/p&gt;
&lt;h1 id=&#34;create-virtualenv&#34;&gt;Create VirtualEnv&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;mkvirtualenv --no-site-packages sample
&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id=&#34;uwsgi&#34;&gt;uWSGI&lt;/h1&gt;
&lt;p&gt;Install uwsgi making use of pip, makes life nice and easy;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Ok the title is a little misleading, I did not manage to get everything happening within the virtualenv. The only part not there is nginx. I have nginx setup system wide.</p>
<p>There was plenty of resources out there in setting up a <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a>, so it is assumed that you have that as well as having <a href="http://www.doughellmann.com/projects/virtualenvwrapper/">virtualenvwrapper</a> and <a href="http://pypi.python.org/pypi/pip">pip</a> installed.</p>
<h1 id="create-virtualenv">Create VirtualEnv</h1>
<pre><code>mkvirtualenv --no-site-packages sample
</code></pre>
<h1 id="uwsgi">uWSGI</h1>
<p>Install uwsgi making use of pip, makes life nice and easy;</p>
<pre><code>pip install http://projects.unbit.it/downloads/uwsgi-latest.tar.gz
</code></pre>
<h1 id="nginx">nginx</h1>
<p>Now we need to break out our compiling chops to install <a href="http://nginx.org/">nginx</a>. You can find the latest version on the <a href="http://nginx.org/en/download.html">download page</a>
I downloaded version 1.1.2 and untar&rsquo;d it all through the browser. Next thing is in the terminal head on over to the untar&rsquo;d dir</p>
<pre><code>cd ~/Downloads/nginx-1.1.2
./configure --prefix=/usr/local/ --with-http_ssl_module
make
sudo make install
</code></pre>
<p>I added the &ndash;with-http_ssl_module config option as I am expecting to do some SSL work on my projects. This sample does not make use of it at all. You no longer have to add the &ndash;add-module=../uwsgi/nginx/ config option as nginx automatically includes that now.</p>
<p>Next you need to configure the nginx config files. I made use of the sites-available sites-enabled dir structure to manage the various configured local sites.</p>
<pre><code>cd /usr/local
make nginx
cd  nginx
mkdir sites-available sites-enabled
touch sites-available/sample
ln -s sites-available sites-enabled/sample
</code></pre>
<p>We need to tell nginx to make use of the config files placed in these directories and we do that by adding the following line;</p>
<pre><code>include /usr/local/nginx/sites-enabled/*;
</code></pre>
<p>Right before the last } in the /usr/local/conf/nginx.conf file.</p>
<p>Now we can add the various nginx config files per website/project. You can use the following template as a starting point. It should get you up and running at least. Add this to the sites-available/sample file.</p>
<pre><code>server {
    listen 5001;
    server_name localhost;
    set $home /virtualenv/sample/hello;
    access_log /virtualenv/sample/hello/logs/nginx/access.log;
    error_log /virtualenv/sample/hello/logs/nginx/error.log;

    rewrite ^/(.*)/favicon.ico$ /static/images/favicon.ico last;

    location / {
        uwsgi_pass localhost:3031;
        include uwsgi_params;
        uwsgi_param USWGI_CHDIR $home/deploy;
        uwsgi_param USWGI_INI deploy;
        root $home;
    }
    location /static/ {
        root $home;
        autoindex on;
        error_page 404 = &quot;404&quot;;
    }
}
</code></pre>
<p>The &ldquo;hello&rdquo; part is our expected sample flask project we are going to create. And &ldquo;deploy&rdquo; refers to dir/files we are going to create in the &ldquo;hello&rdquo; project. I also added the rewrite rule as that helps prevent the logging of 404 attempts on the favicon which is always asked for by modern browsers nowadays.</p>
<h1 id="flask">Flask</h1>
<p>Head back to your virtulenv and keep the love going with pip to install Flask;</p>
<pre><code>workon sample
pip install flask
</code></pre>
<p>We now create the hello world sample project</p>
<pre><code>mkdir hello
cd hello
touch deploy/deploy.ini
</code></pre>
<p>Now edit the deploy.ini file and add the following to it.</p>
<pre><code>[uwsgi]
socket = 127.0.0.1:3031
processes = 2
virtualenv = /virtualenv/sample/
module = myapp
callable = app
touch-reload = /virtualenv/sample/hello/
</code></pre>
<p>The touch-reload option is nice for dev, but not a good idea for production systems. In that anytime a file is touched with in the hello dir uwsgi will reload the changes. Saves you having to restart the uwsgi service.
The &ldquo;myapp&rdquo; module and &ldquo;app&rdquo; callable relates to the app we are yet to create.</p>
<p>Ok finally to the creating of the sample app. Create a myapp.py file in the hello dir and add the simple hello world flask example;</p>
<pre><code>from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return &quot;Hello World!&quot;

if __name__ == '__main__':
    app.run()
</code></pre>
<p>We should now be all set to start up the processes and test it out.</p>
<pre><code>uwsgi --ini deploy/deploy.ini
/usr/local/sbin/nginx
</code></pre>
<p>Fire up the browser and point it to http://localhost:5001. Hopefully you get the &ldquo;hello world!&rdquo; message in your browser.</p>
<p>If you need to stop nginx or reload changes you can do the following;</p>
<pre><code>/usr/local/sbin/nginx -s reload
/usr/local/sbin/nginx -s stop
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>Zeromq</title>
			<link>https://reinbach.com/posts/zeromq/</link>
			<pubDate>Sat, 03 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/zeromq/</guid>
			<description>&lt;p&gt;&lt;a href=&#34;http://www.zeromq.org/&#34;&gt;ZeroMQ&lt;/a&gt; is a messaging layer that is blazingly fast. There is a great &lt;a href=&#34;http://nichol.as/zeromq-an-introduction&#34;&gt;intro to zeromq&lt;/a&gt; by &lt;a href=&#34;http://nichol.as/&#34;&gt;Nicholas Piël&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been needing to get some decent messaging layer in place and so I decided to try zeromq out.&lt;/p&gt;
&lt;p&gt;Grabbed the latest version (currently &lt;a href=&#34;http://download.zeromq.org/zeromq-2.1.9.tar.gz&#34;&gt;2.1.9&lt;/a&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /path/to/downloaded/zeromq-2.1.9
./configure --prefix=/usr/local
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then because I make use of virtualenv, I wanted to install the pyzmq libs in the specific virtualenv I was working on. First I downloaded the pyzmq lib (currently &lt;a href=&#34;https://github.com/zeromq/pyzmq/downloads/pyzmq-2.1.9.tar.gz&#34;&gt;2.1.9&lt;/a&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p><a href="http://www.zeromq.org/">ZeroMQ</a> is a messaging layer that is blazingly fast. There is a great <a href="http://nichol.as/zeromq-an-introduction">intro to zeromq</a> by <a href="http://nichol.as/">Nicholas Piël</a>.</p>
<p>I&rsquo;ve been needing to get some decent messaging layer in place and so I decided to try zeromq out.</p>
<p>Grabbed the latest version (currently <a href="http://download.zeromq.org/zeromq-2.1.9.tar.gz">2.1.9</a>)</p>
<pre><code>cd /path/to/downloaded/zeromq-2.1.9
./configure --prefix=/usr/local
make
sudo make install
</code></pre>
<p>Then because I make use of virtualenv, I wanted to install the pyzmq libs in the specific virtualenv I was working on. First I downloaded the pyzmq lib (currently <a href="https://github.com/zeromq/pyzmq/downloads/pyzmq-2.1.9.tar.gz">2.1.9</a></p>
<pre><code>source /path/to/virtualenv/bin/activate
cd /path/to/downloaded/pyzmq-2.1.9
python setup.py  configure --zmq=/usr/local
python setup.py install
</code></pre>
<p>And just to confirm that all is well, you can do the following;</p>
<pre><code>python -c &quot;import zmq&quot;
</code></pre>
<p>If you get no errors you&rsquo;re golden.</p>
<p>Now onto the  <a href="http://zguide.zeromq.org/page:all">ZeroMQ Guide</a>. It is a pretty lengthy endeavor, but there are loads of great sample code in many different languages. The <a href="https://github.com/imatix/zguide">guide and sample code</a>, can also be accessed from GitHub.</p>
]]></content>
		</item>
		
		<item>
			<title>Gevent</title>
			<link>https://reinbach.com/posts/gevent/</link>
			<pubDate>Fri, 02 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/gevent/</guid>
			<description>&lt;p&gt;Playing around with &lt;a href=&#34;http://www.gevent.org/&#34;&gt;gevents&lt;/a&gt;. Easily enough installed/setup. First you need the &lt;a href=&#34;http://monkey.org/~provos/libevent/&#34;&gt;libevent&lt;/a&gt; requirements installed. I downloaded 2.0.13 and did the following;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./configure --prefix=/usr/local
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There after you can use pip to finish up installing the rest of the requirements and gevent itself&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pip install greenlet
pip install gevent
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A quick test to make sure you&amp;rsquo;re all set;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python
import gevent
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That&amp;rsquo;s it. You&amp;rsquo;re ready to play.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Playing around with <a href="http://www.gevent.org/">gevents</a>. Easily enough installed/setup. First you need the <a href="http://monkey.org/~provos/libevent/">libevent</a> requirements installed. I downloaded 2.0.13 and did the following;</p>
<pre><code>./configure --prefix=/usr/local
make
sudo make install
</code></pre>
<p>There after you can use pip to finish up installing the rest of the requirements and gevent itself</p>
<pre><code>pip install greenlet
pip install gevent
</code></pre>
<p>A quick test to make sure you&rsquo;re all set;</p>
<pre><code>python
import gevent
</code></pre>
<p>That&rsquo;s it. You&rsquo;re ready to play.</p>
]]></content>
		</item>
		
		<item>
			<title>Mongodb</title>
			<link>https://reinbach.com/posts/mongodb/</link>
			<pubDate>Fri, 02 Sep 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/mongodb/</guid>
			<description>&lt;p&gt;At CashStar we have make use of MySQL, and for a number of our applications we have some sort of configuration method/system. Sadly due to the rapid development we have been doing, these various applications each have their own method/system of implementing configuration options for the application.&lt;/p&gt;
&lt;p&gt;Lately I have been thinking of various ways to have a central configuration system for all our applications. A couple of the developers are working on a configuration service and are mainly looking at solving the requirements of the buy system first. They are going with the default key/value relationship and shouldn&amp;rsquo;t have much of an issue with that. This is an improvement to what the buy system had before, which did not scale well. But they are sticking with MySQL and I don&amp;rsquo;t think they are even thinking of other db options.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>At CashStar we have make use of MySQL, and for a number of our applications we have some sort of configuration method/system. Sadly due to the rapid development we have been doing, these various applications each have their own method/system of implementing configuration options for the application.</p>
<p>Lately I have been thinking of various ways to have a central configuration system for all our applications. A couple of the developers are working on a configuration service and are mainly looking at solving the requirements of the buy system first. They are going with the default key/value relationship and shouldn&rsquo;t have much of an issue with that. This is an improvement to what the buy system had before, which did not scale well. But they are sticking with MySQL and I don&rsquo;t think they are even thinking of other db options.</p>
<p>I like the idea of databases like <a href="http://www.mongodb.org/">MongoDB</a> and how they store the data in a sort of document manner per key. I&rsquo;m probably describing that badly. But the point being in old relationship terms, is that you can have any fields/columns for each record. So you don&rsquo;t have migration issues when a new field is needing to be added.</p>
<p>The other way you can go and I think the developers are heading this way is to go with a straight key/value relationship, but that does not seem like it will be clean, especially when you go to multiple levels in the key/value relationships. Anyway this is a long way of me saying that I started looking at MongoDB, as I have heard a good amount about it and have always been wanting to try it out and see if it would work as I expected/hoped.</p>
<p>First impressions are good with it in that it was an absolute breeze to setup and get going with it. Granted just been using the javascript terminal to run the usual simple queries and get a feel for it. But man oh man,</p>
<ul>
<li>download</li>
<li>untar</li>
<li>create dir (/data/db)</li>
<li>run mongod</li>
</ul>
<p>and mongo db instance is running and waiting for connections. Granted this is locally and no replication etc etc happening as yet. Still need to work my way through all that to understand it better. But so far am liking it and thinking this may be a good start.</p>
<p>Next I want to setup up a simple web application and connect with it and maybe work on a simple configuration type app.</p>
]]></content>
		</item>
		
		<item>
			<title>Flask</title>
			<link>https://reinbach.com/posts/flask/</link>
			<pubDate>Mon, 22 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/flask/</guid>
			<description>&lt;p&gt;So lately I have been bouncing around various Python web frameworks and each have their pros and cons. Some are applicable to the environment that you are working on eg: Tipfy, webapp2 were developed to be used on AppEngine. You can use these on other platforms, and there is documentation on how to do that.&lt;/p&gt;
&lt;p&gt;For the last couple of years I have been using Django, which is a very nice framework and it has all the bells and whistles. I&amp;rsquo;m very comfortable with it and can get things done quickly on it.  But since I started playing with the AppEngine platform and developing a web application that used Django on AppEngine, I felt it was bloated and slow to start up. Ok granted Django, is not the best framework to use on AppEngine, although there is now django-nosql project in the works. So that got me looking at other Python web frameworks which has taken me from tipfy to webapp2. Both excellent frameworks that work well on AppEngine.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>So lately I have been bouncing around various Python web frameworks and each have their pros and cons. Some are applicable to the environment that you are working on eg: Tipfy, webapp2 were developed to be used on AppEngine. You can use these on other platforms, and there is documentation on how to do that.</p>
<p>For the last couple of years I have been using Django, which is a very nice framework and it has all the bells and whistles. I&rsquo;m very comfortable with it and can get things done quickly on it.  But since I started playing with the AppEngine platform and developing a web application that used Django on AppEngine, I felt it was bloated and slow to start up. Ok granted Django, is not the best framework to use on AppEngine, although there is now django-nosql project in the works. So that got me looking at other Python web frameworks which has taken me from tipfy to webapp2. Both excellent frameworks that work well on AppEngine.</p>
<p>Now working on other platforms I am wondering about the other frameworks I have come across and trying them out. Flask being the latest. I like the documentation, which is extensive and am busy working through the nuances of the framework.</p>
<p>It is takes no effort to get coding simple applications. Busy looking at the effort to work on larger applications. There is documentation about this and for me the best way to work it out is to try it out. So once I have finished going through the documentation I&rsquo;ll develop a web application using Flask.</p>
<p>The beauty of Flask for me, is that it is very lightweight but has the basic parts one needs. It is based on <a href="werkzeug">http://werkzeug.pocoo.org/</a> which is a WSGI utility library. It also makes use of Jinja2 by default for templating purposes, which suits me perfectly.</p>
]]></content>
		</item>
		
		<item>
			<title>Reportlab Colors</title>
			<link>https://reinbach.com/posts/reportlab-colors/</link>
			<pubDate>Fri, 19 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/reportlab-colors/</guid>
			<description>&lt;p&gt;I was working on generating PDFs using ReportLab today, and I was wanting to change the background and text color of a few cells within a table.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;data = [
    [total_due, total_amount, &#39;&#39;, &#39;BRAND&#39;, merchant],
    [&#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;DATE&#39;, datetime.date.today().strftime(&amp;quot;%m/%d/%Y&amp;quot;)],
    [&#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;ORDER NUMBER&#39;, order.order.order_number],
]
t = Table(data, style=[
    # left side
    (&#39;GRID&#39;, (0, 0), (1, -1), 0.5, colors.black),
    (&#39;BACKGROUND&#39;, (0, 0), (0, -1), HIGHLIGHT_BACKGROUND_COLOR),
    (&#39;TEXTCOLOR&#39;, (0, 0), (0, -1), HIGHLIGHT_TEXT_COLOR),
    (&#39;ALIGN&#39;, (0, 0), (-2, -1), &#39;RIGHT&#39;),
    (&#39;VALIGN&#39;, (0, 0), (-2, -2), &#39;MIDDLE&#39;),
    (&#39;SPAN&#39;, (0, 0), (0, -1)),
    (&#39;SPAN&#39;, (1, 0), (1, -1)),
    # right side
    (&#39;GRID&#39;, (-2, 0), (-1, -1), 0.5, colors.black),
    (&#39;BACKGROUND&#39;, (-2, 0), (-2, -1), HIGHLIGHT_BACKGROUND_COLOR),
    (&#39;TEXTCOLOR&#39;, (-2, 0), (-2, -1), HIGHLIGHT_TEXT_COLOR),
])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the above the &amp;rsquo;total_due&amp;rsquo; value appears in the first cell of the table and I was wanting the first &amp;lsquo;TEXTCOLOR&amp;rsquo; assignment to change the text color of that cell. Like it was for the second &amp;lsquo;TEXTCOLOR&amp;rsquo; assignment.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I was working on generating PDFs using ReportLab today, and I was wanting to change the background and text color of a few cells within a table.</p>
<pre><code>data = [
    [total_due, total_amount, '', 'BRAND', merchant],
    ['', '', '', 'DATE', datetime.date.today().strftime(&quot;%m/%d/%Y&quot;)],
    ['', '', '', 'ORDER NUMBER', order.order.order_number],
]
t = Table(data, style=[
    # left side
    ('GRID', (0, 0), (1, -1), 0.5, colors.black),
    ('BACKGROUND', (0, 0), (0, -1), HIGHLIGHT_BACKGROUND_COLOR),
    ('TEXTCOLOR', (0, 0), (0, -1), HIGHLIGHT_TEXT_COLOR),
    ('ALIGN', (0, 0), (-2, -1), 'RIGHT'),
    ('VALIGN', (0, 0), (-2, -2), 'MIDDLE'),
    ('SPAN', (0, 0), (0, -1)),
    ('SPAN', (1, 0), (1, -1)),
    # right side
    ('GRID', (-2, 0), (-1, -1), 0.5, colors.black),
    ('BACKGROUND', (-2, 0), (-2, -1), HIGHLIGHT_BACKGROUND_COLOR),
    ('TEXTCOLOR', (-2, 0), (-2, -1), HIGHLIGHT_TEXT_COLOR),
])
</code></pre>
<p>In the above the &rsquo;total_due&rsquo; value appears in the first cell of the table and I was wanting the first &lsquo;TEXTCOLOR&rsquo; assignment to change the text color of that cell. Like it was for the second &lsquo;TEXTCOLOR&rsquo; assignment.</p>
<p>The second assignment was working and setting the text color correctly, but not the first. WTF!</p>
<p>It finally dawned on me to see where/how &rsquo;total_due&rsquo; was being set, and that pretty much solved it. As it was being set with the following;</p>
<pre><code>total_due = Paragraph(&quot;TOTAL DUE&quot;, styles['Right-Bold'])
</code></pre>
<p>So style[&lsquo;Right-Bold&rsquo;] had a textColor attribute, so setting that to the color I wanted and we were good.</p>
<pre><code>styles['Right-Bold'].textColor = colors.HexColor('#1b78d5')
</code></pre>
]]></content>
		</item>
		
		<item>
			<title>Webpy</title>
			<link>https://reinbach.com/posts/webpy/</link>
			<pubDate>Tue, 16 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/webpy/</guid>
			<description>&lt;p&gt;Still on my whirl wind tour of python web frameworks, picking a few that catch my eye and playing around with them. Mainly trying out their tutorials that they have and if it interests me, going ahead and developing an actual web application for them.&lt;/p&gt;
&lt;p&gt;The latest one I am playing around with at the moment is &lt;a href=&#34;http://webpy.org/&#34;&gt;web.py&lt;/a&gt;. It appears simple enough, but crikey does it pack a lot. Webpy is capable of handling decent loads (used by reddit.com) and generally you would expect it to be bare bones. But not webpy you get form handling, it almost builds APIs for you out of the box and on top of it all it has a templating engine as well called Templetor.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Still on my whirl wind tour of python web frameworks, picking a few that catch my eye and playing around with them. Mainly trying out their tutorials that they have and if it interests me, going ahead and developing an actual web application for them.</p>
<p>The latest one I am playing around with at the moment is <a href="http://webpy.org/">web.py</a>. It appears simple enough, but crikey does it pack a lot. Webpy is capable of handling decent loads (used by reddit.com) and generally you would expect it to be bare bones. But not webpy you get form handling, it almost builds APIs for you out of the box and on top of it all it has a templating engine as well called Templetor.</p>
<p>Granted the templating is completely different to what I am used to. Mainly used to Django, Jinja2 which are both very similar to each other and Cheetah or ZPL which are XML based structure. You also have the option of using another templating engine and there are simple hooks in place already to make use of Jinja2 and others.</p>
<p>I&rsquo;ve just gone through the documentation and it appears that it hits all the necessary points. Obviously using it in a complete web application would give a clearer idea.</p>
<p>The few things that I see lacking;</p>
<ul>
<li>
<p>Is a messaging wrapper, and this is just me being really lazy. It would be simple enough to write as a sessions storage mechanism is available.</p>
</li>
<li>
<p>Is reverse lookup of routes. I am used to other frameworks that allow you to name the url path , and can then use the name instead of &ldquo;hardcoding&rdquo; the path in templates or reverse lookup the name to get the actual url path. Makes for easy development, but may not be good philosophically.</p>
</li>
</ul>
<p>I also like that the documentation mainly goes about explaining how to solve issues.</p>
]]></content>
		</item>
		
		<item>
			<title>Sd-Postgresql</title>
			<link>https://reinbach.com/posts/sd-postgresql/</link>
			<pubDate>Mon, 15 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/sd-postgresql/</guid>
			<description>&lt;p&gt;Over the weekend I installed the monitoring service provided by ServerDensity, and was very impressed with how simple it was to install and get up and running.
They monitor a number of services, including databases like MySQL, MongoDB etc, but not PostgreSQL. So seeing that they have a plugin framework and I have a PostgreSQL instance running on my servers, I thought I would look into writing a plugin for it.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Over the weekend I installed the monitoring service provided by ServerDensity, and was very impressed with how simple it was to install and get up and running.
They monitor a number of services, including databases like MySQL, MongoDB etc, but not PostgreSQL. So seeing that they have a plugin framework and I have a PostgreSQL instance running on my servers, I thought I would look into writing a plugin for it.</p>
<p><a href="https://github.com/reinbach/sd-postgresql">https://github.com/reinbach/sd-postgresql</a></p>
]]></content>
		</item>
		
		<item>
			<title>Appengine File Parsing Slow?</title>
			<link>https://reinbach.com/posts/appengine-file-parsing-slow/</link>
			<pubDate>Sat, 13 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/appengine-file-parsing-slow/</guid>
			<description>&lt;p&gt;I am working on a web application project that needs to handle an xls file that has a little over 8 thousand products in it. I started off developing this project on the app engine platform making use of webapp2 for the framework.&lt;/p&gt;
&lt;p&gt;But when I got to the part of uploading the file and having to parse it, making use of xlrd to read the file etc, everything just seemed incredibly slow. So first thoughts were that I was doing something wrong, that my code was bad and needed to be optimized. Even though this was code that I had used in a very similar scenario to parse thousand line files and dump the data in a database.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I am working on a web application project that needs to handle an xls file that has a little over 8 thousand products in it. I started off developing this project on the app engine platform making use of webapp2 for the framework.</p>
<p>But when I got to the part of uploading the file and having to parse it, making use of xlrd to read the file etc, everything just seemed incredibly slow. So first thoughts were that I was doing something wrong, that my code was bad and needed to be optimized. Even though this was code that I had used in a very similar scenario to parse thousand line files and dump the data in a database.</p>
<p>This is not a very large dataset at all. So after digging around and looking for all the dos and dont&rsquo;s, making use of batch querying etc. I still was not having much luck with speed. So this has me a little concerned about the app engine platform. Not wanting to spend too much time trying to optimize this like crazy at such an early point of the development cycle. I really just want to get this web app up and running as a prototype, I jumped back to using my good ol faithful postgres.</p>
<p>The main difference in the way/manner I was working with the file on the app engine platform was to pass the contents to the xlrd reader, instead of usually passing in the filename/path and letting it open the file. The file was only 3.7MB, so that may have been an issue. Also I could have made use of the BlogStore, maybe that would have been a better angle on handling the file upload/parsing.</p>
<p>I&rsquo;m sure there is something I can do better on the app engine platform to make this a lot speedier, will just need to hunt down what that is. For now I&rsquo;m plugging away and happy as a clam with postgres.</p>
]]></content>
		</item>
		
		<item>
			<title>Jinja2</title>
			<link>https://reinbach.com/posts/jinja2/</link>
			<pubDate>Fri, 12 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jinja2/</guid>
			<description>&lt;p&gt;&lt;a href=&#34;http://jinja.pocoo.org/&#34;&gt;Jinja2&lt;/a&gt; is now my template engine of choice. I have been using django templates with django for a couple of years now and am very comfortable with them, but have been missing a few things with it more and more. Just not powerful enough. Well missing somethings that would be cool and helpful.&lt;/p&gt;
&lt;p&gt;Jinja2 has solved some of these issues for me. Definitely have not had the chance to use it as much as I would like. Still on Django templates at CashStar, but everything else I am now using Jinja2. Slowly prepping CashStar to move to Jinja2. Probably the main issues in that it would probably be the most time consuming part of the transition is the use of &amp;lsquo;-&amp;rsquo; within blocknames.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p><a href="http://jinja.pocoo.org/">Jinja2</a> is now my template engine of choice. I have been using django templates with django for a couple of years now and am very comfortable with them, but have been missing a few things with it more and more. Just not powerful enough. Well missing somethings that would be cool and helpful.</p>
<p>Jinja2 has solved some of these issues for me. Definitely have not had the chance to use it as much as I would like. Still on Django templates at CashStar, but everything else I am now using Jinja2. Slowly prepping CashStar to move to Jinja2. Probably the main issues in that it would probably be the most time consuming part of the transition is the use of &lsquo;-&rsquo; within blocknames.</p>
<pre><code>{% block page-js %}
</code></pre>
<p>works fine in Django, but is an issue in Jinja2, so have slowly been updating our templates to make use of &lsquo;_&rsquo; rather.</p>
<p>A couple of the neat and helpful features in Jinja2 is being able to set a variable in the child template, which is then available in the parent template. The template you are extending. Actually there are quite a few neat things, besides the more powerful features of it. Best thing is to have a look at their <a href="http://jinja.pocoo.org/docs/">documentation</a></p>
]]></content>
		</item>
		
		<item>
			<title>Webapp2</title>
			<link>https://reinbach.com/posts/webapp2/</link>
			<pubDate>Fri, 12 Aug 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/webapp2/</guid>
			<description>&lt;p&gt;I have moved from tipfy to webapp2 for appengine projects. Both of these frameworks are created/maintained by Rodrigo Moraes, who in my mind appears to be a super hero, in churning out a couple of very decent frameworks. I ended up with webapp2 and that is what is recommended. tipfy just went through a large update and a lot of things changed.&lt;/p&gt;
&lt;p&gt;webapp2 is super easy to setup, it is a single file and pretty much extends webapp. Include the extras, through in a couple of libs (eg Jinja2) and you are good to go. All the functionality you need to get going developing a half decent web application on app engine.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have moved from tipfy to webapp2 for appengine projects. Both of these frameworks are created/maintained by Rodrigo Moraes, who in my mind appears to be a super hero, in churning out a couple of very decent frameworks. I ended up with webapp2 and that is what is recommended. tipfy just went through a large update and a lot of things changed.</p>
<p>webapp2 is super easy to setup, it is a single file and pretty much extends webapp. Include the extras, through in a couple of libs (eg Jinja2) and you are good to go. All the functionality you need to get going developing a half decent web application on app engine.</p>
]]></content>
		</item>
		
		<item>
			<title>Kid Vm</title>
			<link>https://reinbach.com/posts/kid-vm/</link>
			<pubDate>Thu, 14 Apr 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/kid-vm/</guid>
			<description>&lt;p&gt;Just pushed out a new appengine application. I needed a way to track the kids allowances as I never have cash on me. So I put together &lt;a href=&#34;http://kidvm-app.appspot.com&#34;&gt;Kid VM&lt;/a&gt;, which allows you to;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;add kids&lt;/li&gt;
&lt;li&gt;add allowances for the kids&lt;/li&gt;
&lt;li&gt;add transactions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The system will automatically track/calculate the balance. A cron runs daily and creates a transaction for those allowances that are due that day.&lt;/p&gt;
&lt;p&gt;Still a little rough, need to add some pretty graphs and clean up the app in a general sense. But it is working and now I can track the kids allowances.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just pushed out a new appengine application. I needed a way to track the kids allowances as I never have cash on me. So I put together <a href="http://kidvm-app.appspot.com">Kid VM</a>, which allows you to;</p>
<ul>
<li>add kids</li>
<li>add allowances for the kids</li>
<li>add transactions</li>
</ul>
<p>The system will automatically track/calculate the balance. A cron runs daily and creates a transaction for those allowances that are due that day.</p>
<p>Still a little rough, need to add some pretty graphs and clean up the app in a general sense. But it is working and now I can track the kids allowances.</p>
<p>I made use of tipfy for the framework and did a bunch of unit testing on the models. Very happy with the framework and will continue using it for appengine applications.</p>
]]></content>
		</item>
		
		<item>
			<title>Mac Os X Virtualenv Python 32/64Bit</title>
			<link>https://reinbach.com/posts/mac-os-x-virtualenv-python-3264bit/</link>
			<pubDate>Tue, 22 Feb 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/mac-os-x-virtualenv-python-3264bit/</guid>
			<description>&lt;p&gt;I&amp;rsquo;ve been using virutalenv for a long time now for development purposes and it works extremely well.&lt;/p&gt;
&lt;p&gt;Although lately I have run into some issues with trying to work with trying to run python as 32bit in one environment and 64bit in another. I must say it is all completely crazy trying to keep this all together, especially when you need to have other applications running at a specific architecture as well.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I&rsquo;ve been using virutalenv for a long time now for development purposes and it works extremely well.</p>
<p>Although lately I have run into some issues with trying to work with trying to run python as 32bit in one environment and 64bit in another. I must say it is all completely crazy trying to keep this all together, especially when you need to have other applications running at a specific architecture as well.</p>
<p>I had MySQL installed at 64bit with MySQL-python and all was working well with the virtualenv that had python at 64bit. But now I had to change python to 32bit, and that required me to &ldquo;downgrade&rdquo; MySQL to 32bit instead.</p>
<p>On a Mac (10.6) it is simple enough to switch between 32 and 64it and visa versa with the following commands</p>
<pre><code>For 64bit
defaults write com.apple.versioner.python Prefer-32-Bit -bool no


For 32bit
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
</code></pre>
<p>But sadly those do not affect the virtualenv, in order to modify the virtualenv python you need to do the following;</p>
<pre><code>$ lipo -info /Users/cogg/.virtualenvs/tweakeats/bin/python
Architectures in the fat file: /Users/cogg/.virtualenvs/tweakeats/bin/python are: x86_64 i386 ppc7400
$ mv /Users/cogg/.virtualenvs/tweakeats/bin/python /Users/cogg/.virtualenvs/tweakeats/bin/python.old
$ lipo -remove x86_64 /Users/cogg/.virtualenvs/tweakeats/bin/python.old -output /Users/cogg/.virtualenvs/tweakeats/bin/python
$ python
[...]
&gt;&gt;&gt; import sys
&gt;&gt;&gt; sys.maxint
2147483647
</code></pre>
<p>That was found on <a href="http://stackoverflow.com/questions/2088569/how-do-i-force-python-to-be-32-bit-on-snow-leopard-and-other-32-bit-64-bit-questi">stackoverflow</a></p>
]]></content>
		</item>
		
		<item>
			<title>Noxls - Django Appengine</title>
			<link>https://reinbach.com/posts/noxls-django-appengine/</link>
			<pubDate>Sun, 06 Feb 2011 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/noxls-django-appengine/</guid>
			<description>&lt;p&gt;Developed a base system/framework that makes use of Django on AppEngine. The system integrates with CheddarGetter for payment gateway. The nice part about the framework is that it is a base for a Saas System. I do not need to worry about getting the base in place each time, I can started on the meat of the Saas system, and not have to redo the base each time.&lt;/p&gt;
&lt;p&gt;The base system handles has the following features;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Developed a base system/framework that makes use of Django on AppEngine. The system integrates with CheddarGetter for payment gateway. The nice part about the framework is that it is a base for a Saas System. I do not need to worry about getting the base in place each time, I can started on the meat of the Saas system, and not have to redo the base each time.</p>
<p>The base system handles has the following features;</p>
<ul>
<li>Ties up with the account/product levels created on CheddarGetter</li>
<li>Account Management</li>
<li>Handle Upgrading/Degrading account levels</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
<li>Plan and Pricing</li>
<li>Signup</li>
</ul>
<p>There are a number of features and probably a few bugs that still need to be sorted out. It is a start and hopefully it will grow from here. Currently this base is being used on the <a href="http://www.noxls.com">http://www.noxls.com</a> site</p>
]]></content>
		</item>
		
		<item>
			<title>Facebook Fiasco</title>
			<link>https://reinbach.com/posts/facebook-fiasco/</link>
			<pubDate>Mon, 29 Nov 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/facebook-fiasco/</guid>
			<description>&lt;p&gt;At work I had to extend our eGift Card purchasing process to handle Facebook Connect, which was to allow the purchaser to select the recipient of the eGift Card from their list of friends on Facebook and then to deliver the eGift Card to the friend via a Facebook wall posting.&lt;/p&gt;
&lt;p&gt;Well the whole exercise was very interesting to say the least. The whole Facebook development framework leaves a lot to be desired. There are a couple of issues that we just could not get around, mainly to do with SSL and Facebook really not handling that environment very well. The support is limited and misleading in places. No need to analyze this to death as it has been done plenty elsewhere by more informed people.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>At work I had to extend our eGift Card purchasing process to handle Facebook Connect, which was to allow the purchaser to select the recipient of the eGift Card from their list of friends on Facebook and then to deliver the eGift Card to the friend via a Facebook wall posting.</p>
<p>Well the whole exercise was very interesting to say the least. The whole Facebook development framework leaves a lot to be desired. There are a couple of issues that we just could not get around, mainly to do with SSL and Facebook really not handling that environment very well. The support is limited and misleading in places. No need to analyze this to death as it has been done plenty elsewhere by more informed people.</p>
<p>The cherry on the cake for me, was that the day we went live with our updated process, Facebook tanked and was out for a few hours. So that provided some exciting moments there. We now have a system wide kill switch for Facebook, which allows us to turn off any interaction we have with Facebook from the Connect functionality to the Like buttons.</p>
<p>Sadly they are the 800 lb gorilla and you have to work with what they give you. I ended up using a few of their APIs in implementing this all, which included the Javascript API, their new Graph API and the old Rest API. It would just be nice if they really tightened up their APIs.</p>
]]></content>
		</item>
		
		<item>
			<title>Ethan The Critic</title>
			<link>https://reinbach.com/posts/ethan-critic/</link>
			<pubDate>Fri, 07 May 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/ethan-critic/</guid>
			<description>&lt;p&gt;Continuing with my learning of AppEngine and all it&amp;rsquo;s goodness. I created a Critic&amp;rsquo;s Website and called it &lt;a href=&#34;http://ethanthecritic.appspot.com&#34;&gt;Ethan the Critic&lt;/a&gt;. Very original as being a critic is something that Ethan wants to do and so here is his outlet in fulfilling his dream.&lt;/p&gt;
&lt;p&gt;The reviews have a rating, the ability to upload an image of the item/product being reviewed and are categorized.  A complete admin section was created to help ease with the maintenance of the reviews and the site.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Continuing with my learning of AppEngine and all it&rsquo;s goodness. I created a Critic&rsquo;s Website and called it <a href="http://ethanthecritic.appspot.com">Ethan the Critic</a>. Very original as being a critic is something that Ethan wants to do and so here is his outlet in fulfilling his dream.</p>
<p>The reviews have a rating, the ability to upload an image of the item/product being reviewed and are categorized.  A complete admin section was created to help ease with the maintenance of the reviews and the site.</p>
<p>In developing the site I stuck with the original framework and believe I got a good understanding of it and how it works. I did miss some of the form functionality and the url management that comes with Django. Future AppEngine development will probably make use of the Django framework as a layer on the AppEngine framework, and I think I will get the best of both worlds.</p>
<p>You can&rsquo;t beat the release process through the GoogleAppEngineLauncher, easy and straight forward. Although with the use of fabric on my other projects of late, I am not having any issue releasing to my own servers. Just a simple call. So I guess that is a moot point now.</p>
<p>So all in all good to get the initial project completed for a new framework/system and all the better that I still think the framework/system is solid and worth developing future projects on.</p>
]]></content>
		</item>
		
		<item>
			<title>Emacs My One True Friend</title>
			<link>https://reinbach.com/posts/emacs-my-one-true-friend/</link>
			<pubDate>Sun, 18 Apr 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/emacs-my-one-true-friend/</guid>
			<description>&lt;p&gt;Over the years I have used a number of different text editors. At one point I was using Emacs heavily and really enjoying it as I was solely based on a Linux desktop at the time.&lt;/p&gt;
&lt;p&gt;Then the projects that I was working on grew a little in size and the files were spread out in the file system and I started to find it a little tedious to move between these far ranging directories. At the same time I moved to a Mac laptop and was finding it a little frustrating having to use the Esc key to drive the Emacs commands, never mind my absolutely in ability to understand this lisp thing and setting up my .emacs file. So I started hunting else where for a new text editor to handle my needs and settled on TextMate.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Over the years I have used a number of different text editors. At one point I was using Emacs heavily and really enjoying it as I was solely based on a Linux desktop at the time.</p>
<p>Then the projects that I was working on grew a little in size and the files were spread out in the file system and I started to find it a little tedious to move between these far ranging directories. At the same time I moved to a Mac laptop and was finding it a little frustrating having to use the Esc key to drive the Emacs commands, never mind my absolutely in ability to understand this lisp thing and setting up my .emacs file. So I started hunting else where for a new text editor to handle my needs and settled on TextMate.</p>
<p>Wow that was a really nice text editor and I was most happy. There was a couple of bugs/issues I ran into but was able to work around them. The main issue I had at first was editing remotely. I was using MacFuse at the time and there were a few instances where the file I was working on in the editor was touched/modified on the remote server and that caused all sorts of weirdness to the file in TextMate. I just ended up making sure to just code locally.</p>
<p>Although I did not always do my development on the Mac laptop. I still had my Linux desktop and so it was a bit of a pain moving back and forth between the systems and having to use a different text editor each time. I tried Geany for a while, as that gave me a file folder sidebar, and the plugins where helpful. But I never got hooked on Geany.</p>
<p>Well, lately the projects I have been working on lately have gotten huge in the number of files that they have, and TextMate was starting to have a tough time dealing with all the files. It is a known issue with textMate that it re-scans the files each time you return to TextMate. That got tiresome quickly enough. You can turn of the re-scanning, but then would I miss a file/dir change or what? I wasn&rsquo;t bothered in trying to find out.</p>
<p>So enough was enough, and I decided to try Emacs out again, there is a Mac OS X version which I downloaded and that sorted out the Esc key only issue. And a little Googling later I had installed various modes etc and my .emacs file has grown ridiculously, but I am a happy clam again.  I do not know what I was thinking or what I initially tried when I was first having issues with Emacs. It just seems this time, things clicked into place for me and I was able to find and setup decent modes.</p>
<p>Some things that I have learnt this time round, that are making my life real good, are;</p>
<ul>
<li>making use of frames. I now generally have a couple of frames open at a time</li>
<li>yasnippet</li>
<li>pareditb</li>
<li>ido-mode. Absolutely fantastic in moving around dirs, opening files.</li>
</ul>
<p>I do seem to have a better understanding of Emacs now, which is really helpful. Busy playing around with the org-mode. I have a number of feeds connected to various emac blogs.</p>
<p>Here&rsquo;s to having settled on a text editor.</p>
]]></content>
		</item>
		
		<item>
			<title>Google Appengine</title>
			<link>https://reinbach.com/posts/google-appengine/</link>
			<pubDate>Mon, 12 Apr 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/google-appengine/</guid>
			<description>&lt;p&gt;Lately I have been playing around with the Google AppEngine, and seeing how that works.&lt;/p&gt;
&lt;p&gt;I really like the idea of the system being placed in Google&amp;rsquo;s Dataservers and leveraging their infrastructure. On top of that the hosting is free if your quotas are low and so only if your site becomes popular or is heavily used do you need to pony up with the cash.&lt;/p&gt;
&lt;p&gt;To try out AppEngine I decided to write a simple Critic&amp;rsquo;s website and decided to use the &amp;ldquo;raw&amp;rdquo; AppEngine code/infrastructure. You can make use of 3rd party frameworks (eg: Django). The reason for that was just to get a good understanding of the basics and also to try something new.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Lately I have been playing around with the Google AppEngine, and seeing how that works.</p>
<p>I really like the idea of the system being placed in Google&rsquo;s Dataservers and leveraging their infrastructure. On top of that the hosting is free if your quotas are low and so only if your site becomes popular or is heavily used do you need to pony up with the cash.</p>
<p>To try out AppEngine I decided to write a simple Critic&rsquo;s website and decided to use the &ldquo;raw&rdquo; AppEngine code/infrastructure. You can make use of 3rd party frameworks (eg: Django). The reason for that was just to get a good understanding of the basics and also to try something new.</p>
<p>Well it was simple enough and had some interesting way of doing things. For example when fetching a result set you always have to put in the number of entries you want back. I can see the reason for that, and so had to change the thinking/logic in the code in regards to that.</p>
<p>When creating/setting up an AppEngine application you need to create an app.yaml file that pretty much configures the site, and there are a number of options that are available to you. I really liked this as you are able to quickly and easily require that certain files/paths require authenticated users. You also map the paths to the necessary files in one location. This worked fine in a small application, so not sure how easy it would be to maintain it, if you had a very large application.</p>
<p>I sure have grown use to having all the bells and whistles that comes with using the Django framework, so will definitely be using that in the next applications/projects. It appears that the only part you really cannot make use of is the ORM that comes with Django, as you are using the proprietary storage mechanism that AppEngine is based on. Setting up the models was not that much different from Django.</p>
<p>The parts that I really missed in this application was the urls conf functionality. I like being able to change the url mapping in once place, which can be easily changed at anytime with out having to update the code everywhere. The other part was the handling of posted forms. I have grown lazy.</p>
<p>Well all that I have left to do on this project is to template it and it should be all good to go. A very basic site, but it allowed me to play with the AppEngine functionality and go through the complete cycle.</p>
]]></content>
		</item>
		
		<item>
			<title>Fabric Nice And Soft</title>
			<link>https://reinbach.com/posts/fabric-nice-and-soft/</link>
			<pubDate>Sun, 14 Mar 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/fabric-nice-and-soft/</guid>
			<description>&lt;p&gt;Finally I got tired of the way I was doing my releases. Which involved me exporting the relevant release from the versioning system and then copying across the files to their respective places, making sure that I was placing them in the correct place. This was all done manually.&lt;/p&gt;
&lt;p&gt;Well after reading a bit about &lt;a href=&#34;http://fabfile.org&#34;&gt;Fabric&lt;/a&gt;, I decided to give it a try and am very ecstatic with it. All you need to do is create a simple fab file and call away.
The &lt;a href=&#34;http://docs.fabfile.org/0.9.0/tutorial.html&#34;&gt;Tutorial&lt;/a&gt; provided by them is straight forward.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Finally I got tired of the way I was doing my releases. Which involved me exporting the relevant release from the versioning system and then copying across the files to their respective places, making sure that I was placing them in the correct place. This was all done manually.</p>
<p>Well after reading a bit about <a href="http://fabfile.org">Fabric</a>, I decided to give it a try and am very ecstatic with it. All you need to do is create a simple fab file and call away.
The <a href="http://docs.fabfile.org/0.9.0/tutorial.html">Tutorial</a> provided by them is straight forward.</p>
<p>I did end up modifying my sites in order to further simplify the releasing of code. I was using mod_python with Apache and had the media files located in the Web Document directory, but have now implemented WSGI and now the code released is all together and there is no need to keep the media files in a different location.</p>
<p>At the moment things are a lot simpler and it is now really easy to make a release. Further enhancements that I need to do is to add auto testing of the code base and ensure all tests pass, adding checks that code is all checked in. Maybe forcing a push to the main Repo etc.</p>
<p>I also want to add Nginx to the server setup as that is meant to be a much better setup. That will probably be the next step I take in regards to the server.</p>
]]></content>
		</item>
		
		<item>
			<title>Track This</title>
			<link>https://reinbach.com/posts/track/</link>
			<pubDate>Sun, 21 Feb 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/track/</guid>
			<description>&lt;p&gt;I have just created a glorified To Do list manager for myself and added it to this site and have very creatively called it Track.&lt;/p&gt;
&lt;p&gt;There are a dime a dozen of these To Do list managers, bug/issue trackers etc out there, but I have my own special way of doing things and I did not want to change my process. So I went ahead and created Track for myself. At the moment it is nothing fancy, it just does the usual.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have just created a glorified To Do list manager for myself and added it to this site and have very creatively called it Track.</p>
<p>There are a dime a dozen of these To Do list managers, bug/issue trackers etc out there, but I have my own special way of doing things and I did not want to change my process. So I went ahead and created Track for myself. At the moment it is nothing fancy, it just does the usual.</p>
<p>Like creating/managing bugs per project. I can search on them, set milestones and assign the usual categories, priorities etc.</p>
<p>The neat thing is that it ties in with the Project section and indicates which projects are active. Well the active projects are those that have cases assigned to them that are active. Making use of the Track system will automatically keep the website up to date with the Projects I have worked on as well.</p>
]]></content>
		</item>
		
		<item>
			<title>Jolicloud On Netbook</title>
			<link>https://reinbach.com/posts/jolicloud-netbook/</link>
			<pubDate>Mon, 15 Feb 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jolicloud-netbook/</guid>
			<description>&lt;p&gt;I came across a lifehacker article &amp;ldquo;&lt;a href=&#34;http://lifehacker.com/5471394/five-best-netbook-operating-systems&#34;&gt;Five Best Netbook Operating Systems&lt;/a&gt;&amp;rdquo; and looking at the top one, it was a distro called &lt;a href=&#34;http://www.jolicloud.com/&#34;&gt;Jolicloud&lt;/a&gt; that I had not tried out before.&lt;/p&gt;
&lt;p&gt;I have a netbook that was just setting there gathering dust and since Laura was complaining about not having a laptop, and always wanting to use mine. I thought I would give the distro a try. Previously I had been using Ubuntu Eeepc version, which was kinda sluggish.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I came across a lifehacker article &ldquo;<a href="http://lifehacker.com/5471394/five-best-netbook-operating-systems">Five Best Netbook Operating Systems</a>&rdquo; and looking at the top one, it was a distro called <a href="http://www.jolicloud.com/">Jolicloud</a> that I had not tried out before.</p>
<p>I have a netbook that was just setting there gathering dust and since Laura was complaining about not having a laptop, and always wanting to use mine. I thought I would give the distro a try. Previously I had been using Ubuntu Eeepc version, which was kinda sluggish.</p>
<p>Jolicloud&rsquo;s website is very slick and helpful in getting the iso and with very clear instructions on installing it.</p>
<p>So after I figured out how to boot from the USB Stick I was up and running in no time. For some reason for my netbook to boot from the USB Stick, I need to add the USB Stick as a HD in the BIOS settings and obviously add it to the first media to boot from.</p>
<p>Jolicloud does require you to register an account with them, but this is probably due to the way they handle the managing the apps installed on your system. They do push the friends/social aspect as well, which is something I am not interested in. The other thing that I have not worked out is the lack of Flash in the browser. Looking in Synaptic it looks like the plugin is installed, but alas no luck with youtube.com etc. That is something that I need to get sorted out before Laura would even consider using the netbook as she likes her Scrabble on Facebook. The version I am using is labeled pre beta, so that could be an indicator that they are still getting things sorted out.</p>
<p>Other than the above issues this distro really does make the netbook feel a lot more responsive and usable.</p>
]]></content>
		</item>
		
		<item>
			<title>Assocbuyers Website</title>
			<link>https://reinbach.com/posts/assocbuyers-website/</link>
			<pubDate>Thu, 11 Feb 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/assocbuyers-website/</guid>
			<description>&lt;p&gt;We order from a Co-op and Laura has a tough time finding the products with the best price and determining what to order in general. Looking at their site they offered an Excel doc each month with the products. So I decided to create a website for Laura to use and maybe others would be interested in it as well.&lt;/p&gt;
&lt;p&gt;I wrote a script that parses this Excel document and puts all the products into a database. The website allows a user to search the products and if they create an account to add products to a shopping cart.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>We order from a Co-op and Laura has a tough time finding the products with the best price and determining what to order in general. Looking at their site they offered an Excel doc each month with the products. So I decided to create a website for Laura to use and maybe others would be interested in it as well.</p>
<p>I wrote a script that parses this Excel document and puts all the products into a database. The website allows a user to search the products and if they create an account to add products to a shopping cart.</p>
<p>The idea is that over time I will add more functionality, like order history etc.</p>
<p><a href="http://assocbuyer.reinbach.com">http://assocbuyer.reinbach.com</a></p>
]]></content>
		</item>
		
		<item>
			<title>Back In The Game</title>
			<link>https://reinbach.com/posts/back-game/</link>
			<pubDate>Tue, 09 Feb 2010 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/back-game/</guid>
			<description>&lt;p&gt;After a bit of a hiatus, I am back.&lt;/p&gt;
&lt;p&gt;I have a new job with &lt;a href=&#34;http://www.cashstar.com&#34;&gt;CashStar&lt;/a&gt;, developing in python (Django) and loving it. Python is always a language I have admired and wanted to develop in. Over the years I have done some small projects and scripting, but now it is full time and I feel like a real programmer now. I can&amp;rsquo;t believe they actually hired me. Through all the technical reviews I thought I crashed big time, but alas I would get called for the next round of interviews.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>After a bit of a hiatus, I am back.</p>
<p>I have a new job with <a href="http://www.cashstar.com">CashStar</a>, developing in python (Django) and loving it. Python is always a language I have admired and wanted to develop in. Over the years I have done some small projects and scripting, but now it is full time and I feel like a real programmer now. I can&rsquo;t believe they actually hired me. Through all the technical reviews I thought I crashed big time, but alas I would get called for the next round of interviews.</p>
<p>So with what I am learning and my new found programming skills. I have gone and started rewriting everything in Django. Hence this site has gone and gotten a refresh, new code base and a new look.</p>
<p>I have been quiet of late as we spent sometime on the boat and then decided to stay where we are for a while longer, so I needed to get out there and find a decent paying job as well as getting settled into the new roles.</p>
<p>Not to mention that I have been crazy busy programming and getting things done, which is always great. More to come on these projects</p>
]]></content>
		</item>
		
		<item>
			<title>Menu Item Background Fades</title>
			<link>https://reinbach.com/posts/menu-item-background-fades/</link>
			<pubDate>Wed, 30 Sep 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/menu-item-background-fades/</guid>
			<description>&lt;p&gt;A project I am working on required that the menu item&amp;rsquo;s background fade when the user mouses over it and this is my hack in achieving it.&lt;/p&gt;
&lt;p&gt;I must admit this is not the prettiest as there is some duplication of information, buy as with most projects there was a time crunch and this is what I came up with in the allocated time.&lt;/p&gt;
&lt;p&gt;First you have your usual menu code:&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A project I am working on required that the menu item&rsquo;s background fade when the user mouses over it and this is my hack in achieving it.</p>
<p>I must admit this is not the prettiest as there is some duplication of information, buy as with most projects there was a time crunch and this is what I came up with in the allocated time.</p>
<p>First you have your usual menu code:</p>
<pre><code>&lt;ul&gt;
	&lt;li&gt;
		&lt;a href=&quot;&quot;&gt;
			&lt;span class=&quot;in&quot;&gt;Home&lt;/span&gt;
			&lt;span class=&quot;out&quot;&gt;Home&lt;/span&gt;
		&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;a href=&quot;&quot;&gt;
			&lt;span class=&quot;in&quot;&gt;About&lt;/span&gt;
			&lt;span class=&quot;out&quot;&gt;About&lt;/span&gt;
		&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;a href=&quot;&quot;&gt;
			&lt;span class=&quot;in&quot;&gt;Contact&lt;/span&gt;
			&lt;span class=&quot;out&quot;&gt;Contact&lt;/span&gt;
		&lt;/a&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<p>Here you notice that I have placed 2 span tags with in the link tags, this is where it is not pretty with the duplication of the link text.</p>
<p>To this we add the necessary styling:</p>
<pre><code>ul {
	padding: 0;
	background: url('./images/background_menu.jpg') repeat-x scroll 0 0;
	height: 40px;
	position: relative;
}


ul li {
	float: left;
	list-style: none;
	padding: 0;
	margin: 0;
	line-height: 40px;
	position: relative;
}


ul li a {
	width: 100px;
	float: left;
	display: block;
	text-align: center;
}


ul li span.out {
	position: absolute;
	top: 0;
	left: 0;
	display: none;
	background: url('./images/background_menu_active.jpg') repeat-x scroll 0 0;
	width: 100px;
	float: left;
}
</code></pre>
<p>The position elements are what are critical in having this work correctly. So make sure you get those done properly.</p>
<p>Finally. to make it all work you have the javascript which makes use of jQuery:</p>
<pre><code>$(document).ready(function()
{
	$('ul li a').hover(
		function()
		{
			$(this).find(&quot;span.in&quot;).each(function(){ $(this).fadeOut('slow')});
			$(this).find(&quot;span.out&quot;).each(function(){ $(this).fadeIn('slow')});
		},
		function()
		{
			$(this).find(&quot;span.in&quot;).each(function(){ $(this).fadeIn('slow')});
			$(this).find(&quot;span.out&quot;).each(function(){ $(this).fadeOut('slow')});
		}
	);
});
</code></pre>
<p>That&rsquo;s it.</p>
]]></content>
		</item>
		
		<item>
			<title>Cms Made Simple (Cmsms)</title>
			<link>https://reinbach.com/posts/cms-made-simple/</link>
			<pubDate>Wed, 26 Aug 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/cms-made-simple/</guid>
			<description>&lt;p&gt;I was contracted to finish off and add some extra components to a website that was developed in CMS Made Simple. In the past I had come across CMSMS and looked at it.&lt;/p&gt;
&lt;p&gt;I was also not completely sold on it as a number of the templates and stylesheet code was/is stored in the database. This definitely makes it easier for the enduser to make modifications to these on the fly, but most endusers really are not interested in this and do not have the skills to, that&amp;rsquo;s why they have contracted the work out. The issue I find is that you do not have any version control of any changes to these files, you do have a log of which file was changed by who, but I do not see it providing a diff between these changes.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I was contracted to finish off and add some extra components to a website that was developed in CMS Made Simple. In the past I had come across CMSMS and looked at it.</p>
<p>I was also not completely sold on it as a number of the templates and stylesheet code was/is stored in the database. This definitely makes it easier for the enduser to make modifications to these on the fly, but most endusers really are not interested in this and do not have the skills to, that&rsquo;s why they have contracted the work out. The issue I find is that you do not have any version control of any changes to these files, you do have a log of which file was changed by who, but I do not see it providing a diff between these changes.</p>
<p>I believe that in upcoming releases they may be moving these files out of the database, so that would be an improvement to me.</p>
<p>The system definitely has a large number of modules that can be easily installed and there is a nice delivery system provided for those. Although it is hard at times to determine whether or not the module is solid and still being developed. As with most 3rd party development, the developer always starts out with good intentions, but may not complete the project.</p>
<p>All in all, once I got the understanding of the system the changes were relatively straight forward and mamaged to do what I needed to for the project.</p>
]]></content>
		</item>
		
		<item>
			<title>To Framework Or Not!</title>
			<link>https://reinbach.com/posts/to-framework-or-not/</link>
			<pubDate>Sat, 20 Jun 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/to-framework-or-not/</guid>
			<description>&lt;p&gt;I was contracted to create a feedback form for a website that allowed the client to add comments and manage the feedback. Seeing that it was a very simple project and an addition to the site, it brought up the question of whether or not one should make use of a full framework to do that. The site was made up of static pages.&lt;/p&gt;
&lt;p&gt;In the past I have always made use of a full framework to develop websites, it didn&amp;rsquo;t matter which framework, whichever was being used or developing one from scratch. This was the first time that I approached a project and wondered whether it was necessary for all those layers for something so simple.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I was contracted to create a feedback form for a website that allowed the client to add comments and manage the feedback. Seeing that it was a very simple project and an addition to the site, it brought up the question of whether or not one should make use of a full framework to do that. The site was made up of static pages.</p>
<p>In the past I have always made use of a full framework to develop websites, it didn&rsquo;t matter which framework, whichever was being used or developing one from scratch. This was the first time that I approached a project and wondered whether it was necessary for all those layers for something so simple.</p>
<p>There are the obvious pros and cons for which ever way one decides to go.</p>
<p>A full framework allows the site to grow and expand with ease, you have all the layers in place, with a good separation between them. So all in all you have a tremendous amount of flexibility. The only con really is that you have a huge base for something so small, that it almost feels like bloat.</p>
<p>Without a full framework, the cons are much greater, like no separation between layers, the need to write those if you want them etc etc. Not able to expand very easily in the future.</p>
<p>Well in the ended I decided to go with the bare minimum as an exercise to see how things worked out. It was simple enough completing the project and getting it functional. It was nice having to go back and write code that you usually just take for granted.</p>
<p>The reason I went that way, was probably the need to break out of this mold of us webheads always wanting to put in the perfect system and will handle all future possible needs of the client, doing it the so called correct way, which we think is correct and not just getting the job done. The question is, how many times have we really had to go back and expand the system. Probably a lot of times, but have we not ended up re-writing things anyway? With the latest, coolest way?</p>
]]></content>
		</item>
		
		<item>
			<title>Centos Postgres Update Chaos</title>
			<link>https://reinbach.com/posts/centos-postgres-update-chaos/</link>
			<pubDate>Wed, 03 Jun 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/centos-postgres-update-chaos/</guid>
			<description>&lt;p&gt;The other day I updated a centos server and postgres was updated in the process. I rebooted the server for all the new libraries to take effect etc, just to make sure. Well when the server rebooted all my postgres databases disppeared. Postgres started up perfectly, but not one database was there, just the default postgres databases.&lt;/p&gt;
&lt;p&gt;That freaked me out, and had me hopping for a while, trying to work out what happened. It all boiled down to the data dir changing locations!&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>The other day I updated a centos server and postgres was updated in the process. I rebooted the server for all the new libraries to take effect etc, just to make sure. Well when the server rebooted all my postgres databases disppeared. Postgres started up perfectly, but not one database was there, just the default postgres databases.</p>
<p>That freaked me out, and had me hopping for a while, trying to work out what happened. It all boiled down to the data dir changing locations!</p>
<p>The quick fix was to just copy the old data dir into the new data dir location and restart postgres. All the databases reappeared, much to my relief. It is prudent to stop postgres completely before you move the data dir.</p>
]]></content>
		</item>
		
		<item>
			<title>Zonelancer</title>
			<link>https://reinbach.com/posts/zonelancer/</link>
			<pubDate>Wed, 06 May 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/zonelancer/</guid>
			<description>&lt;p&gt;I have been working on a Joomla based project and it has just moved into Beta phase. Zonelancer is a freelancing website that brings togther freelancers and those needing freelancers.&lt;/p&gt;
&lt;p&gt;We made use of an already made module/component for Joomla and templated it. A few minor tweaks were made to the modules/components as well as a new module created to handle the stats.&lt;/p&gt;
&lt;p&gt;You can get a glimpse of the site at &lt;!-- raw HTML omitted --&gt;zonelancer.reinbach.com&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have been working on a Joomla based project and it has just moved into Beta phase. Zonelancer is a freelancing website that brings togther freelancers and those needing freelancers.</p>
<p>We made use of an already made module/component for Joomla and templated it. A few minor tweaks were made to the modules/components as well as a new module created to handle the stats.</p>
<p>You can get a glimpse of the site at <!-- raw HTML omitted -->zonelancer.reinbach.com<!-- raw HTML omitted --></p>
]]></content>
		</item>
		
		<item>
			<title>Travelzlog.Com</title>
			<link>https://reinbach.com/posts/travelzlog-com/</link>
			<pubDate>Sat, 18 Apr 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/travelzlog-com/</guid>
			<description>&lt;p&gt;I have been working on a travel blogging web application called Travelz Log [&lt;!-- raw HTML omitted --&gt;www.travelzlog.com&lt;!-- raw HTML omitted --&gt;] and it has just moved into early beta. It is still a little rough around the edges and needs quite a bit of testing still.&lt;/p&gt;
&lt;p&gt;Over the next few weeks I plan to smooth out those edges and move it out of beta. Then over time add new features to it and grow the application. There is already a fair list of enhancements that I want to do, but first want to shore up the base and make sure it is solid first.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have been working on a travel blogging web application called Travelz Log [<!-- raw HTML omitted -->www.travelzlog.com<!-- raw HTML omitted -->] and it has just moved into early beta. It is still a little rough around the edges and needs quite a bit of testing still.</p>
<p>Over the next few weeks I plan to smooth out those edges and move it out of beta. Then over time add new features to it and grow the application. There is already a fair list of enhancements that I want to do, but first want to shore up the base and make sure it is solid first.</p>
<p>I would appreciate any help in testing the application, so if you have a moment or two, please head over to <!-- raw HTML omitted --><a href="https://www.travelzlog.com">www.travelzlog.com</a><!-- raw HTML omitted --> and click around and then send me your feedback.</p>
]]></content>
		</item>
		
		<item>
			<title>Joomla Digg Component</title>
			<link>https://reinbach.com/posts/joomla-digg-component/</link>
			<pubDate>Mon, 06 Apr 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/joomla-digg-component/</guid>
			<description>&lt;p&gt;Just completed a joomla component that is based on the Digg idea. It allows the posting of content which is then voted on by users. The postings can be voted upwards or downwards and marked as spam. There are 2 levels are categories for the postings to be categorized.&lt;/p&gt;
&lt;p&gt;In the admin section the admin user has a configuration section where they can setup automatic levels for the postings to appear on the home page or for postings to be removed (deactivated) if a certain level of spam votes have been reached. The admin user also has the ability to manual manage the postings and setup the categories and subcategories.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just completed a joomla component that is based on the Digg idea. It allows the posting of content which is then voted on by users. The postings can be voted upwards or downwards and marked as spam. There are 2 levels are categories for the postings to be categorized.</p>
<p>In the admin section the admin user has a configuration section where they can setup automatic levels for the postings to appear on the home page or for postings to be removed (deactivated) if a certain level of spam votes have been reached. The admin user also has the ability to manual manage the postings and setup the categories and subcategories.</p>
<p>I made use of Ajax to handle the the Category/Subcategory relationship in the form adding/editing a posting.</p>
]]></content>
		</item>
		
		<item>
			<title>Xorg 1.5/Gcc 4.3.2</title>
			<link>https://reinbach.com/posts/xorg-1-5-gcc-4-3-2/</link>
			<pubDate>Mon, 06 Apr 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/xorg-1-5-gcc-4-3-2/</guid>
			<description>&lt;p&gt;Gentoo is the distribution I use for my desktop and I just performed an extensive upgrade/update this weekend which had me moving to gcc 4.3.2. That required me to do a system and world reinstall and that involves a number of packages (system: 120, world: +/-798)&lt;/p&gt;
&lt;p&gt;Each morning I do a world update on my system and I did not notice a few critical updates and I ended up with my apps not starting up cause they could not link to libstdc++.so.6. After a bit of searching I realized that I had actually upgraded gcc to 4.3.2 and this required that I do the system/world reinstall after setting up my current gcc version.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Gentoo is the distribution I use for my desktop and I just performed an extensive upgrade/update this weekend which had me moving to gcc 4.3.2. That required me to do a system and world reinstall and that involves a number of packages (system: 120, world: +/-798)</p>
<p>Each morning I do a world update on my system and I did not notice a few critical updates and I ended up with my apps not starting up cause they could not link to libstdc++.so.6. After a bit of searching I realized that I had actually upgraded gcc to 4.3.2 and this required that I do the system/world reinstall after setting up my current gcc version.</p>
<p>Well after the reinstall, which ran overnight, I re-synced and did my usual world upgrade/update and upgraded to xorg 1.5 which is a major change from the norm. Did I read the instructions completely, nope, I just went ahead and did the upgrade and low and behold my window manager was not fully operational to put it mildly. Anyway I went back to the instructions, which required that I update my INPUT_DEVICES and reinstall xorg server. I must say I was very thankful afterwards that I was required to run the eselect news command before the system would allow an update as that pointed me to the instructions.</p>
<p>Now me and my machine are happy campers.</p>
]]></content>
		</item>
		
		<item>
			<title>Latest Wordpress Template</title>
			<link>https://reinbach.com/posts/latest-wordpress-template/</link>
			<pubDate>Mon, 30 Mar 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/latest-wordpress-template/</guid>
			<description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;The design was also a little narrow relative to other wordpress templates, but I thought it was a really cool looking design.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<!-- raw HTML omitted -->
<p>The design was also a little narrow relative to other wordpress templates, but I thought it was a really cool looking design.</p>
]]></content>
		</item>
		
		<item>
			<title>Netbook On The Road</title>
			<link>https://reinbach.com/posts/netbook-on-the-road/</link>
			<pubDate>Sun, 22 Mar 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/netbook-on-the-road/</guid>
			<description>&lt;p&gt;I have just returned from a trip on which I used the netbook exclusively. At the end of the trip I am very happy to say that I was able to do all that I needed to on the netbook, I was able to develop without many issues.&lt;/p&gt;
&lt;p&gt;Although it is a little slower than my desktop, that is expected. It just required me to be a little more patient. The one issue that I did have, was not able to review my work via IE. I installed VirtualBox and moved across a snapshot of a Windows partition and was able to run Windows virtually on the netbook, but IE was not allowing me to view local websites running on the netbook. I probably do not have the correct IP or something along those lines, granted I made no effort to resolve this, but will in the next week or so, as that is something that I will need. Did not really need it while on the trip.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have just returned from a trip on which I used the netbook exclusively. At the end of the trip I am very happy to say that I was able to do all that I needed to on the netbook, I was able to develop without many issues.</p>
<p>Although it is a little slower than my desktop, that is expected. It just required me to be a little more patient. The one issue that I did have, was not able to review my work via IE. I installed VirtualBox and moved across a snapshot of a Windows partition and was able to run Windows virtually on the netbook, but IE was not allowing me to view local websites running on the netbook. I probably do not have the correct IP or something along those lines, granted I made no effort to resolve this, but will in the next week or so, as that is something that I will need. Did not really need it while on the trip.</p>
<p>So all in all very happy with the netbook, can&rsquo;t complain as it was very cheap and did what I wanted it to do. So now I am mobile in a big way.</p>
]]></content>
		</item>
		
		<item>
			<title>Netbook Eeepc 1000</title>
			<link>https://reinbach.com/posts/netbook-eeepc-1000/</link>
			<pubDate>Thu, 26 Feb 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/netbook-eeepc-1000/</guid>
			<description>&lt;p&gt;Just bought myself a eeepC 1000 linux netbook as I am going to be travelling a bit lately and want to keep working during that time.&lt;/p&gt;
&lt;p&gt;I was planning on putting Gentoo onto it, but decided against that as it was suggested that compiling every package will be a bit resource intensive on the netbook so I decided on &lt;!-- raw HTML omitted --&gt;eeebuntu remix&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;The reason I decided to install a different Linux distr was to give me more flexibility and the desired environment for me. The default Xandros distro actually looked pretty decent and I could see anyone being able to use this with no problems. The interface was very good and intuitive. But I need to do some development on the machine and needed something more.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just bought myself a eeepC 1000 linux netbook as I am going to be travelling a bit lately and want to keep working during that time.</p>
<p>I was planning on putting Gentoo onto it, but decided against that as it was suggested that compiling every package will be a bit resource intensive on the netbook so I decided on <!-- raw HTML omitted -->eeebuntu remix<!-- raw HTML omitted --></p>
<p>The reason I decided to install a different Linux distr was to give me more flexibility and the desired environment for me. The default Xandros distro actually looked pretty decent and I could see anyone being able to use this with no problems. The interface was very good and intuitive. But I need to do some development on the machine and needed something more.</p>
<p>Well the only issue I had was booting from the USB Drive in that I kept getting a flashing cursor in the top left corner. The solution was that the USB stick&rsquo;s boot partition needed to be fixed with the command</p>
<pre><code>lilo -M /dev/sdd
</code></pre>
<p>After that it was pretty much plain sailing. The next part I&rsquo;m working on is getting <!-- raw HTML omitted -->virtualbox<!-- raw HTML omitted --> setup, which is done, but really getting Windows installed within virtualbox and the trick is intalling Windows without a CD Drive.</p>
<p><!-- raw HTML omitted -->Resources:<!-- raw HTML omitted -->
<!-- raw HTML omitted -->Installing Ubuntu on USB Stick<!-- raw HTML omitted --></p>
]]></content>
		</item>
		
		<item>
			<title>Google Maps</title>
			<link>https://reinbach.com/posts/google-maps/</link>
			<pubDate>Tue, 10 Feb 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/google-maps/</guid>
			<description>&lt;p&gt;Lately I have done some work with Google Maps and made use of &lt;!-- raw HTML omitted --&gt;jMaps&lt;!-- raw HTML omitted --&gt; which is a jQuery Google Maps Plugin.&lt;/p&gt;
&lt;p&gt;Nice and straight forward to use, just a one liner to initialize the map and you have access to quite of bit of functionality through the &lt;!-- raw HTML omitted --&gt;API&lt;!-- raw HTML omitted --&gt;. I was able to make use of markers and polylines without any real issues.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Lately I have done some work with Google Maps and made use of <!-- raw HTML omitted -->jMaps<!-- raw HTML omitted --> which is a jQuery Google Maps Plugin.</p>
<p>Nice and straight forward to use, just a one liner to initialize the map and you have access to quite of bit of functionality through the <!-- raw HTML omitted -->API<!-- raw HTML omitted -->. I was able to make use of markers and polylines without any real issues.</p>
<p>At the moment I can connect an object on the page to a marker on the map, kinda, I make use of the latitude and longitude values. Just need to work out how to connect a marker to an object on the page.</p>
<p>Also just don&rsquo;t forget to signup for your <!-- raw HTML omitted -->Google Map Key<!-- raw HTML omitted --></p>
]]></content>
		</item>
		
		<item>
			<title>Jquery Slider</title>
			<link>https://reinbach.com/posts/jquery-slider/</link>
			<pubDate>Tue, 10 Feb 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jquery-slider/</guid>
			<description>&lt;p&gt;I thought about making use of the &lt;!-- raw HTML omitted --&gt;jQuery slider effect&lt;!-- raw HTML omitted --&gt; for a project I am working on.&lt;/p&gt;
&lt;p&gt;Let me just say that I felt like an idiot at first. All the necessary libs were installed and being called correctly, but nothing was coming up. After much head scratching, I finally realized that I needed to provide styling for the slider for it to show up.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I thought about making use of the <!-- raw HTML omitted -->jQuery slider effect<!-- raw HTML omitted --> for a project I am working on.</p>
<p>Let me just say that I felt like an idiot at first. All the necessary libs were installed and being called correctly, but nothing was coming up. After much head scratching, I finally realized that I needed to provide styling for the slider for it to show up.</p>
<p>So at the very least have something along these lines;</p>
<!-- raw HTML omitted -->
]]></content>
		</item>
		
		<item>
			<title>Javascript Demo</title>
			<link>https://reinbach.com/posts/javascript_demo/</link>
			<pubDate>Sun, 01 Feb 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/javascript_demo/</guid>
			<description>&lt;p&gt;A &lt;!-- raw HTML omitted --&gt;javascript demo&lt;!-- raw HTML omitted --&gt; has been added that encompasses DOM manipulation, effects and AJAX.&lt;/p&gt;
&lt;p&gt;The idea of the javascript snippet of code is that it can be placed in a form that has a select list pulling data from a lookup table and would allow the user to add to the lookup table without having to leave the form.&lt;/p&gt;
&lt;p&gt;The javascript code sends a request to a PHP file on the server that adds the data to the database. A new list of the categories is returned in JSON format and that is parsed into the new options list for the categories.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A <!-- raw HTML omitted -->javascript demo<!-- raw HTML omitted --> has been added that encompasses DOM manipulation, effects and AJAX.</p>
<p>The idea of the javascript snippet of code is that it can be placed in a form that has a select list pulling data from a lookup table and would allow the user to add to the lookup table without having to leave the form.</p>
<p>The javascript code sends a request to a PHP file on the server that adds the data to the database. A new list of the categories is returned in JSON format and that is parsed into the new options list for the categories.</p>
]]></content>
		</item>
		
		<item>
			<title>Audit Script Added</title>
			<link>https://reinbach.com/posts/audit-script-added/</link>
			<pubDate>Mon, 26 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/audit-script-added/</guid>
			<description>&lt;p&gt;I just updated the auditing article, with a python script that generates the necessary function and trigger to work with the &lt;!-- raw HTML omitted --&gt;Postgres auditing example&lt;!-- raw HTML omitted --&gt;.&lt;/p&gt;
&lt;p&gt;Not only does this help mimimize the mistakes I make, but it definitely makes life a lot easier just running the script whenever a change is made to a table that needs auditing. So that is a win win.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I just updated the auditing article, with a python script that generates the necessary function and trigger to work with the <!-- raw HTML omitted -->Postgres auditing example<!-- raw HTML omitted -->.</p>
<p>Not only does this help mimimize the mistakes I make, but it definitely makes life a lot easier just running the script whenever a change is made to a table that needs auditing. So that is a win win.</p>
<p>The idea would be to create a number of other scripts that allows the database to be re-created competely, this is for development purposes and allows for changes to the database to happen rapidly and with minimal mistakes. But that is for another posting.</p>
]]></content>
		</item>
		
		<item>
			<title>Markdown And Codehilite</title>
			<link>https://reinbach.com/posts/markdown-and-codehilite/</link>
			<pubDate>Sat, 17 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/markdown-and-codehilite/</guid>
			<description>&lt;p&gt;Just added a quick article on how I installed and worked with &lt;!-- raw HTML omitted --&gt;markdown and codehilite&lt;!-- raw HTML omitted --&gt;. These tools helped in presenting code snippets in the articles with ease. It allows the article to be edited easily and makes use of markdown syntax.&lt;/p&gt;
&lt;p&gt;When adding the article it is parsed and html syntax is added to the text based on the markdown syntax. This method then only requires the text to be parsed when it is added/updated and not everytime the article is viewed.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just added a quick article on how I installed and worked with <!-- raw HTML omitted -->markdown and codehilite<!-- raw HTML omitted -->. These tools helped in presenting code snippets in the articles with ease. It allows the article to be edited easily and makes use of markdown syntax.</p>
<p>When adding the article it is parsed and html syntax is added to the text based on the markdown syntax. This method then only requires the text to be parsed when it is added/updated and not everytime the article is viewed.</p>
]]></content>
		</item>
		
		<item>
			<title>Articles Application</title>
			<link>https://reinbach.com/posts/articles-application/</link>
			<pubDate>Fri, 16 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/articles-application/</guid>
			<description>&lt;p&gt;This blog system was not working out well for me, especially for those long ramblings of mine, so I have created an &lt;!-- raw HTML omitted --&gt;articles app&lt;!-- raw HTML omitted --&gt; in django and now I can ramble on forever.&lt;/p&gt;
&lt;p&gt;I wanted something that would be able to display code snippets more intuitively and effectively. The article app includes an extra field for the html content that takes the text/body of the article and converts it into an html structure.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This blog system was not working out well for me, especially for those long ramblings of mine, so I have created an <!-- raw HTML omitted -->articles app<!-- raw HTML omitted --> in django and now I can ramble on forever.</p>
<p>I wanted something that would be able to display code snippets more intuitively and effectively. The article app includes an extra field for the html content that takes the text/body of the article and converts it into an html structure.</p>
<p>The conversion process makes use of <!-- raw HTML omitted -->markdown<!-- raw HTML omitted --> and <!-- raw HTML omitted -->codehilite<!-- raw HTML omitted --> and the processing is done on the server side of things and only has to be done when I add/update the article, instead of at the client side each and everytime the article is viewed.</p>
]]></content>
		</item>
		
		<item>
			<title>Postgres Auditing Example</title>
			<link>https://reinbach.com/posts/postgres-auditing-example/</link>
			<pubDate>Tue, 13 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/postgres-auditing-example/</guid>
			<description>&lt;p&gt;A while ago I wrote in general terms about putting together a low level auditing system for postgres, well this post is about one way I went about doing this.&lt;/p&gt;
&lt;p&gt;I have written a short article on it that can be found &lt;!-- raw HTML omitted --&gt;here&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;The auditing steps are implemented in the database layer through functions and triggers making use of PL/SQL, it includes a login function that creates a session table that is used to ensure that the user is logged in and that the auditing function has access to the users information.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A while ago I wrote in general terms about putting together a low level auditing system for postgres, well this post is about one way I went about doing this.</p>
<p>I have written a short article on it that can be found <!-- raw HTML omitted -->here<!-- raw HTML omitted --></p>
<p>The auditing steps are implemented in the database layer through functions and triggers making use of PL/SQL, it includes a login function that creates a session table that is used to ensure that the user is logged in and that the auditing function has access to the users information.</p>
]]></content>
		</item>
		
		<item>
			<title>Flot This</title>
			<link>https://reinbach.com/posts/flot-this/</link>
			<pubDate>Sat, 10 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/flot-this/</guid>
			<description>&lt;p&gt;Lately I have been playing around with various JS Graphing libraries. In the past I have made use of &lt;!-- raw HTML omitted --&gt;Plotkit&lt;!-- raw HTML omitted --&gt;, which is based on the &lt;!-- raw HTML omitted --&gt;MochiKit&lt;!-- raw HTML omitted --&gt; libs. Overall it is a very straight forward application and easy to use.&lt;/p&gt;
&lt;p&gt;But in wanting to make use of &lt;!-- raw HTML omitted --&gt;JQuery&lt;!-- raw HTML omitted --&gt; more and to get more up to speed with it, I came across &lt;!-- raw HTML omitted --&gt;Flot&lt;!-- raw HTML omitted --&gt; and decided to give it a whirl on the Powerball app.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Lately I have been playing around with various JS Graphing libraries. In the past I have made use of <!-- raw HTML omitted -->Plotkit<!-- raw HTML omitted -->, which is based on the <!-- raw HTML omitted -->MochiKit<!-- raw HTML omitted --> libs. Overall it is a very straight forward application and easy to use.</p>
<p>But in wanting to make use of <!-- raw HTML omitted -->JQuery<!-- raw HTML omitted --> more and to get more up to speed with it, I came across <!-- raw HTML omitted -->Flot<!-- raw HTML omitted --> and decided to give it a whirl on the Powerball app.</p>
<p>For more information head on over to the <!-- raw HTML omitted -->Flot article<!-- raw HTML omitted -->.</p>
]]></content>
		</item>
		
		<item>
			<title>Dreamhost Django Arghh</title>
			<link>https://reinbach.com/posts/dreamhost-django-arghh/</link>
			<pubDate>Sat, 03 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/dreamhost-django-arghh/</guid>
			<description>&lt;p&gt;Something that you learn the hard way and that makes you feel powerless is when you make use of a hosting provider and give up certain controls of the server.&lt;/p&gt;
&lt;p&gt;The issue I just ran into was with me making a tweak on a django installation and modified the urls.py file, but in doing so I mispelt a module it needed to import, and alas the site is currently failing to import this module now and errors out. Well the problem is correcting that mistake is easy enough, but the web server is not re-reading that file until after a certain number of requests on the site.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Something that you learn the hard way and that makes you feel powerless is when you make use of a hosting provider and give up certain controls of the server.</p>
<p>The issue I just ran into was with me making a tweak on a django installation and modified the urls.py file, but in doing so I mispelt a module it needed to import, and alas the site is currently failing to import this module now and errors out. Well the problem is correcting that mistake is easy enough, but the web server is not re-reading that file until after a certain number of requests on the site.</p>
<p>Normally if you have control of the web server you can reload/restart it, but here I have to let it run its course and with time and enough requests it will correct itself.</p>
<p>Anyway it is back to normal now, so no need to worry anymore. Just have to be more careful in future.</p>
<p>Normally this would not be an issue as the dev environment would match the production environment and these issues would be sorted out in the dev region where you have absolute control and then the release process would minimize the human element as much as possible and this sort of error would not occur.</p>
<p>At the moment I make use of mod_python in the dev environment and have all requests re-reading the files. While on the pyton.reinbach.com site I am making use of Fast CGI and a slightly different setup.</p>
]]></content>
		</item>
		
		<item>
			<title>Powerball And Django</title>
			<link>https://reinbach.com/posts/powerball-and-django/</link>
			<pubDate>Fri, 02 Jan 2009 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/powerball-and-django/</guid>
			<description>&lt;p&gt;I have been playing with django of late as well as doing some fair amount of python scripting at work.&lt;/p&gt;
&lt;p&gt;So for a mini project I played with the powerball lottery numbers and created a very simple application that pulls the numbers from the powerball lottery website and dump them in a database and then extract some data from the database and present them.&lt;/p&gt;
&lt;p&gt;All that has resulted in a couple of pages that can be found at &lt;!-- raw HTML omitted --&gt;python.reinbach.com/powerball&lt;!-- raw HTML omitted --&gt;. These pages show the results and explain with code snippets the underlying code.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have been playing with django of late as well as doing some fair amount of python scripting at work.</p>
<p>So for a mini project I played with the powerball lottery numbers and created a very simple application that pulls the numbers from the powerball lottery website and dump them in a database and then extract some data from the database and present them.</p>
<p>All that has resulted in a couple of pages that can be found at <!-- raw HTML omitted -->python.reinbach.com/powerball<!-- raw HTML omitted -->. These pages show the results and explain with code snippets the underlying code.</p>
<p>I made use of django for the web framework and MySQL for the database and python for the script that fetches the numbers from the official powerball website.</p>
]]></content>
		</item>
		
		<item>
			<title>Python Projects</title>
			<link>https://reinbach.com/posts/python-projects/</link>
			<pubDate>Sat, 25 Oct 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/python-projects/</guid>
			<description>&lt;p&gt;Well I finally managed to get to use Python for a couple of projects for work and must say that I have been really happy about it.&lt;/p&gt;
&lt;p&gt;The projects were nothing too involved, just reading Excel files, parsing the data, saving specific records, saving the rejected records to a file and emailing the results to relevant parties.&lt;/p&gt;
&lt;p&gt;I made use of a lib called xlrd [&lt;!-- raw HTML omitted --&gt;http://www.lexicon.net/sjmachin/xlrd.htm&lt;!-- raw HTML omitted --&gt;], that provides functionality to read Excel files. This definitely opens up a large amount of opportunity with Excel files now, seeing that I never found anything similar for PHP on a Linux platform. No longer have to ask that the files put converted to a text format.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well I finally managed to get to use Python for a couple of projects for work and must say that I have been really happy about it.</p>
<p>The projects were nothing too involved, just reading Excel files, parsing the data, saving specific records, saving the rejected records to a file and emailing the results to relevant parties.</p>
<p>I made use of a lib called xlrd [<!-- raw HTML omitted -->http://www.lexicon.net/sjmachin/xlrd.htm<!-- raw HTML omitted -->], that provides functionality to read Excel files. This definitely opens up a large amount of opportunity with Excel files now, seeing that I never found anything similar for PHP on a Linux platform. No longer have to ask that the files put converted to a text format.</p>
<p>Hopefully I am able to incorporate Python in future projects as and where appropriate, it is a nice language that I really enjoy.</p>
]]></content>
		</item>
		
		<item>
			<title>Cakephp</title>
			<link>https://reinbach.com/posts/cakephp/</link>
			<pubDate>Wed, 16 Jul 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/cakephp/</guid>
			<description>&lt;p&gt;Just worked on a project that used CakePHP [http://www.cakephp.org/] as it&amp;rsquo;s framework. It was very straight forward in picking up and working with, as it follows the normal MVC methodology which I like a lot.&lt;/p&gt;
&lt;p&gt;There were a few things that needed to be named correctly to make the most of the framework, which was interesting, but no big deal. As they do a good job of providing some decent documentation on the system and had a decent tutorial.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just worked on a project that used CakePHP [http://www.cakephp.org/] as it&rsquo;s framework. It was very straight forward in picking up and working with, as it follows the normal MVC methodology which I like a lot.</p>
<p>There were a few things that needed to be named correctly to make the most of the framework, which was interesting, but no big deal. As they do a good job of providing some decent documentation on the system and had a decent tutorial.</p>
<p>The version I used was the current stable release [Stable: 1.1.19.6305], but it appears that the latest release is fairly standard with some new features/improvements. The main thing that I noticed in the time I worked with it between the versions was the Form helpers being separated from HTML helper.</p>
<p>The project was pretty straight forward in just being a dynamic website with the usual CMS functionality.</p>
<p>I definitely want to try the framework out on a more demanding scenario and hopefully that will be happening soon.</p>
]]></content>
		</item>
		
		<item>
			<title>Site Update</title>
			<link>https://reinbach.com/posts/site-update/</link>
			<pubDate>Sun, 29 Jun 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/site-update/</guid>
			<description>&lt;p&gt;Ok, a quick message to say that the site has been updated. It may be a step back initially, but the framework is something I built and I will be able to rapidly expand with ease.&lt;/p&gt;
&lt;p&gt;So it is a bit rough around the edges at the moment, but it is something I have put together and will fine tune overtime.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Ok, a quick message to say that the site has been updated. It may be a step back initially, but the framework is something I built and I will be able to rapidly expand with ease.</p>
<p>So it is a bit rough around the edges at the moment, but it is something I have put together and will fine tune overtime.</p>
]]></content>
		</item>
		
		<item>
			<title>Rhel To Centos</title>
			<link>https://reinbach.com/posts/rhel-to-centos/</link>
			<pubDate>Sun, 15 Jun 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/rhel-to-centos/</guid>
			<description>&lt;p&gt;A project I am currently working on requires me moving a website between servers. The client has just purchased a new server from Dell with RHEL5 installed on it. Everything was going well till I needed to install a file, but alas we were not able to mount the CDRom drive anymore, and we do not have an RHN subscription. I am doing this all remotely and not into having to pay for a subscription to get updates etc. I decided to move from RHEL to CentOS and these are the steps I took.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A project I am currently working on requires me moving a website between servers. The client has just purchased a new server from Dell with RHEL5 installed on it. Everything was going well till I needed to install a file, but alas we were not able to mount the CDRom drive anymore, and we do not have an RHN subscription. I am doing this all remotely and not into having to pay for a subscription to get updates etc. I decided to move from RHEL to CentOS and these are the steps I took.</p>
<p>It actually was not hard at all, just had to do a little googling and everything panned out for me. So below are the steps I took.</p>
<p><!-- raw HTML omitted -->Step 1:<!-- raw HTML omitted -->
remove dependency on RHN for updates/upgrades etc. To make use of these repos you need a subscription and I am just not into that.
<!-- raw HTML omitted -->
rpm -e yum-rhn-plugin
rpm -e redhat-release-notes-5Server redhat-release-5Server &ndash;nodeps
<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->Step 2:<!-- raw HTML omitted -->
get the centos release and notes rpms that get things going for you in moving from RHEL to CentOS. You need to know what platform you are running on 32bit or 64bit</p>
<p>A quick command to find that information out is;
<!-- raw HTML omitted -->uname -a<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->i386 (32bit)<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
wget <a href="http://mirror.centos.org/centos-5/5/os/i386/CentOS/centos-release-5-1.0.el5.centos.1.i386.rpm">http://mirror.centos.org/centos-5/5/os/i386/CentOS/centos-release-5-1.0.el5.centos.1.i386.rpm</a>
wget <a href="http://mirror.centos.org/centos-5/5/os/i386/CentOS/centos-release-notes-5.1.0-2.i386.rpm">http://mirror.centos.org/centos-5/5/os/i386/CentOS/centos-release-notes-5.1.0-2.i386.rpm</a>
<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->x86_64 (64bit)<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
wget <a href="http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/centos-release-5-1.0.el5.centos.1.x86_64.rpm">http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/centos-release-5-1.0.el5.centos.1.x86_64.rpm</a>
wget <a href="http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/centos-release-notes-5.1.0-2.x86_64.rpm">http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/centos-release-notes-5.1.0-2.x86_64.rpm</a>
<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->Step 3:<!-- raw HTML omitted -->
run the rpms, this will setup your system to make use of CentOS and actually updates you repos list (/etc/yum.repos.d/)
<!-- raw HTML omitted -->
rpm -Uvh centos-release*.rpm &ndash;test
rpm -Uvh centos-release*.rpm
<!-- raw HTML omitted --></p>
<p>run the test first to make sure you do not have any dependencies, if you did you will need to get hold those files to fulfill the dependencies. I did not have any issues so I just continued. Good luck if you did have dependency issues : )</p>
<p><!-- raw HTML omitted -->Step 4: (optional)<!-- raw HTML omitted -->
update the name of the system. The previous command will result in this file being updated, it really is up to you. I went and changed mine back to &lsquo;RedHat Enterprises Linux Server release 5 (Tikanga)&rsquo;
<!-- raw HTML omitted -->nano /etc/issue<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->Step 5:<!-- raw HTML omitted -->
lastly I went ahead and did an upgrade:
<!-- raw HTML omitted -->yum upgrade<!-- raw HTML omitted --></p>
<p>That resulted in 334 packages needed to be downloaded and installed. After that was complete, everything worked fine for me and I was able to install the necessary files that I wanted without any issues. Thank goodness. Now I do not have to worry about mounting the CDRom and I have no problems using yum accessing open repos.</p>
<p><!-- raw HTML omitted -->Resources:<!-- raw HTML omitted --></p>
<ul>
<li><!-- raw HTML omitted --><a href="http://jyrxs.blogspot.com/2008/02/using-centos-5-repos-in-rhel5-server.html">http://jyrxs.blogspot.com/2008/02/using-centos-5-repos-in-rhel5-server.html</a><!-- raw HTML omitted --></li>
</ul>
]]></content>
		</item>
		
		<item>
			<title>Foresight Linux</title>
			<link>https://reinbach.com/posts/foresight-linux/</link>
			<pubDate>Tue, 10 Jun 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/foresight-linux/</guid>
			<description>&lt;p&gt;I have been using &lt;!-- raw HTML omitted --&gt;Foresight Linux&lt;!-- raw HTML omitted --&gt; for the last couple of months, and must say that I am impressed with the way it sets up. It must have been the quickest setup today I have experienced in any distro, that&amp;rsquo;s a good thing for those not interested in wrestling in getting up and going.&lt;/p&gt;
&lt;p&gt;Once up and running you have almost everything you need. You get all your standard applications to do almost everything you need. Now to do development you need to take an extra step and update to the &amp;lsquo;devel&amp;rsquo; stages/packages. A nice feature is that the updates are seamless and happen in the background, after a simple click.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I have been using <!-- raw HTML omitted -->Foresight Linux<!-- raw HTML omitted --> for the last couple of months, and must say that I am impressed with the way it sets up. It must have been the quickest setup today I have experienced in any distro, that&rsquo;s a good thing for those not interested in wrestling in getting up and going.</p>
<p>Once up and running you have almost everything you need. You get all your standard applications to do almost everything you need. Now to do development you need to take an extra step and update to the &lsquo;devel&rsquo; stages/packages. A nice feature is that the updates are seamless and happen in the background, after a simple click.</p>
<p>The one thing that is missing for me is the lack of GnuCash, I need that program, well I just really want it. I have a long history with it. Yes I could go ahead and download the packages and install it myself, but the better thing would be to follow up on the bug tracker and help to get it into the list of applications, there appears to be a couple of bugs still open for it at the moment (<!-- raw HTML omitted -->FL-735<!-- raw HTML omitted --> and <!-- raw HTML omitted -->FL-1251<!-- raw HTML omitted -->).</p>
<p>A little weird issue I do have is that my /etcX11/xorg.conf file does not appear to be read on the initial load, I have to login and out first before my dual monitors are correctly picked up.</p>
<p>So today I was browsing <!-- raw HTML omitted -->DistroWatch<!-- raw HTML omitted --> again and getting the urge to try another distro and the 2 that caught my eye are <!-- raw HTML omitted -->Mint<!-- raw HTML omitted --> and <!-- raw HTML omitted -->Sabayona<!-- raw HTML omitted --></p>
<p>I have an AMD64 system so that is something that the distro needs to be strong in, which looks like Sabayona is, seeing that it is based on <!-- raw HTML omitted -->Gentoo<!-- raw HTML omitted --> which I have used and really enjoyed, that has been my favorite distro for a while now. I really like the way you get down and into the meat of it when working with Gentoo. But I am going to wait till Sabayona has made it&rsquo;s latest release, which seems that they are close on doing that. It is meant to be at the end of this month (June 2008) So I&rsquo;ll go ahead and try Mint next I think.</p>
]]></content>
		</item>
		
		<item>
			<title>Code Base</title>
			<link>https://reinbach.com/posts/code-base/</link>
			<pubDate>Mon, 09 Jun 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/code-base/</guid>
			<description>&lt;p&gt;Whenever I start a new project I generally make use of a base set of code. This code base has been growing slowly, ever so slowly, but I think it is a reasonable starting base. Nothing fancy, nice and simple and allows me to go in any direction I like.&lt;/p&gt;
&lt;p&gt;When I have finished a project or have time during a project, I try to remember to move any improvements back into the base, I really ought to do this more often, but alas. The improvements are limited to the functionality that the base has, I do not want to have a bloated base to start with, I much prefer a very simple clean code base to start with and prefer to add rather than take away.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Whenever I start a new project I generally make use of a base set of code. This code base has been growing slowly, ever so slowly, but I think it is a reasonable starting base. Nothing fancy, nice and simple and allows me to go in any direction I like.</p>
<p>When I have finished a project or have time during a project, I try to remember to move any improvements back into the base, I really ought to do this more often, but alas. The improvements are limited to the functionality that the base has, I do not want to have a bloated base to start with, I much prefer a very simple clean code base to start with and prefer to add rather than take away.</p>
<p>Currently the base has the following;</p>
<ul>
<li>MVC Framework</li>
<li>DB Abstracted Layer</li>
<li>User management</li>
<li>Content</li>
<li>Test Scripts</li>
</ul>
<p>I am quite tempted to remove the Content piece, but so far it has managed to survive where it is at the moment.</p>
<p>Currently the DB Abstracted layer is MySQL specific, but I have been working on a side project that makes use of PostgreSQL heavily and I have extended this layer to handle both DB Sources. Something I need to move back into the base.</p>
<p>The Test Scripts are individual unit tests run through PHPUnit and test individual functionality, I need to get together a Test Suite that runs the whole bang shoot together.</p>
<p>So at the moment, this is just a blog entry to get things moving along. But plan to create a space here to better share my code and scripts.</p>
<p>Finally the code base can be found at <!-- raw HTML omitted --><a href="http://www.reinbach.com/code.tgz">http://www.reinbach.com/code.tgz</a><!-- raw HTML omitted --> any feedback would be interesting.</p>
]]></content>
		</item>
		
		<item>
			<title>Postgres Auditing</title>
			<link>https://reinbach.com/posts/postgres_auditing/</link>
			<pubDate>Sun, 01 Jun 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/postgres_auditing/</guid>
			<description>&lt;p&gt;Working on a new project called Bayete, it has been long time coming, but that is another story. For this project I wanted to have some low level auditing and so decided to make use of Postgres with it&amp;rsquo;s functions/trigger options. The idea is that when there is any INSERT/UPDATE/DELETE action on a table it is recorded in an auditing table. The idea was inspired by Tony Mays, a work colleague.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Working on a new project called Bayete, it has been long time coming, but that is another story. For this project I wanted to have some low level auditing and so decided to make use of Postgres with it&rsquo;s functions/trigger options. The idea is that when there is any INSERT/UPDATE/DELETE action on a table it is recorded in an auditing table. The idea was inspired by Tony Mays, a work colleague.</p>
<p>PL/PGSQL is the language I used to program these functions and triggers. I was looking at PL/Python but decided on PL/PGSQL as it is more &rsquo;embedded&rsquo; in Postgres and you have access to more information, while with another Language like PL/Python I would need to make more calls.</p>
<p>One gotchas is that one needs to look out for is the NULL value. It can really wreck havoc on your functions/triggers. If you have a NULL value for any var in your statement you&rsquo;re ending up with a NULL result!!</p>
<p>To really make the auditing work well you need to know who is taking the action and for that I required a change in the normal login query, now instead of just checking that the user exists in the database I now create a temporary &lsquo;session&rsquo; table that holds the username of the user and so when an auditing action is invoked this &lsquo;session&rsquo; table is queried for the username, if it does not exist the complete query will fail. Which could be considered another layer of security at the database level, albeit a very very weak layer that is easily circumvented by just manually creating the &lsquo;session&rsquo; table.</p>
<p>The auditing record is tied back to the original record by the table&rsquo;s primary key and this is where one is required to make a slight modification in the table structures so that there is always only one primary key. This just makes things simpler for the auditing record and connecting it back to the record. I have not run into any issues with this at the moment. For those tables that had primary keys made up of more than 1 field, I changed by adding a system primary key to the table and making a constraint requiring the previous primary keys to be unique together.</p>
<p>So the auditing table is made up as follows;</p>
<ul>
<li>trx_type: the type of transaction that occurred (INSERT/UPDATE/DELETE)</li>
<li>trx_table: the table that the transaction occurred in</li>
<li>trx_key: the primary key of the table/record</li>
<li>trx_time: time the transaction occurred</li>
<li>trx_user: the user responsible for the transaction</li>
<li>trx_desc: an xml string of the values affected</li>
</ul>
<p>To provide a clear indication of what happened I make up a XML string showing the new/old values for each of the fields being affected. This allows easy parsing in the future to provide a clear history of the record.</p>
<p>In order to make life easier for me I have created a simple script that generates the function/trigger. I just pass in the table name and the primary key and it queries the database for the table information and then creates a file that holds the function/trigger. The reason for putting it in the file is that I just need to run the script once to generate the file and then I have another script that regenerates the database for me, making use of all these files that hold the functions/triggers plus a few other files that hold the data structure and default data (I&rsquo;ll post this in another posting). This allows for rapid rebuilding of the database as well as being able to create multiple instances of the database which I do for unit testing purposes. Just make sure not to add a trigger to any type of ids table that is used by the auditing table, otherwise you&rsquo;re in a nasty loop. Yes I did that, and it took me a little while to work out what the heck was going on.</p>
<p>Well that is a simple overview of the auditing that I have implemented. Granted it is still early days for this and it will more than likely go through some growing pains.</p>
]]></content>
		</item>
		
		<item>
			<title>Ins Interview</title>
			<link>https://reinbach.com/posts/ins-interview/</link>
			<pubDate>Thu, 22 May 2008 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/ins-interview/</guid>
			<description>&lt;p&gt;ok, I am surprised by this, I have already received notice to have my fingerprints taken. For a moment I thought it was the interview, but that will be a while longer I guess. Any, at least we are making progress.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>ok, I am surprised by this, I have already received notice to have my fingerprints taken. For a moment I thought it was the interview, but that will be a while longer I guess. Any, at least we are making progress.</p>
]]></content>
		</item>
		
		<item>
			<title>Ins Response</title>
			<link>https://reinbach.com/posts/ins-response/</link>
			<pubDate>Sat, 15 Dec 2007 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/ins-response/</guid>
			<description>&lt;p&gt;Well the INS has finally acknowledge my citizenship application. It sure had me worried there for a while, thought the application had disappeared into la la land. So it looks like the next step will be an interview and I can expect them to contact me within 365 days. so says the acknowledgement.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well the INS has finally acknowledge my citizenship application. It sure had me worried there for a while, thought the application had disappeared into la la land. So it looks like the next step will be an interview and I can expect them to contact me within 365 days. so says the acknowledgement.</p>
]]></content>
		</item>
		
		<item>
			<title>Us Citizenship</title>
			<link>https://reinbach.com/posts/us-citizenship/</link>
			<pubDate>Sat, 28 Jul 2007 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/us-citizenship/</guid>
			<description>&lt;p&gt;Well, I have finally applied for US Citizenship. Got together all the necessary paperwork and amazingly enough it was not really that hard. I say that now, but I have just sent in the application, I still need to be finger printed, interviewed and tested on the history/facts about the US. So I&amp;rsquo;ll need to brush up on some of the trivia about the history and government. They also make sure you have basic English skills, well I think I have those, although a number of people will be a bit dubious about that, seeing that they have a tough time understanding me.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well, I have finally applied for US Citizenship. Got together all the necessary paperwork and amazingly enough it was not really that hard. I say that now, but I have just sent in the application, I still need to be finger printed, interviewed and tested on the history/facts about the US. So I&rsquo;ll need to brush up on some of the trivia about the history and government. They also make sure you have basic English skills, well I think I have those, although a number of people will be a bit dubious about that, seeing that they have a tough time understanding me.</p>
<p>What made me get this done with little procrastination, was that the application fee is going up by about $300 after 31 July 2007. So as you can see, I just managed to squeeze in before that date. Not sure exactly how long the whole process will take, but it should be about 6 months or longer.</p>
<p>I&rsquo;m having to apply for a new passport, seeing that mine is expired. So I am going to be running a little experiment between the services of the 2 governments. I have found it a real pain to deal with the SA Embassy about passports. I have applied in the past for a new passport and a temporary passport, but only received the temporary passport and never got my permanent passport. I have tried emailing them, but the posted email address bounces back.</p>
<p>So I am going through the process again. I started about a couple of weeks ago, sending off for BI-9 forms, which are for finger prints. Those have just arrived, I&rsquo;m going to have to get my finger prints taken and fill in a couple of forms and will be sending that off. Must mention that I sent a self-addressed stamped envelope for them, but it appears that the envelope I sent was too small, as they sent a large manila envelope with the BI-9n forms in it, so that was nice that they did that.</p>
<p>So we shall see which we get completed first&hellip; US Citizenship or SA Passport&hellip; let the games begin.</p>
]]></content>
		</item>
		
		<item>
			<title>Owen</title>
			<link>https://reinbach.com/posts/owen/</link>
			<pubDate>Thu, 19 Apr 2007 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/owen/</guid>
			<description>&lt;p&gt;Ok this is old news, but it is the reason for the lack of news of late. A new addition to the family by the name of Owen was delivered on 3rd April at home. Mom did extremely well and both are healthy and back to normal.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Ok this is old news, but it is the reason for the lack of news of late. A new addition to the family by the name of Owen was delivered on 3rd April at home. Mom did extremely well and both are healthy and back to normal.</p>
]]></content>
		</item>
		
		<item>
			<title>Moved</title>
			<link>https://reinbach.com/posts/moved/</link>
			<pubDate>Sat, 03 Mar 2007 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/moved/</guid>
			<description>&lt;p&gt;Crikey, I&amp;rsquo;m buggered!!!! We have moved 90% of our stuff, just have one more trip to get non-essential things I think.&lt;/p&gt;
&lt;p&gt;But am very glad to have gotten the majority of the things to the new place. We are spending our first night at the new place, bed is setup, and am loving it. But I&amp;rsquo;m tired now and am ready to crash.&lt;/p&gt;
&lt;p&gt;Tomorrow will just be returning the Rental truck, hit Costco for a couple of things and maybe, if I&amp;rsquo;m up to it, making that last run to the old place for the last of our things.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Crikey, I&rsquo;m buggered!!!! We have moved 90% of our stuff, just have one more trip to get non-essential things I think.</p>
<p>But am very glad to have gotten the majority of the things to the new place. We are spending our first night at the new place, bed is setup, and am loving it. But I&rsquo;m tired now and am ready to crash.</p>
<p>Tomorrow will just be returning the Rental truck, hit Costco for a couple of things and maybe, if I&rsquo;m up to it, making that last run to the old place for the last of our things.</p>
<p>Home Sweet Home!</p>
]]></content>
		</item>
		
		<item>
			<title>On The Move Again</title>
			<link>https://reinbach.com/posts/on-the-move-again/</link>
			<pubDate>Wed, 28 Feb 2007 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/on-the-move-again/</guid>
			<description>&lt;p&gt;Well we are moving again, but this time just 20 miles. Bought a house in Jupiter Farms, FL and we are closing today. Most excited about that as the house we are renting now is smaller than we like and it has been tricky storing all our things.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a little further from work, so will not be able to pop home for lunch, which is sad. But the place is much larger and we have a decent size yard for the kids to run around in. There is also a pond that has fish, turtles and ducks, so that will be fun as well.Sadly no pool, but we hope to install one in the following year or so. Probably going to get one of those above ground pools which should be funny, but some relieve from the summer heat.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well we are moving again, but this time just 20 miles. Bought a house in Jupiter Farms, FL and we are closing today. Most excited about that as the house we are renting now is smaller than we like and it has been tricky storing all our things.</p>
<p>It&rsquo;s a little further from work, so will not be able to pop home for lunch, which is sad. But the place is much larger and we have a decent size yard for the kids to run around in. There is also a pond that has fish, turtles and ducks, so that will be fun as well.Sadly no pool, but we hope to install one in the following year or so. Probably going to get one of those above ground pools which should be funny, but some relieve from the summer heat.</p>
<p>We&rsquo;ll be moving a few things during the week and then get the big things moved this weekend. The ability to take a bunch of trips is great, we&rsquo;re use to having to pack everything at once.</p>
]]></content>
		</item>
		
		<item>
			<title>Site Upgrade</title>
			<link>https://reinbach.com/posts/site-pgrade/</link>
			<pubDate>Tue, 27 Feb 2007 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/site-pgrade/</guid>
			<description>&lt;p&gt;Just upgraded the site to the latest and greatest version of Drupal (5.1) it was previously on version 4.6. A couple of little hiccups, but nothing serious and we are all set. Took about a half hour so not bad at all. The theme has been changed as the previous theme is not available for 5.1 at the moment, actually I think this theme is better.&lt;/p&gt;
&lt;p&gt;Over all the management part is better, I think, it is easier to move around and get things done. I still need to sort out the gallery as that is only partly installed at the moment, I have run out of time and will get that done when I get a moment to.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just upgraded the site to the latest and greatest version of Drupal (5.1) it was previously on version 4.6. A couple of little hiccups, but nothing serious and we are all set. Took about a half hour so not bad at all. The theme has been changed as the previous theme is not available for 5.1 at the moment, actually I think this theme is better.</p>
<p>Over all the management part is better, I think, it is easier to move around and get things done. I still need to sort out the gallery as that is only partly installed at the moment, I have run out of time and will get that done when I get a moment to.</p>
<p>This is the first blog entry in the blog system that comes with version 5.1, not sure if there was a blog system in the previous version.</p>
]]></content>
		</item>
		
		<item>
			<title>Hi Mom</title>
			<link>https://reinbach.com/posts/hi-mom/</link>
			<pubDate>Sun, 24 Dec 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/hi-mom/</guid>
			<description>&lt;p&gt;This post is in leiu of my Mom finally getting a broadband connection and is now surfing the web. She has visited my site and says that I have not posted in a long time, that there is nothing happening here. So here&amp;rsquo;s to you Mom.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This post is in leiu of my Mom finally getting a broadband connection and is now surfing the web. She has visited my site and says that I have not posted in a long time, that there is nothing happening here. So here&rsquo;s to you Mom.</p>
]]></content>
		</item>
		
		<item>
			<title>Gentoo Maintenance</title>
			<link>https://reinbach.com/posts/gentoo-maintenance/</link>
			<pubDate>Thu, 27 Jul 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/gentoo-maintenance/</guid>
			<description>&lt;p&gt;I&amp;rsquo;m running Gentoo boxes and the following commands help to keep the packages in order and clean.&lt;/p&gt;
&lt;p&gt;I have added the following cron to my crontab to perform a sync on a regular basis so that I keep up to date.
&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;h1 id=&#34;sync-gentoo-updates&#34;&gt;sync gentoo updates&lt;/h1&gt;
&lt;h1 id=&#34;min0-59-hour0-23-day-of-month1-31-month1-12-day-of-week0-6&#34;&gt;min[0-59] hour[0-23] day-of-month[1-31] month[1-12] day-of-week[0-6]&lt;/h1&gt;
&lt;p&gt;15 3 * * 1,3,5  root    emerge &amp;ndash;sync
&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;This cron will run Monday, Wednesday and Friday at 3:15am. This saves me having to perform a sync manually.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>I&rsquo;m running Gentoo boxes and the following commands help to keep the packages in order and clean.</p>
<p>I have added the following cron to my crontab to perform a sync on a regular basis so that I keep up to date.
<!-- raw HTML omitted --></p>
<h1 id="sync-gentoo-updates">sync gentoo updates</h1>
<h1 id="min0-59-hour0-23-day-of-month1-31-month1-12-day-of-week0-6">min[0-59] hour[0-23] day-of-month[1-31] month[1-12] day-of-week[0-6]</h1>
<p>15 3 * * 1,3,5  root    emerge &ndash;sync
<!-- raw HTML omitted --></p>
<p>This cron will run Monday, Wednesday and Friday at 3:15am. This saves me having to perform a sync manually.</p>
<p>Then I can perform an update when ever I want to knowing that the portage list is pretty much up to date, with out having to wait for a sync to happen.
<!-- raw HTML omitted --></p>
<h1 id="emerge-world--uva">emerge world -uva</h1>
<!-- raw HTML omitted -->
<p>The &lsquo;-va&rsquo; options displays in verbose fashion all the USE flags that will be used for each package as well as prompting you to perform this emerge or not.</p>
<p>Then periodically I run the following commands to keep the system clean.
<!-- raw HTML omitted --></p>
<h1 id="emerge---update---deep---newuse-world--va">emerge &ndash;update &ndash;deep &ndash;newuse world -va</h1>
<h1 id="emerge---depclean">emerge &ndash;depclean</h1>
<h1 id="revdep-rebuild">revdep-rebuild</h1>
<!-- raw HTML omitted -->
<p>See the <!-- raw HTML omitted -->Portage Introduction<!-- raw HTML omitted --> doc for complete information on portage.</p>
<p>Or for all <!-- raw HTML omitted -->Gentoo Docs<!-- raw HTML omitted --></p>
]]></content>
		</item>
		
		<item>
			<title>Backup Dvd</title>
			<link>https://reinbach.com/posts/backup-dvd/</link>
			<pubDate>Wed, 05 Jul 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/backup-dvd/</guid>
			<description>&lt;p&gt;A great resource on backing up a DVD can be found at
&lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;http://gentoo-wiki.com/HOWTO_Backup_a_DVD&#34;&gt;http://gentoo-wiki.com/HOWTO_Backup_a_DVD&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;The rest of this page is the steps I take to backup a DVD. At the moment there are a couple of types of DVDs out there which range in size the normal DVD is about 4.7Gig and I believe this is a single layer DVD and then there is the double layer DVD which provides you with about 8Gigs of space. So if you are backing up a DVD make sure you have DVDs that can hold the DVD you are going to backup.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A great resource on backing up a DVD can be found at
<!-- raw HTML omitted --><a href="http://gentoo-wiki.com/HOWTO_Backup_a_DVD">http://gentoo-wiki.com/HOWTO_Backup_a_DVD</a><!-- raw HTML omitted --></p>
<p>The rest of this page is the steps I take to backup a DVD. At the moment there are a couple of types of DVDs out there which range in size the normal DVD is about 4.7Gig and I believe this is a single layer DVD and then there is the double layer DVD which provides you with about 8Gigs of space. So if you are backing up a DVD make sure you have DVDs that can hold the DVD you are going to backup.</p>
<p><!-- raw HTML omitted -->Step 1 - Copy DVD<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
$ vobcopy -m
<!-- raw HTML omitted --></p>
<p>This copies the DVD onto your sytstem and creates a dir with the name of the DVD all in ippercase. So make sure you run this command from the dir you want the backup dir to be placed in.</p>
<p><!-- raw HTML omitted -->Step 2 - Create Image<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
$ mkisofs -dvd-video -o dvd.img DVD_DIR/
<!-- raw HTML omitted --></p>
<p>DVD_DIR/ is the directory that was created by the previous step.
It&rsquo;s good to perform this step as it helps shrink the file size to be able to fit on the DVD and makes for a faster burn.</p>
<p><!-- raw HTML omitted -->Step 3 - Burn It<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
$ growisofs -dvd-compat -Z /dev/dvdrw=dvd.img
<!-- raw HTML omitted --></p>
<p>And that should be it, with you now having a nice backup of your DVD</p>
]]></content>
		</item>
		
		<item>
			<title>Jagvest</title>
			<link>https://reinbach.com/posts/jagvest/</link>
			<pubDate>Wed, 28 Jun 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jagvest/</guid>
			<description>&lt;p&gt;A tool to help identify good investment properties.&lt;/p&gt;
&lt;p&gt;Good investment properties are identified as those that are able to be rented out at a certain rate of return over and above the mortage of the propery in relation to the amount of money invested.&lt;/p&gt;
&lt;p&gt;For example;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Down Payment $20,000&lt;/li&gt;
&lt;li&gt;Property Cost $100,000&lt;/li&gt;
&lt;li&gt;Mortgage $600&lt;/li&gt;
&lt;li&gt;Rent $800&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Rate of return is calculated as follows;
(Rent - Mortgage) / Down Payment
(800 - 600) / 20000 = 0.01
Annualized it would be 12%&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>A tool to help identify good investment properties.</p>
<p>Good investment properties are identified as those that are able to be rented out at a certain rate of return over and above the mortage of the propery in relation to the amount of money invested.</p>
<p>For example;</p>
<ul>
<li>Down Payment $20,000</li>
<li>Property Cost $100,000</li>
<li>Mortgage $600</li>
<li>Rent $800</li>
</ul>
<p>Rate of return is calculated as follows;
(Rent - Mortgage) / Down Payment
(800 - 600) / 20000 = 0.01
Annualized it would be 12%</p>
<p>Will be using the following source for mortgage calculations as they are very well layout out and explained. <!-- raw HTML omitted --><a href="http://www.hughchou.org/calc/formula.html">http://www.hughchou.org/calc/formula.html</a><!-- raw HTML omitted --></p>
<!-- raw HTML omitted -->
<ul>
<li>mortgage calculations</li>
<li>future values</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>The tool will need to be given a number of critieria in order to be able to run its searches. These criteria are identified as follows;</p>
<ul>
<li>region (zip code(s))</li>
<li>desired percent return</li>
<li>down payment</li>
<li>percent of property cost down payment to equal</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>A couple of possible alerts;</p>
<ul>
<li>when the property is no longer available</li>
<li>change in price of property</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Best option would be MLS, but need to get access to all the various MLS listings around the country, could be expensive and lots of programming for each one</p>
<p>Another option is to just scrap off realtor. Not all properties are listed here though, but may be able to be used to identify good regions</p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
]]></content>
		</item>
		
		<item>
			<title>Creating A Dvd</title>
			<link>https://reinbach.com/posts/creating-a-dvd/</link>
			<pubDate>Sat, 17 Jun 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/creating-a-dvd/</guid>
			<description>&lt;p&gt;This is a shortcut of what I need to do in order to create my dvds. For a superb full explanation on creating dvd&amp;rsquo;s see this resource;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;http://forums.gentoo.org/viewtopic-t-117709.html&#34;&gt;http://forums.gentoo.org/viewtopic-t-117709.html&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: &lt;!-- raw HTML omitted --&gt;FILENAME&lt;!-- raw HTML omitted --&gt; - is the name of the dvd you are creating&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;Step 1 - Transcode&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;Transocde AVI file into dvd friendly format.
&lt;!-- raw HTML omitted --&gt;
$ transcode -i FILENAME.avi -y ffmpeg &amp;ndash;export_prof dvd-ntsc &amp;ndash;export_asr 3 -o FILENAME -D0 -b224 -N 0x2000 -s2 -m FILENAME.ac3 -J modfps=clonetype=3 &amp;ndash;export_fps 29.97
&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>This is a shortcut of what I need to do in order to create my dvds. For a superb full explanation on creating dvd&rsquo;s see this resource;</p>
<ul>
<li><!-- raw HTML omitted --><a href="http://forums.gentoo.org/viewtopic-t-117709.html">http://forums.gentoo.org/viewtopic-t-117709.html</a><!-- raw HTML omitted --></li>
</ul>
<p>Note: <!-- raw HTML omitted -->FILENAME<!-- raw HTML omitted --> - is the name of the dvd you are creating</p>
<p><!-- raw HTML omitted -->Step 1 - Transcode<!-- raw HTML omitted --></p>
<p>Transocde AVI file into dvd friendly format.
<!-- raw HTML omitted -->
$ transcode -i FILENAME.avi -y ffmpeg &ndash;export_prof dvd-ntsc &ndash;export_asr 3 -o FILENAME -D0 -b224 -N 0x2000 -s2 -m FILENAME.ac3 -J modfps=clonetype=3 &ndash;export_fps 29.97
<!-- raw HTML omitted --></p>
<p>The above script is for a 16:9 aspect ratio, if you need that to be 4:3 aspect ratio then change the following
<!-- raw HTML omitted -->
&ndash;export_asr 3 =&gt; &ndash;export_asr 2
<!-- raw HTML omitted --></p>
<p>This results in 2 files, once for the video and the other for the sound</p>
<p><!-- raw HTML omitted -->Step 2 - Combine<!-- raw HTML omitted --></p>
<p>Need to combine the video and sound file together
<!-- raw HTML omitted -->
$ mplex -f 8 -o FILENAME_dvd.mpg FILENAME.m2v FILENAME.ac3
<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->Step 3 - Menu<!-- raw HTML omitted --></p>
<p>Create an xml file (this is one without a menu)
<!-- raw HTML omitted -->
&lt;dvdauthor dest=&lsquo;DVD&rsquo;&gt;
     &lt;vmgm /&gt;
      &lt;titleset&gt;
           &lt;titles&gt;
                &lt;video widescreen=&lsquo;nopanscan&rsquo; /&gt;
                &lt;pgc&gt;
                     &lt;vob file=&lsquo;FILENAME_dvd.mpg&rsquo; chapters=&lsquo;0,0:30,1:00,1:30,2:30,3:00,3:30,4:00&rsquo;/&gt;
                &lt;/pgc&gt;
           &lt;/titles&gt;
      &lt;/titleset&gt;
&lt;/dvdauthor&gt;
<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->Step 4 - Author<!-- raw HTML omitted --></p>
<p>This run the xml file through dvdauthor
<!-- raw HTML omitted -->
$ dvdauthor -x dvdauthor.xml
<!-- raw HTML omitted --></p>
<p><!-- raw HTML omitted -->Step 5 - Burn<!-- raw HTML omitted --></p>
<p>Create DVD image that will be used to burn DVD
<!-- raw HTML omitted -->
$ growisofs -Z /dev/dvd -dvd-video DVD/
<!-- raw HTML omitted --></p>
<p>That is is. Except that I should create some scripts for all this and maybe package it into a simple program</p>
]]></content>
		</item>
		
		<item>
			<title>Dual Monitor Setup</title>
			<link>https://reinbach.com/posts/dual-monitor-setup/</link>
			<pubDate>Fri, 16 Jun 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/dual-monitor-setup/</guid>
			<description>&lt;p&gt;At work I have a Sony Vaio [FS950] running Debian and an external 19&amp;rsquo;&amp;rsquo; Monitor that I wanted to connect to expand my desktop. Below is an extract from my xorg.conf file with some explanations about the changes.&lt;/p&gt;
&lt;p&gt;I used the following resources for help;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;http://gentoo-wiki.com/HOWTO_Dual_Monitors&#34;&gt;http://gentoo-wiki.com/HOWTO_Dual_Monitors&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So after much tweaking and playing around below is the part of the xorg.conf file that setup the monitors the way I wanted them.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>At work I have a Sony Vaio [FS950] running Debian and an external 19&rsquo;&rsquo; Monitor that I wanted to connect to expand my desktop. Below is an extract from my xorg.conf file with some explanations about the changes.</p>
<p>I used the following resources for help;</p>
<ul>
<li><!-- raw HTML omitted --><a href="http://gentoo-wiki.com/HOWTO_Dual_Monitors">http://gentoo-wiki.com/HOWTO_Dual_Monitors</a><!-- raw HTML omitted --></li>
</ul>
<p>So after much tweaking and playing around below is the part of the xorg.conf file that setup the monitors the way I wanted them.</p>
<p><!-- raw HTML omitted -->Laptop<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
&mdash; snip &mdash;</p>
<p>Section &lsquo;Device&rsquo;
         Identifier   &lsquo;video0&rsquo;
           Driver   bsp;  BusID   bsp;  Screen   bsp;  Option   itorLayout&rsquo;    &lsquo;CRT,LFP&rsquo;
   Option   e&rsquo;   bsp;  Option   Info&rsquo;   bsp;  Option   ce&rsquo;   &lsquo;false&rsquo;
   Option   bsp;  bsp;  Option   bsp;  dSection</p>
<p>Section &lsquo;Monitor&rsquo;
   Identifier   &lsquo;Laptop Monitor&rsquo;
   Modeline   &lsquo;1280x800@60&rsquo; 83.91 1280 1312 1624 1656 800 816 824 841
   Option   dSection</p>
<p>Section &lsquo;Screen&rsquo;
   Identifier   &lsquo;screen0&rsquo;
   Device   bsp;  Monitor   Monitor&rsquo;
   DefaultDepth   24
   SubSection    &lsquo;Display&rsquo;
      bsp;  bsp;     bsp;  &lsquo;1024x800&rsquo; &lsquo;800x600&rsquo; &lsquo;640x480&rsquo;
   EndSubSection
EndSection</p>
<p>&mdash; snip &mdash;
<!-- raw HTML omitted --></p>
<p>The default xorg.conf file had &lsquo;vesa&rsquo; as the driver and I changed that to i810&rsquo; (I just had to change the text here to &lsquo;i810&rsquo;, and it worked for me)
&lsquo;Clone&rsquo; is set to false as I did not want a duplicate copy of the desktop on my external monitor, but rather to extend it.</p>
<p><!-- raw HTML omitted -->External Monitor<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
&mdash; snip &mdash;</p>
<p>Section &lsquo;Device&rsquo;
   Identifier   &lsquo;video1&rsquo;
   Driver   bsp;  BusID   bsp;  Screen   bsp;  Option   itorLayout&rsquo;    &lsquo;CRT,LFP&rsquo;</p>
<h1 id="option----------metamodes-1600x1200">Option          &lsquo;MetaModes&rsquo; &lsquo;1600x1200&rsquo;</h1>
<p>EndSection</p>
<p>Section &lsquo;Monitor&rsquo;
   Identifier   &lsquo;NEC Monitor&rsquo;
   HorizSync   31-81
   VertRefresh   56-75
   Option   dSection</p>
<p>Section &lsquo;Screen&rsquo;
   Identifier   &lsquo;screen1&rsquo;
   Device   bsp;  Monitor   EC Monitor&rsquo;
   DefaultDepth   24
   SubSection    &lsquo;Display&rsquo;
      bsp;  bsp;     bsp;  bsp;                     Viewport           0 0
   EndSubSection
EndSection</p>
<p>&mdash; snip &mdash;
<!-- raw HTML omitted --></p>
<p>Here I added the external monitor&rsquo;s settings. You ned to know/determine the HorizSync and VertRefresh that is specific to your monitor, a quick way is to boot up a Gnoppix CD and see what it sets for your monitor or look at the specs for the external monitor.</p>
<p>For the external monitor I needed to make sure that the &lsquo;DefaultDepth&rsquo; value had a matching &lsquo;SubSection&rsquo; with a &lsquo;Depth&rsquo; that matched it.</p>
<p>Once I had everything setup I ran into the issue that the external monitor&rsquo;s desktop would scroll, so that it appeared that I had this really large desktop but only a portion of it would show on the monitor and moving the mouse to the edge of the monitor would result in the desktop scrolling in that direction. I did not like that and so that is what the &lsquo;Viewport 0 0&rsquo; line does it. it stops the scrolling.</p>
<p><!-- raw HTML omitted -->Monitor Layout<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
&mdash; snip &mdash;</p>
<p>Section &lsquo;ServerFlags&rsquo;
   Option   &lsquo;Xinerama&rsquo;   &lsquo;on&rsquo;
   Option   &lsquo;RandR&rsquo;   &lsquo;on&rsquo;
EndSection</p>
<p>Section &lsquo;ServerLayout&rsquo;
   Identifier   &lsquo;Default Layout&rsquo;
   Screen   bsp;  &lsquo;screen0&rsquo; 0 0
   Screen   bsp;  &lsquo;screen1&rsquo; RightOf &lsquo;screen0&rsquo;
   InputDevice   &lsquo;Generic Keyboard&rsquo;
   InputDevice   &lsquo;Configured Mouse&rsquo;
   InputDevice   &lsquo;Synaptics Touchpad&rsquo;
   Option   erama&rsquo;&lsquo;on&rsquo;
EndSection</p>
<p>&mdash; snip &mdash;
<!-- raw HTML omitted --></p>
<p>The last section pretty much determines how the monitors play together. So that is it, with these settings for the monitors in your xorg.conf file you should be all set with dual monitors.</p>
]]></content>
		</item>
		
		<item>
			<title>Settled In</title>
			<link>https://reinbach.com/posts/settled-in/</link>
			<pubDate>Fri, 16 Jun 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/settled-in/</guid>
			<description>&lt;p&gt;Ok it has been a while since my last posting, but we are now settled in and I have redone the website, finally. So hopefully it will be a lot easier to manage, which will see me posting more content to the site - time will tell.&lt;/p&gt;
&lt;p&gt;The latest news is that I am now working for &lt;!-- raw HTML omitted --&gt;INTECH&lt;!-- raw HTML omitted --&gt; as a Web Application Developer. I must say I am extremely happy at the moment. The people there are extremely knowledgeable in their fields and the environment is great.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Ok it has been a while since my last posting, but we are now settled in and I have redone the website, finally. So hopefully it will be a lot easier to manage, which will see me posting more content to the site - time will tell.</p>
<p>The latest news is that I am now working for <!-- raw HTML omitted -->INTECH<!-- raw HTML omitted --> as a Web Application Developer. I must say I am extremely happy at the moment. The people there are extremely knowledgeable in their fields and the environment is great.</p>
<p>On the personal side Laura and I are going to be attempting to do some Triahtlons etc, this is really a goal we have set, that will see us getting back into shape. It has been a while since we were last in shape. I have been running a bit lately, so we are making slow progress, but progress nevertheless.</p>
<p>We have just bought a minivan on eBay of all places and need to pick it up next week, so that is exciting. Sadly that will see us retiring the white subaru, which has served us well over the last few years. Sadly the lack of airconditioning is a big issue here in Florida, go figure. Also the body is taking great strain with rust appearing everywhere. And not to mention the hubcabs going walk about. Lost one, but was able to recover the other as I saw it rolling down the road!</p>
<p>That&rsquo;s it for news, have some other content to get up.</p>
]]></content>
		</item>
		
		<item>
			<title>Fl Or Bust!!</title>
			<link>https://reinbach.com/posts/fl-or-bust/</link>
			<pubDate>Sun, 02 Apr 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/fl-or-bust/</guid>
			<description>&lt;p&gt;Well we are on our way, after a long night and day of packing/cleaning etc we have finally begun our move to FL.&lt;/p&gt;
&lt;p&gt;Almost got the UHaul stuck in the driveway, but after a few planks and bakc and forths managed to get the truck back to the beginning of the driveway and ended up having to carry everything through the mud to the UHaul and packed it.&lt;/p&gt;
&lt;p&gt;Spent most of the evening getting the heavy things packed with the help of my colleagues. Then spent the next day finishing up the &amp;ldquo;small&amp;rdquo; stuff and cleaning, which ended up taking the better part of the day. We packed everything in the UHaul and then thought about staying the evening and leaving in the morning, but I refused to unpack anything, so we finished cleaning up and started our trip at 6pm!! Drove to North Conway and had MacDonalds for dinner!!! Then really started on the trip.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well we are on our way, after a long night and day of packing/cleaning etc we have finally begun our move to FL.</p>
<p>Almost got the UHaul stuck in the driveway, but after a few planks and bakc and forths managed to get the truck back to the beginning of the driveway and ended up having to carry everything through the mud to the UHaul and packed it.</p>
<p>Spent most of the evening getting the heavy things packed with the help of my colleagues. Then spent the next day finishing up the &ldquo;small&rdquo; stuff and cleaning, which ended up taking the better part of the day. We packed everything in the UHaul and then thought about staying the evening and leaving in the morning, but I refused to unpack anything, so we finished cleaning up and started our trip at 6pm!! Drove to North Conway and had MacDonalds for dinner!!! Then really started on the trip.</p>
<p>We made it to Boston that evening and stayed there, so a whopping 2hrs first leg.</p>
<p>Well the next day we pretty much double that to 4hrs and have made it to NY and are staying the evening with Linda and Scott. Tomorrow I think we will do a little further, and before we know it we will have made it the whole way. No need making it torturious(sp?).</p>
<p>So at the moment we&rsquo;re at the Warnash&rsquo;s and having a great relaxing time with them.</p>
]]></content>
		</item>
		
		<item>
			<title>Postgres</title>
			<link>https://reinbach.com/posts/postgres/</link>
			<pubDate>Wed, 15 Mar 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/postgres/</guid>
			<description>&lt;p&gt;Well I took it upon myself to have a look at Postgres (&lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;https://www.postgres.com&#34;&gt;www.postgres.com&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;) . So I set up postgres on my dev box and played around with it a bit. It definitely has a few more features than MySQL and is a lot more concerned about rights and permissions. Some nice features are the sequences for primary keys are automatically setup up/managed by the system and there is no need to manually handle this as in MySQL.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well I took it upon myself to have a look at Postgres (<!-- raw HTML omitted --><a href="https://www.postgres.com">www.postgres.com</a><!-- raw HTML omitted -->) . So I set up postgres on my dev box and played around with it a bit. It definitely has a few more features than MySQL and is a lot more concerned about rights and permissions. Some nice features are the sequences for primary keys are automatically setup up/managed by the system and there is no need to manually handle this as in MySQL.</p>
<p>I then decided to see what it would take to port JaG CMS from MySQL to Postgres, and was really impressed with how little it took. I did actually find a couple of little things as well as bug or two in my sql queries. But it really did not take much time at all, less than an hour I would say. Most of it trouble shooting my bugs and working out that Postgres does not like integer statements in the where clause (eg: WHERE 1) but rather that it needs to be a boolean statement (eg: WHERE 1 = 1)</p>
<p>So all in all I was impressed with Postgres and hope that I willmake more use of it in the future.</p>
<p>I realize that MySQL is/has developed a lot of the functionality that Postgres already has, like Stored Procedures, Triggers etc. but I don&rsquo;t think it hurts to know a number of databases really well.</p>
]]></content>
		</item>
		
		<item>
			<title>I&#39;M Back</title>
			<link>https://reinbach.com/posts/im-back/</link>
			<pubDate>Mon, 13 Mar 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/im-back/</guid>
			<description>&lt;p&gt;Have just been on a business trip to Vail. Honest it was a business trip, although I had to get up on the mountain and that was for business purposes as well.&lt;/p&gt;
&lt;p&gt;We have developed an event management system for AA Events, who have 2 events each year one Ski event in Vail, CO and a Golf event in Newport Beach, CA which has now moved to San Diego, CA.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Have just been on a business trip to Vail. Honest it was a business trip, although I had to get up on the mountain and that was for business purposes as well.</p>
<p>We have developed an event management system for AA Events, who have 2 events each year one Ski event in Vail, CO and a Golf event in Newport Beach, CA which has now moved to San Diego, CA.</p>
<p>The system handles registration of attendees to get the people into the system then the staff have a number of sub systems in the backend to fulfill their tasks which range from assigning Flights, Hotel accommodation, ballroom seating through, silent and live Auction system to a section for Sponsors to enter in their information and seat their people. There is actually a multitude of functionality in the background which has grown and been tweaked over the course of the last few years.</p>
<p>The registration part is being refactored as that is not working how we want it to, there are still a couple of user issues we are running into to. At the same time the front end of the website is going to be redone, so that it ties in more closely with the backend and there will be a smoother transistion from there to the registration for the various events.</p>
<p>Did manage to have one day of relaxation with the family in FL, would have liked that to have been more but not the case this time.</p>
<p>So you see it was a business trip to Vail, CO. The skiing was good, but sadly there had not been any snow for the last week or so when we arrived, so it was well groomed runs for the most part.</p>
]]></content>
		</item>
		
		<item>
			<title>Django</title>
			<link>https://reinbach.com/posts/django/</link>
			<pubDate>Mon, 20 Feb 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/django/</guid>
			<description>&lt;p&gt;Ok so a week or so ago I was looking into TurboGears and thinking that it is pretty decent, and then I come across DJango [&lt;!-- raw HTML omitted --&gt;www.djangoproject.com&lt;!-- raw HTML omitted --&gt;].&lt;/p&gt;
&lt;p&gt;Now which is better and which to spend one&amp;rsquo;s time learning? Here I have been looking for some decent Python Web framework and suddenly come across 2. Well it does appear the DJango attempts to handle all aspects of the framework, while TruboGears brought together a number of pieces to create the whole.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Ok so a week or so ago I was looking into TurboGears and thinking that it is pretty decent, and then I come across DJango [<!-- raw HTML omitted -->www.djangoproject.com<!-- raw HTML omitted -->].</p>
<p>Now which is better and which to spend one&rsquo;s time learning? Here I have been looking for some decent Python Web framework and suddenly come across 2. Well it does appear the DJango attempts to handle all aspects of the framework, while TruboGears brought together a number of pieces to create the whole.</p>
<p>So each way has it&rsquo;s pros and cons, both of near version 1 release. I&rsquo;m going to  spend sometime with both, which will help me to learn both of them as well as at the same time getting more comfortable with Python and how it does its thing.</p>
<p>I have TurboGears setup already and have started playing with it, so I&rsquo;ll run through a few more tutorials on that and give it a go, after that I&rsquo;ll move onto DJango and see how that feels.</p>
]]></content>
		</item>
		
		<item>
			<title>Turbogears</title>
			<link>https://reinbach.com/posts/turbogears/</link>
			<pubDate>Fri, 10 Feb 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/turbogears/</guid>
			<description>&lt;p&gt;Over the last few years I have been very interested in the Python programming language andd learning the ins and outs of it. But for whatever reason have not really taken to it. Most of my development is for the web and so have always looked at a language to see how that could help me. And with Python I had not found anything that worked well for me with the web. mod_python just didn&amp;rsquo;t do it for me.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Over the last few years I have been very interested in the Python programming language andd learning the ins and outs of it. But for whatever reason have not really taken to it. Most of my development is for the web and so have always looked at a language to see how that could help me. And with Python I had not found anything that worked well for me with the web. mod_python just didn&rsquo;t do it for me.</p>
<p>Well that was until I came across TurboGears [<!-- raw HTML omitted -->http://www.turbogears.org<!-- raw HTML omitted -->] Very much along the lines of Rails. Just set it up on my machine and going through it, and so far it is very impressive. Maybe this will be the tipping point for me to really get to learn Python.</p>
]]></content>
		</item>
		
		<item>
			<title>Modulization!</title>
			<link>https://reinbach.com/posts/modulization/</link>
			<pubDate>Mon, 06 Feb 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/modulization/</guid>
			<description>&lt;p&gt;Sweet, looks like I have finally worked out a way, that I am happy with, to modularize.&lt;/p&gt;
&lt;p&gt;Been working on JaG CMS of late and have a nice code base there from which to start most projects. So spent the last week working out the best way to extend this code base, and ideally that would be through modules.&lt;/p&gt;
&lt;p&gt;I had a couple of requirements for the modules that I wanted to achieve, which were;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Sweet, looks like I have finally worked out a way, that I am happy with, to modularize.</p>
<p>Been working on JaG CMS of late and have a nice code base there from which to start most projects. So spent the last week working out the best way to extend this code base, and ideally that would be through modules.</p>
<p>I had a couple of requirements for the modules that I wanted to achieve, which were;</p>
<ol>
<li>
<p>minimal impact on the code base. meaning I did not want to have to update the code base whenever a module was installed. The code base needed to exist as it was. I didn&rsquo;t mind making changes to the code base to handle modules, but that was to be a change for modules as a whole to make use of the code base.</p>
</li>
<li>
<p>1 location of module files. This would lead to easy management and maintenance of each module</p>
</li>
</ol>
<p>So spent the week creating a catalog module and have most of that achieved with the requirements above. Just need to complete the coding of the module, which should not take much longer, but the module code is sitting in a separate directory from the code base, and is interacting with the code base as needed.</p>
<p>Will be spending this week completing it and then creating some sort of managment interface to modules. After that I will be working on plugins, how to create those and have them interact with the code base.</p>
]]></content>
		</item>
		
		<item>
			<title>Jugging Along</title>
			<link>https://reinbach.com/posts/jugging-along/</link>
			<pubDate>Thu, 26 Jan 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jugging-along/</guid>
			<description>&lt;p&gt;Have made a few quick releases of JaG CMS, due to a couple of issues that were identified as well as a few small improvements made. So JaG CMS is settling down really nicely at the moment.&lt;/p&gt;
&lt;p&gt;Have moved onto the development of modules for JaG CMS, wanting to make it simple and easy to develop/create modules that can be added and removed easily from the core code base.&lt;/p&gt;
&lt;p&gt;The first module that is being worked on is a catalog module with the idea that this will a part of an online shopping system that sits on JaG CMS.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Have made a few quick releases of JaG CMS, due to a couple of issues that were identified as well as a few small improvements made. So JaG CMS is settling down really nicely at the moment.</p>
<p>Have moved onto the development of modules for JaG CMS, wanting to make it simple and easy to develop/create modules that can be added and removed easily from the core code base.</p>
<p>The first module that is being worked on is a catalog module with the idea that this will a part of an online shopping system that sits on JaG CMS.</p>
]]></content>
		</item>
		
		<item>
			<title>Jag Cms Released</title>
			<link>https://reinbach.com/posts/jag-cms-released/</link>
			<pubDate>Sat, 21 Jan 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jag-cms-released/</guid>
			<description>&lt;p&gt;Have just made our first release of JaG CMS on sourceforge [&lt;!-- raw HTML omitted --&gt;jagcms.com&lt;!-- raw HTML omitted --&gt;]
That was a big milestone for us, to actually get it out there. The basic premise of the CMS is completed and from here it should just be simple tweaks and probably many bug fixes, but I believe it is not a bad release.&lt;/p&gt;
&lt;p&gt;Now to let developers know about it so more testing can be performed and some feedback generated. That should help us to make sure it is a decent product.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Have just made our first release of JaG CMS on sourceforge [<!-- raw HTML omitted -->jagcms.com<!-- raw HTML omitted -->]
That was a big milestone for us, to actually get it out there. The basic premise of the CMS is completed and from here it should just be simple tweaks and probably many bug fixes, but I believe it is not a bad release.</p>
<p>Now to let developers know about it so more testing can be performed and some feedback generated. That should help us to make sure it is a decent product.</p>
]]></content>
		</item>
		
		<item>
			<title>Installation Script Almost Done</title>
			<link>https://reinbach.com/posts/installation-script-almost-done/</link>
			<pubDate>Thu, 19 Jan 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/installation-script-almost-done/</guid>
			<description>&lt;p&gt;Been working on the installation script for JaG CMS and am about half way through it, should be another day or two and be able to release the code.&lt;/p&gt;
&lt;p&gt;Been interesting in working out how to handle the transistion from no libraries available at the beginning of the installation to a gradual addition of libraries of the code base as parts are set up.&lt;/p&gt;
&lt;p&gt;For example have no templating engine available to handle the presentation logic, but after the first step this is available. The step after that will add the db abstraction layer, as the parameters of the db are provided.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Been working on the installation script for JaG CMS and am about half way through it, should be another day or two and be able to release the code.</p>
<p>Been interesting in working out how to handle the transistion from no libraries available at the beginning of the installation to a gradual addition of libraries of the code base as parts are set up.</p>
<p>For example have no templating engine available to handle the presentation logic, but after the first step this is available. The step after that will add the db abstraction layer, as the parameters of the db are provided.</p>
<p>So have found that interest in solving. But now that I have the design it is flowing easily together.</p>
]]></content>
		</item>
		
		<item>
			<title>Jag Cms</title>
			<link>https://reinbach.com/posts/jag-cms/</link>
			<pubDate>Mon, 16 Jan 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/jag-cms/</guid>
			<description>&lt;p&gt;Been working steadily on JaG CMS of late, almost there with it.&lt;/p&gt;
&lt;p&gt;It is a simple website CMS system, that allows a user to manage a website, by adding/editing pages and content. Have not made a code release as yet, but that should be in the next week or so. Having to complete the installation script and we should be able to make the first release.&lt;/p&gt;
&lt;p&gt;For more informaiton you can find it on &lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;http://sourceforge.net/projects/jagcms&#34;&gt;http://sourceforge.net/projects/jagcms&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Been working steadily on JaG CMS of late, almost there with it.</p>
<p>It is a simple website CMS system, that allows a user to manage a website, by adding/editing pages and content. Have not made a code release as yet, but that should be in the next week or so. Having to complete the installation script and we should be able to make the first release.</p>
<p>For more informaiton you can find it on <!-- raw HTML omitted --><a href="http://sourceforge.net/projects/jagcms">http://sourceforge.net/projects/jagcms</a><!-- raw HTML omitted --></p>
]]></content>
		</item>
		
		<item>
			<title>Reinbach.Com Update</title>
			<link>https://reinbach.com/posts/reinbach-com-update/</link>
			<pubDate>Sun, 08 Jan 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/reinbach-com-update/</guid>
			<description>&lt;p&gt;Made some simple updates to the site, making it more functional and fixed a few bugs. Also cleaned up the menu and the work section bringing it up to date.&lt;/p&gt;
&lt;p&gt;On a new schedule that sees me getting up way before the crack of dawn. Now getting up around 4am, I like this time of day as it is very quiet, most of the family not running around like crazy, so I can get some decent work done. This also sees me crashing real early in the evening.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Made some simple updates to the site, making it more functional and fixed a few bugs. Also cleaned up the menu and the work section bringing it up to date.</p>
<p>On a new schedule that sees me getting up way before the crack of dawn. Now getting up around 4am, I like this time of day as it is very quiet, most of the family not running around like crazy, so I can get some decent work done. This also sees me crashing real early in the evening.</p>
]]></content>
		</item>
		
		<item>
			<title>We&#39;Re Back</title>
			<link>https://reinbach.com/posts/we-re-back/</link>
			<pubDate>Sun, 08 Jan 2006 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/we-re-back/</guid>
			<description>&lt;p&gt;Just had a fantastic month long trip to South Africa, visiting the family for Christmas. Now I&amp;rsquo;m back and getting all sorted out for 2006. Big big plans for this year.&lt;/p&gt;
&lt;p&gt;Have a number of ideas and am looking to get them implemented this year.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Just had a fantastic month long trip to South Africa, visiting the family for Christmas. Now I&rsquo;m back and getting all sorted out for 2006. Big big plans for this year.</p>
<p>Have a number of ideas and am looking to get them implemented this year.</p>
]]></content>
		</item>
		
		<item>
			<title>South Africa Trip</title>
			<link>https://reinbach.com/posts/south-africa-trip/</link>
			<pubDate>Thu, 29 Dec 2005 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/south-africa-trip/</guid>
			<description>&lt;p&gt;We are currently in South Africa having a fantastic time with the family. Just spent a week in mBona with everyone and it was fantastic. Sadly our holiday is coming to an end and we will have to head home on Monday (2nd). Have had plenty of time to chill and have some big ideas for the new year and the years to follow. We shall see if I can implement them.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>We are currently in South Africa having a fantastic time with the family. Just spent a week in mBona with everyone and it was fantastic. Sadly our holiday is coming to an end and we will have to head home on Monday (2nd). Have had plenty of time to chill and have some big ideas for the new year and the years to follow. We shall see if I can implement them.</p>
]]></content>
		</item>
		
		<item>
			<title>I&#39;M Back!!</title>
			<link>https://reinbach.com/posts/i-m-back/</link>
			<pubDate>Thu, 31 Mar 2005 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/i-m-back/</guid>
			<description>&lt;p&gt;Wow, it has been a long time. Ok so I&amp;rsquo;m finally talking to myself again.&lt;/p&gt;
&lt;p&gt;What is news. Well this site is damn old and need of a major update. So first things first that will be the album, as the wife is asking for that, and so that makes it the highest priority. Yes I know, I know.&lt;/p&gt;
&lt;p&gt;Will be back shortly with the album. Till next time.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Wow, it has been a long time. Ok so I&rsquo;m finally talking to myself again.</p>
<p>What is news. Well this site is damn old and need of a major update. So first things first that will be the album, as the wife is asking for that, and so that makes it the highest priority. Yes I know, I know.</p>
<p>Will be back shortly with the album. Till next time.</p>
]]></content>
		</item>
		
		<item>
			<title>Wow!</title>
			<link>https://reinbach.com/posts/wow/</link>
			<pubDate>Thu, 25 Nov 2004 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/wow/</guid>
			<description>&lt;p&gt;It has been an extremely long time since I added anything to the journal.&lt;/p&gt;
&lt;p&gt;Well well what can I say. We have since moved to Fryeburg, Maine and winter is fast approaching.&lt;/p&gt;
&lt;p&gt;Family is all well and good. With the new year rapidly approaching I think I will get a jump start on resolutions and start with me keeping this site more up to date.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>It has been an extremely long time since I added anything to the journal.</p>
<p>Well well what can I say. We have since moved to Fryeburg, Maine and winter is fast approaching.</p>
<p>Family is all well and good. With the new year rapidly approaching I think I will get a jump start on resolutions and start with me keeping this site more up to date.</p>
]]></content>
		</item>
		
		<item>
			<title>We&#39;Re Moving</title>
			<link>https://reinbach.com/posts/were-moving/</link>
			<pubDate>Mon, 24 Nov 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/were-moving/</guid>
			<description>&lt;p&gt;That&amp;rsquo;s right, we are heading East to North Conway, New Hamshire. Do not know where we will be staying exactly at the moment, that is still being decided. Will be renting at first though. But we have been offered a position at a small company called Glen Group [&lt;!-- raw HTML omitted --&gt;www.glengroup.com&lt;!-- raw HTML omitted --&gt;] Joining their web deparment and hopefully going to be doing some great things there.
&lt;!-- raw HTML omitted --&gt;
Will keep you all posted as to our location details etc.
&lt;!-- raw HTML omitted --&gt;
We head out on the 6th December and hope to be in a place by the 12th December at the latest. Not sure how long it will take us to get connected to the Net though!&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>That&rsquo;s right, we are heading East to North Conway, New Hamshire. Do not know where we will be staying exactly at the moment, that is still being decided. Will be renting at first though. But we have been offered a position at a small company called Glen Group [<!-- raw HTML omitted -->www.glengroup.com<!-- raw HTML omitted -->] Joining their web deparment and hopefully going to be doing some great things there.
<!-- raw HTML omitted -->
Will keep you all posted as to our location details etc.
<!-- raw HTML omitted -->
We head out on the 6th December and hope to be in a place by the 12th December at the latest. Not sure how long it will take us to get connected to the Net though!</p>
]]></content>
		</item>
		
		<item>
			<title>Sick Boys</title>
			<link>https://reinbach.com/posts/sick-boys/</link>
			<pubDate>Sat, 22 Nov 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/sick-boys/</guid>
			<description>&lt;p&gt;Well Ethan has been really sick for the past week, but thankfully he is on the mend slowly. He was really out of it last weekend. He could barely move and has lost a lot of weight.
&lt;!-- raw HTML omitted --&gt;
Trying to get him to take his medicine is an ordeal and has not helped much at all. But he is now eating like a champ and sounding a lot perkier.
&lt;!-- raw HTML omitted --&gt;
Not to be out done Luke has now fallen sick as well, but does not look to be as bad as what Ethan had. He has a barking cough at the moment, but his spirits are still high.&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Well Ethan has been really sick for the past week, but thankfully he is on the mend slowly. He was really out of it last weekend. He could barely move and has lost a lot of weight.
<!-- raw HTML omitted -->
Trying to get him to take his medicine is an ordeal and has not helped much at all. But he is now eating like a champ and sounding a lot perkier.
<!-- raw HTML omitted -->
Not to be out done Luke has now fallen sick as well, but does not look to be as bad as what Ethan had. He has a barking cough at the moment, but his spirits are still high.</p>
]]></content>
		</item>
		
		<item>
			<title>Snow!!!!</title>
			<link>https://reinbach.com/posts/snow/</link>
			<pubDate>Fri, 31 Oct 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/snow/</guid>
			<description>&lt;p&gt;We have just had our first snow of the season.. an inch or so in places, but never the less snow. Temperature is dropped as well, was 11 F (-11C) this morning on the way to work&amp;hellip; brrrr&amp;hellip; still in autumn mode, so need to break out of that and start wearing warmer close, cause it is getting chilly&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>We have just had our first snow of the season.. an inch or so in places, but never the less snow. Temperature is dropped as well, was 11 F (-11C) this morning on the way to work&hellip; brrrr&hellip; still in autumn mode, so need to break out of that and start wearing warmer close, cause it is getting chilly</p>
]]></content>
		</item>
		
		<item>
			<title>Reach For Your Skis Is Back!!!</title>
			<link>https://reinbach.com/posts/reach-for-your-skis-is-back/</link>
			<pubDate>Wed, 15 Oct 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/reach-for-your-skis-is-back/</guid>
			<description>&lt;p&gt;Oh my goodness, the Reach for Your Skis site has been resurrected from the grave. Last time this was touched was back in 2000. It had a dual purpose of being a functional site for the club, but also as a project for school. Well definitely going to have to do some work  on it to make it functional again.&lt;!-- raw HTML omitted --&gt;
But alas it is there.
[&lt;!-- raw HTML omitted --&gt;ski.reinbach.com&lt;!-- raw HTML omitted --&gt;]&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Oh my goodness, the Reach for Your Skis site has been resurrected from the grave. Last time this was touched was back in 2000. It had a dual purpose of being a functional site for the club, but also as a project for school. Well definitely going to have to do some work  on it to make it functional again.<!-- raw HTML omitted -->
But alas it is there.
[<!-- raw HTML omitted -->ski.reinbach.com<!-- raw HTML omitted -->]</p>
]]></content>
		</item>
		
		<item>
			<title>The Album Is Up!!!</title>
			<link>https://reinbach.com/posts/the-album-is-up/</link>
			<pubDate>Sun, 12 Oct 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/the-album-is-up/</guid>
			<description>&lt;p&gt;Finally I have the album up and running. Even added some pictures. You can access the album directly at &lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;http://album.reinbach.com&#34;&gt;http://album.reinbach.com&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Finally I have the album up and running. Even added some pictures. You can access the album directly at <!-- raw HTML omitted --><a href="http://album.reinbach.com">http://album.reinbach.com</a><!-- raw HTML omitted --></p>
]]></content>
		</item>
		
		<item>
			<title>Album Coming</title>
			<link>https://reinbach.com/posts/album-coming/</link>
			<pubDate>Thu, 09 Oct 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/album-coming/</guid>
			<description>&lt;p&gt;Ok, everyone is complaining for lack of an album, I&amp;rsquo;ll be sorting that out this week and get it up there. We do have tons of pics and just need to get the album setup. So hang in there a little longer and we will get it out there.
&lt;!-- raw HTML omitted --&gt;
Honest!!!&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Ok, everyone is complaining for lack of an album, I&rsquo;ll be sorting that out this week and get it up there. We do have tons of pics and just need to get the album setup. So hang in there a little longer and we will get it out there.
<!-- raw HTML omitted -->
Honest!!!</p>
]]></content>
		</item>
		
		<item>
			<title>Vacation Time</title>
			<link>https://reinbach.com/posts/vacation-time/</link>
			<pubDate>Tue, 07 Oct 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/vacation-time/</guid>
			<description>&lt;p&gt;After a 2 week vacation, had to go back to work today : (&lt;!-- raw HTML omitted --&gt;
Had an awesome trip though. The family climbed in the car and promptly placed 4300 miles of the odometer after a 7 state trip.&lt;!-- raw HTML omitted --&gt;
States visited were;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Idaho, really liked Sandpoint&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;li&gt;Washington&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;li&gt;Oregon&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;li&gt;California, drove the whole coastline, blew through San Francisco and popped inland to Lake Tahoe and Yosemite, back to the coast near Monteray Bay down along the rest of the coast line, spent a week in San Diego and visited Sea World, San Diego Zoo and the Wild Animal Park&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;li&gt;Nevada&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;li&gt;Arizona&lt;!-- raw HTML omitted --&gt;&lt;/li&gt;
&lt;li&gt;Utah&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
I think Ethan watched Dumbo a 100 times and never saw any of the scenery.&lt;/li&gt;
&lt;/ul&gt;</description>
			<content type="html"><![CDATA[<p>After a 2 week vacation, had to go back to work today : (<!-- raw HTML omitted -->
Had an awesome trip though. The family climbed in the car and promptly placed 4300 miles of the odometer after a 7 state trip.<!-- raw HTML omitted -->
States visited were;<!-- raw HTML omitted --></p>
<ul>
<li>Idaho, really liked Sandpoint<!-- raw HTML omitted --></li>
<li>Washington<!-- raw HTML omitted --></li>
<li>Oregon<!-- raw HTML omitted --></li>
<li>California, drove the whole coastline, blew through San Francisco and popped inland to Lake Tahoe and Yosemite, back to the coast near Monteray Bay down along the rest of the coast line, spent a week in San Diego and visited Sea World, San Diego Zoo and the Wild Animal Park<!-- raw HTML omitted --></li>
<li>Nevada<!-- raw HTML omitted --></li>
<li>Arizona<!-- raw HTML omitted --></li>
<li>Utah<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
I think Ethan watched Dumbo a 100 times and never saw any of the scenery.</li>
</ul>
]]></content>
		</item>
		
		<item>
			<title>Journal System In Place</title>
			<link>https://reinbach.com/posts/journal-system-in-place/</link>
			<pubDate>Mon, 06 Oct 2003 00:00:00 +0000</pubDate>
			<author>greg@reinbach.com (Greg Reinbach)</author>
			<guid>https://reinbach.com/posts/journal-system-in-place/</guid>
			<description>&lt;p&gt;Finally have the journal system in place, so you should be able to get a steady stream of updates about what is happening with us now. About time, right!!&lt;/p&gt;</description>
			<content type="html"><![CDATA[<p>Finally have the journal system in place, so you should be able to get a steady stream of updates about what is happening with us now. About time, right!!</p>
]]></content>
		</item>
		
	</channel>
</rss>
