Skip to content

Instantly share code, notes, and snippets.

View jkingyens's full-sized avatar

Jeff Kingyens jkingyens

View GitHub Profile
@jkingyens
jkingyens / Dockerfile
Created November 22, 2017 03:11
Dockerfile to build Android APK
FROM openjdk:8
ENV ANDROID_SDK_HOME /opt/sdk
ENV ANDROID_HOME /opt/sdk
ENV SDK_TOOLS "3859397"
ENV BUILD_TOOLS "27.0.1"
ENV TARGET_SDK "27"
# Download and extract Android Tools
RUN wget http://dl.google.com/android/repository/sdk-tools-linux-${SDK_TOOLS}.zip -O /tmp/tools.zip && \
<amp-iframe width="500"
height="281"
layout="responsive"
sandbox="allow-scripts allow-same-origin allow-popups"
allowfullscreen
frameborder="0"
src="https://gist.github.com/jkingyens/e8a31f62a6d1bc2c5d0c">
</amp-iframe>
@jkingyens
jkingyens / echoHttpRequest.js
Last active August 29, 2015 14:08 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
{
"metadata": {
"name": "",
"signature": "sha256:41d37ad45eab22415f75997874e448d751da8bb4941db9c257fb9d63ef4543f2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
### Keybase proof
I hereby claim:
* I am jkingyens on github.
* I am jkingyens (https://keybase.io/jkingyens) on keybase.
* I have a public key whose fingerprint is 736C 2B42 93C8 E2F6 3DC7 4BC0 4E9F 58F1 8472 BF14
To claim this, I am signing this object:
@jkingyens
jkingyens / index.js
Created October 14, 2014 04:16
requirebin sketch
var angular = require('angular');
@jkingyens
jkingyens / gist:f9f346ea8fe8210c86ee
Created June 4, 2014 04:30
connection refused for a while, curling repeatedly "wakes it up"
core@pool2 ~ $ curl 10.240.228.72:4001
curl: (7) Failed connect to 10.240.228.72:4001; Connection refused
core@pool2 ~ $ curl 10.240.228.72:4001
curl: (7) Failed connect to 10.240.228.72:4001; Connection refused
core@pool2 ~ $ curl 10.240.228.72:4001
curl: (7) Failed connect to 10.240.228.72:4001; Connection refused
core@pool2 ~ $ curl 10.240.228.72:4001
404 page not found
core@pool2 ~ $ curl 10.240.228.72:4001
404 page not found
core@pool2 ~ $ etcdctl -debug set /blah2 ljdskfalsjfdf
Cluster-Peers: http://10.240.233.21:4001 http://10.240.92.85:4001 http://10.240.228.72:4001
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Error: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
core@pool2 ~ $ curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=ljdskfalsjfdf
Cluster-Peers: http://10.240.233.21:4001 http://10.240.92.85:4001 http://10.240.228.72:4001 http://127.0.0.1:4001
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Curl-Example: curl -X PUT http://10.240.233.21:4001/v2/keys/blah2 -d value=asjklsadfl
Error: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
May 08 19:25:58 pool0.c.hazel-service-519.internal systemd[1]: Started etcd.
May 08 19:25:58 pool0.c.hazel-service-519.internal etcd[17733]: [etcd] May 8 19:25:58.664 INFO | Discovery via https://discovery.etcd.io using prefix /***.
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: [etcd] May 8 19:25:59.200 INFO | Discovery found peers [http://***:7001 http://***:7001]
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: [etcd] May 8 19:25:59.272 INFO | *: peer added: '*'
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: [etcd] May 8 19:25:59.308 INFO | *: peer added: '*'
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: panic: runtime error: slice bounds out of range
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: goroutine 1 [running]:
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: runtime.panic(0x7cfd80, 0xde9eaa)
May 08 19:25:59 pool0.c.hazel-service-519.internal etcd[17733]: /usr/lib/go/src/pkg/r