Skip to content

Instantly share code, notes, and snippets.

@deinspanjer
deinspanjer / pg_deploy_create_table.tmpl
Last active October 9, 2016 13:02
Sqitch create table templates for pg engine
-- Deploy [% project %]:[% change %] to [% engine %]
[% FOREACH item IN requires -%]
-- requires: [% item %]
[% END -%]
[% FOREACH item IN conflicts -%]
-- conflicts: [% item %]
[% END -%]
BEGIN;
@deinspanjer
deinspanjer / date_and_time_dimensions.sql
Created June 29, 2016 20:08
Magic Date and Time dimensions in PostgreSQL for a data warehouse
BEGIN;
CREATE TABLE dwh.d_date
(
date_key CHAR(10) PRIMARY KEY NOT NULL,
full_date DATE NOT NULL
);
CREATE UNIQUE INDEX d_date_full_date_uindex ON dwh.d_date (full_date);
INSERT INTO dwh.d_date
class install_nightly {
$ci_base_url = hiera("ci_base_url")
$ci_index_page = hiera("ci_index_page")
$download_path = hiera("download_path")
$build_version = hiera("build_version")
$build_arch = hiera("build_arch")
$build_exe = hiera("build_exe")
$build_name = hiera("build_name")
---
build_version : '5.4.0.0'
build_arch : 'x64'
build_exe : 'bin'
build_name : 'pentaho-business-analytics'
ci_base_url : 'http://build/hosted'
ci_index_page : "%{hiera('ci_base_url')}/%{hiera('build_version')}/index.html"
build_number : "%{most_recent_build_number('%{hiera("ci_index_page")}')}"

Keybase proof

I hereby claim:

  • I am deinspanjer on github.
  • I am deinspanjer (https://keybase.io/deinspanjer) on keybase.
  • I have a public key whose fingerprint is 1080 6154 9E69 6FA5 D351 A532 9001 A7B5 6F57 1C60

To claim this, I am signing this object:

// Import the interface to Tessel hardware
var tessel = require('tessel');
// Set the led pins as outputs with initial states
// Truthy initial state sets the pin high
// Falsy sets it low.
var led1 = tessel.led[0].output(0);
var led2 = tessel.led[1].output(0);
uniqueMembers="true" means that there will never be another member with the same value at this level.
Imagine a People dimension filled with only people from the USA.
We'll have a couple of different levels, completely weird and made up. :)
Country of Birth
Gender
Surname
Given Name
Social Security Number
Attitude (Either Optimist or Pessimist)
#!/bin/bash
usage ()
{
cat <<UsageHERE
boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host
Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT
or boot2docker-fwd -d RULE_NAME
or boot2docker-fwd -l
or boot2docker-fwd -A
> show dbs
foodmart 0.453125GB
local 0.078125GB
test (empty)
> use foodmart
switched to db foodmart
> show collections
category
currency
customer
2014-02-14 15:10:11,184 INFO [org.pentaho.di] 2014/02/14 15:10:11 - General - Logging plugin type found with ID: CheckpointLogTable
2014-02-14 15:10:23,413 INFO [org.pentaho.di] 2014/02/14 15:10:23 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2014-02-14 15:10:23,447 INFO [org.pentaho.di] 2014/02/14 15:10:23 - General - Creating repository meta store interface
2014-02-14 15:10:23,502 INFO [org.pentaho.di] 2014/02/14 15:10:23 - General - Created default namespace "pentaho"
2014-02-14 15:10:23,502 INFO [org.pentaho.di] 2014/02/14 15:10:23 - General - Connected to the enterprise repository
2014-02-14 15:10:25,696 ERROR [org.pentaho.platform.util.logging.Logger] Error: Pentaho
2014-02-14 15:10:25,697 ERROR [org.pentaho.platform.util.logging.Logger] misc-org.pentaho.platform.plugin.services.importer.ArchiveLoader: Could not import: General Error : {0}
org.pentaho.platform.plugin.services.importer.PlatformImportException: Could not import: General Error : {0}
at org.pentaho.platform.plug