Skip to content

Instantly share code, notes, and snippets.

@jabley
jabley / convert2csv.sh
Created September 13, 2012 11:05
Scripts to help with converting an Oracle .dmp to CSV
#!/bin/sh
# script to automate the load and export to CSV of an oracle dump
# This script assumes:
# * you have the vagrant published key available locally in your .ssh directory
# * You have the Oracle VirtualBox image running locally
# ** ssh port-forwarding is configured for host port 2022 -> guess port 22.
set -e
@jabley
jabley / coed-ethics.org
Last active July 21, 2018 19:37
Note from CoEd Ethics, London 2018

CoEd:Ethics

Introduction by Anne Currie (@anne_e_currie)

  • Why are we here?
    • Is there a problem with ethics in and around technology use at the moment?
    • If there is an issue, what can we as engineers do about it?
      • What might stop me?
      • How can I get around that?
  • There is a workbook for the conference
    • It looks a bit like the ones DareConf used to do
@jabley
jabley / gist:896713
Created March 31, 2011 16:36
Hibernate Stack Trace (constraint violation during batch update)
Could not execute JDBC batch update; SQL [insert into IdentityKey (accessCount, created, lastAccessed, profile_uid, quality, validUntil, authkey) values (?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:637)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:881)
at com.bemoko.live.platform.mwc.plugins.ContextPlugins.execute(ContextPlugins.java:446)
... 62 more
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute
@jabley
jabley / image.go
Created March 29, 2018 16:02
Generate a tracking pixel image
package main
import (
"encoding/base64"
"log"
"os"
)
func main() {
b64 := "R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs="
@jabley
jabley / allspaw.md
Last active December 26, 2017 13:36
SREcon preparation reading lists

Writing Post Mortems - John Allspaw

This talk is also known as ‘PostMortem Facilitation: Theory and Practice of "New View" Debriefings’ Background reading for attendees

@jabley
jabley / oracle2mysql.sed
Created July 12, 2012 10:43
Help convert Oracle DDL to MySQL
s/NUMBER(22,0)/BIGINT/
s/NUMBER(9,0)/INT/
s/NUMBER(8,0)/INT/
s/NUMBER(6,0)/MEDIUMINT/
s/NUMBER(5,0)/SMALLINT/
s/NUMBER(3,0)/TINYINT/
s/NUMBER(2,0)/TINYINT/
s/NUMBER(1,0)/BIT/
s/NUMBER(16,2)/DECIMAL(16,2)/
s/NUMBER(11,2)/DECIMAL(11,2)/
> git clone https://git.haskell.org/ghc.git
Cloning into 'ghc'...
remote: Counting objects: 429508, done.
remote: Compressing objects: 100% (89887/89887), done.
Receiving objects: 20% (85902/429508), 15.03 MiB | 2.85 MiB/s Receiving objects: 21% (90197/429508), 17.63 MiB | 3.24 MiB/s Receiving objects: 22% (94492/429508), 17.63 MiB | 3.24 MiB/s Receiving objects: 22% (96993/429508), 20.26 MiB | 3.63 MiB/s Receiving objects: 23% (98787/429508), 20.26 MiB | 3.63 MiB/s Receiving objects: 24% (103082/429508), 23.11 MiB | 4.03 MiB/s Receiving objects: 24% (105088/remote: Total 429508 (delta 323225), reused 426618 (delta 320966)
Receiving objects: 100% (429508/429508), 98.99 MiB | 8.95 MiB/s, done.
Resolving deltas: 100% (323225/323225), done.
Checking out files: 100% (12695/12695), done.
> cd ghc
> git submodule -q update --init --recursive
@jabley
jabley / build-artifact.yml
Created October 24, 2016 18:47
Concourse Deployment pipeline
platform: linux
image_resource:
type: docker-image
source:
repository: maven
tag: latest
inputs:
- name: git-repo

My client is a global retail giant that are about to embark on an overhaul of their digital products. The business have recently hired a very influential Global Digital Director who is now starting to implement their plan, which is seeing many changes throughout the business. To support their proposed digital roadmap they have identified the need for a Head of UX that will play a very influential role.

The business have gone through various changes over the past few years with the introduction of product management and more recently the creation of a digital lab. The latter has been great a vehicle to promote and foster innovative design thinking in a blue chip organisation. However as the business looks to restructure their various channels and products, the lab teams will be dispersed in to the various product teams to ensure its consistent throughout the business.

In addition to the Director hire, there is another pivotal new hire to the business who will be overseeing Product, UX and Delivery. The futur

@jabley
jabley / delve.sh
Created August 25, 2016 13:31
Panic when trying to debug using Go 1.7
~/gocode/src/github.com/elazarl/goproxy > dlv test
Type 'help' for list of commands.
(dlv) b https.go:376
Breakpoint 1 set at 0x85ad2 for github.com/elazarl/goproxy.TLSConfigFromCA.func1 ./https.go:376
(dlv) c
> github.com/elazarl/goproxy.TLSConfigFromCA.func1() ./https.go:376 (hits goroutine(222):1 total:1)
371: return nil
372: }
373:
374: func TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *ProxyCtx) (*tls.Config, error) {