Skip to content

Instantly share code, notes, and snippets.

View matiasinsaurralde's full-sized avatar

Matias Insaurralde matiasinsaurralde

  • Paraguay
View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsR3in+84KcH/GHAksqczRE5S+wDgB8qB+SJxvzWw3qjwPSohvuR4WXdQ8UCqjWq/6uGYq79EHlzlKE9P6lJbhEgf9FRwv8k8MSqDjhoQ5QZeXaEE750+PZLK/pb2MkriNXIGxg6ul8V+F0o4XnkVLbefMhQDzLDVgyg0dFwp6TGVqpufmD6gvvwnQD5BHSFMQT3MSq6o/wQj3hc/yhHlhwJ4+6iC7bdBv426fGdCs+nbi2BjXHzLEf7bLks5vOTJexGTHdfPlb5JOBTTfzZ0Kw0BMBjTnJpnRcyGOvQJ/K/a7ye/xusG/ZyDh/NsghPX2BjFPfbN3rW5hzvr3PZhn _@_
@matiasinsaurralde
matiasinsaurralde / notes.md
Last active January 24, 2018 08:30
Tyk + Cloud Foundry + CF Router

Initial setup

Note: Target the right organization.

cf create-space tyk-deployment
cf target -o 'matias-org' -s 'tyk-deployment'

Sample application

App tyk-gateway was started using this command `$HOME/start.sh`
Showing health and status for app tyk-gateway in org matias-org / space tyk-deployment as [email protected]...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: tyk-gateway.cfapps.io
last uploaded: Fri Feb 24 05:37:27 UTC 2017
#include <jni.h>
int main( int args, char** argv ) {
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs vmArgs;
JavaVMOption options[1]; int n = 0;
options[n++].optionString = "-Djava.class.path=.";
vmArgs.version = JNI_VERSION_1_6;
vmArgs.nOptions = n;
package main
import(
"fmt"
"regexp"
)
func main() {
var (
regexUrl = "(.*)"
@matiasinsaurralde
matiasinsaurralde / output.txt
Created December 23, 2016 11:54
health-output
% go test -v
=== RUN TestNewAggregator
--- PASS: TestNewAggregator (0.00s)
=== RUN TestEmitEvent
--- PASS: TestEmitEvent (0.00s)
=== RUN TestEmitEventErr
--- PASS: TestEmitEventErr (0.00s)
=== RUN TestEmitTiming
--- PASS: TestEmitTiming (0.00s)
=== RUN TestEmitGauge
% go run x.go
{0xc420080000}
&[{hello}]
someFunction receives &[{hello}]
@matiasinsaurralde
matiasinsaurralde / pre-push.sh
Last active December 5, 2016 15:37
pre-push
#!/bin/sh
current_branch=$(git rev-parse --abbrev-ref HEAD)
set "master" "target/cloud" "target/stage" "target/hybrid"
exec < /dev/tty
for branch in $@
do
if [ $current_branch = $branch ]; then
@matiasinsaurralde
matiasinsaurralde / pre-push
Created December 1, 2016 14:13
pre-push script
#!/bin/sh
branch=$(git rev-parse --abbrev-ref HEAD)
exec < /dev/tty
if [ $branch == "master" ]; then
echo "DETECTED PUSH TO MASTER
Please set version number, current version is: x.x.x.x"
read -p "> " version_number
echo "Version number set to $version_number"
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"