Skip to content

Instantly share code, notes, and snippets.

View myitcv's full-sized avatar

Paul Jolly myitcv

View GitHub Profile
@myitcv
myitcv / v1.rb
Last active August 29, 2015 13:56
require 'rubygems'
require 'bundler/setup'
require 'celluloid/autostart'
require 'aws-sdk-core'
Aws.config = { access_key_id: 'xxxxxxxxx', secret_access_key: 'xxxxxxxxxxx', region: 'xxxxxxxxx' }
class SigningTest
include Celluloid
source "https://rubygems.org"
gem 'celluloid', github: 'celluloid/celluloid'
gem 'aws-sdk-core'
gem 'rubysl', platform: :rbx
@myitcv
myitcv / v2.rb
Created February 19, 2014 16:28
require 'rubygems'
require 'bundler/setup'
require 'celluloid/autostart'
require 'aws-sdk-core'
Aws.config = { access_key_id: 'xxxxxxxx', secret_access_key: 'xxxxxxxxxxx', region: 'xxxxxxxxxxxxx' }
class SigningTest
include Celluloid
\dx
-- See what extensions are loaded
create extension timetravel;
-- load the timetravel extension
-- after installing the latest version
@myitcv
myitcv / time_travel_trigger.sql
Last active March 8, 2022 06:50
Trigger-based equivalent of old PostgreSQL time travel module - see https://blog.myitcv.io/2014/02/25/row-level-version-control-with-postgresql.html for more details
/*
Copyright (c) 2015 Paul Jolly <[email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@myitcv
myitcv / instructions.sh
Last active August 29, 2015 13:56
New go env
gvm install go1.2
gvm pkgenv # to add $HOME/gostuff to GOPATH
# add to to end of .bashrc
gvm use go1.2 > /dev/null 2>&1
export PATH="${GOPATH//://bin:}/bin:$PATH"
# restart bash
exec bash
@myitcv
myitcv / gist:9718cd1c3a1f2895cc38
Created September 6, 2014 14:21
Neovim Go plugin output
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/_cmd/plugin_host/main.go:122: Successfully connected to Neovim
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/_cmd/plugin_host/main.go:137: Connecting *example.Example
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/_cmd/plugin_host/main.go:81: [*example.Example [We are in the Example]]
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/neovim.go:261: Got a request 1 for method go_init([])
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/neovim.go:271: Sending a response to 1
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/neovim.go:273: Response sent to 1
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/_cmd/plugin_host/main.go:81: [*example.Example [Ran command]]
2014/09/06 15:20:57 /tmp/tmp.z8fv2JXBAP/src/github.com/myitcv/neovim/_cmd/plugin_host/main.go:142: Successfully called Init on *example.Example
@myitcv
myitcv / gist:5ad0fb83bc11c929ed8e
Created September 27, 2014 12:38
Proposed changes to the MSGPACK API
error_types:
Exception: {id: 0}
Validation: {id: 1}
features:
clipboard: [clipboard_get, clipboard_set]
python: [python_execute, python_execute_file, python_do_range, python_eval]
types:
Buffer: {id: 0}
Tabpage: {id: 2}
Window: {id: 1}
@myitcv
myitcv / gist:4f728f00399d11b904a1
Created September 27, 2014 12:39
Diff with current API
--- api_post.yml 2014-09-27 13:15:28.347858513 +0100
+++ api_pre.yml 2014-09-26 08:20:08.019112382 +0100
@@ -46,13 +46,13 @@
parameters:
- [Buffer, buffer]
- [Integer, index]
- return_type: Binary
+ return_type: String
- name: buffer_set_line
can_fail: true
@myitcv
myitcv / gist:dcf7343645d682deecc9
Created September 27, 2014 12:50
Complete API proposal
error_types:
Exception: {id: 0}
Validation: {id: 1}
features:
clipboard: [clipboard_get, clipboard_set]
python: [python_execute, python_execute_file, python_do_range, python_eval]
types:
Buffer: {id: 0}
Tabpage: {id: 2}
Window: {id: 1}