Skip to content

Instantly share code, notes, and snippets.

Mark Doeswijk Qwerios

Block or report user

Report or block Qwerios

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Qwerios / nats-streaming-statefulset.yaml
Last active Jul 8, 2019
NATS Streaming Kubernetes Statefulset
View nats-streaming-statefulset.yaml
apiVersion: v1
kind: ConfigMap
name: nats-config
namespace: default
# Used to set cluster id in deployment
# Look for $(NATS_CLUSTER) usage below
NATS_CLUSTER: nats-streaming
# This is the NATS hostname to connect to
Qwerios / cloudbuild.yaml
Last active Oct 23, 2018
Google Cloud Builder setup to auto-deploy to a kuberneter engine cluster
View cloudbuild.yaml
# We can use this cloudbuild.yaml setup with a trigger type tag
# on Google Cloud Build using default variable substitution.
# Use environment substitution in the trigger to add the additional parameters:
# _CLUSTER = kubernetes engine cluster. Ex. my-test-cluster
# _DEPLOYMENT = deployment name Ex. my-project
# _CONTAINER = container name within deployment. Ex. my-project-api
# _GCS_ZONE = compute engine zone. Ex. europe-west-1c
View auth0_pkce.ts
import { createHash, randomBytes } from 'crypto';
import * as request from 'request';
* The configuration object
* @export
* @interface IAuthServiceConfig
export interface IAuthServiceConfig {
View MySQL Haversine function
CREATE FUNCTION `fnHaversine`(point1 point, point2 point) RETURNS double
declare lon1, lon2 double;
declare lat1, lat2 double;
declare r_lat1, r_lat2 double;
declare d_lat double;
declare d_lon double;
declare a, c, R double;
Qwerios / gist:ae0bcd32dc1c5c871d06
Last active May 9, 2019
My Jenkins for Appcelerator mobile CI
View gist:ae0bcd32dc1c5c871d06

Hardware & OS

Running on Apple Mac mini Dualcore i5 2.8GHz (MGEQ2FN/A) OSX Yosemite: 10.10.1

UPDATE Nov 3rd 2015: Upgraded to El Capitan caused my Jenkins to stop working. I had to apply the file permission fix for the log folder again (see known issues at the end of this gist). I also had to reinstall legacy java support and load the jenkins daemon again with launchctl. I took the time to update all the components mentioned in this gist when I did the upgrade. So the Android sdk/ndk, nodejs (0.10 -> 0.12), Titanium and Java. Beware that there is a new command-line tool for titanium (appc from the 'appcelerator' package).

User account setup

I installed and setup the new Mac with 1 main administrative account. In the scripts below it is assumed you are logged in as this administrative user. Changing to the jenkins user is done using sudo su - jenkins.

Required accounts

Qwerios / gist:11371459
Last active Jan 22, 2018
Setting up private NPM repository
View gist:11371459

Official npm mirror

The main idea is to make an official NPM mirror as detailed here:

Unfortunately the above instructions appear to be flawed and didn't working for me. Thankfully someone has taken the time to create an updated set of installation instructions:

Bug with updated instructions

Only one problem remains with the above instructions and that is the credentials for the copy script. In you need to fix the credentials for curl. Change this (line 46):

You can’t perform that action at this time.