Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Heckel TimHeckel

View GitHub Profile
View gears.h
#include <string>
#include <int>
#include <iostream>
int play() {
std::vector<std::string> players = { "Name1", "Name2", "Name3", "Name4" };
std::string up = "down";
std::string down = "up";
View jitsi-meet-tokens-working-script-updated-ssl
Taken from the original thread: https://github.com/jitsi/lib-jitsi-meet/issues/1082#issuecomment-616948457
###Fresh install of jitsu meet with JWT token authentication on Ubuntu Bionic Beaver 18.04
#add dns for meet.mydomain.com to point to public ip for vm
# Open ports on network security group
# 80/tcp
# 443/tcp
# 4443/tcp
# 10000/udp
@TimHeckel
TimHeckel / sif-3-authentication.js
Last active Jul 17, 2017
Broker Authentication
View sif-3-authentication.js
const CryptoJS = require("CryptoJS");
const _timestamp = new Date().toISOString();
const _sessionToken = "YOUR_SESSION_TOKEN_HERE";
const _secretKey = "YOUR_SECRET_KEY_HERE";
const _valToHash = _sessionToken + ":" + _timestamp;
const _hash = CryptoJS.HmacSHA256(_valToHash, _secretKey).toString(CryptoJS.enc.Base64);
const _authToken = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(_sessionToken + ":" + _hash));
return "SIF_HMACSHA256 " + _authToken;
View serverless_phenomic_s3.md

#Setting up Serverless + Phenomic + S3 client

###Prerequisites:

  1. Sign up or log in to the AWS console and ensure you have a IAM user called serverless-admin with admin rights. (Obviously not a prod setting). A walkthrough is here.
  2. Create a [profile-name] in your ~/.aws/credentials file with your newly created admin user:
[serverless-admin]
aws_access_key_id=XXX
View anonymization_transformation.js
{
type: "anonymize",
root: "xSre",
order: 2,
mapping: [
{
prop: "refId",
replace: "random"
},
{
@TimHeckel
TimHeckel / anonymization_transformation.json
Last active Sep 23, 2015
CedarExpert: anonymization transformation step
View anonymization_transformation.json
{
"type": "anonymize",
"root": "xSre",
"order": 2,
"mapping": [
{ "prop": "refId", "replace": "random" }
, { "prop": "localId", "replace": "hash" }
, { "prop": "loginId", "replace": "delete" }
, { "prop": "stateProvinceId", "replace": "hash" }
, { "prop": "givenName", "replace": "given_name_string (optional, defaults to the prop)" }
@TimHeckel
TimHeckel / 0_reuse_code.js
Created Sep 23, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:d323d74e8a1f0d3c2517
##Setting up kubernetes on AWS
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/aws.md
https://github.com/pires/kubernetes-elasticsearch-cluster
aws iam create-instance-profile --instance-profile-name kubernetes
create a role in AWS called kubernetes-role and add ec2-full-access
@TimHeckel
TimHeckel / gist:9114868cf2bbe22eb194
Created Aug 12, 2014
oplog tailing query example
View gist:9114868cf2bbe22eb194
"query" : {
"ns" : {
"$regex" : "^edspringload\\."
},
"$or" : [
{
"op" : {
"$in" : [
"i",
"u",
@TimHeckel
TimHeckel / gist:b03f9ecc81ffa96ab303
Last active Aug 29, 2015
Recommendations on how to pipe this?
View gist:b03f9ecc81ffa96ab303
Iron Router route:
this.route("poster", {
where: "server"
, path: "/post"
, action: function() {
var size = 0;
var future = new Future();