Skip to content

Instantly share code, notes, and snippets.

View TimHeckel's full-sized avatar

Tim Heckel TimHeckel

View GitHub Profile
@TimHeckel
TimHeckel / gist:8f10b1d1f6b00717415e0096cd3d16df
Last active July 23, 2023 21:37
python_slatebox_api.py
# you will need to pip install requests
import requests
import hmac
import hashlib
import datetime
import base64
baseUrl = "https://api.slatebox.com"
#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";
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 July 17, 2017 20:02
Broker Authentication
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;

#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
{
type: "anonymize",
root: "xSre",
order: 2,
mapping: [
{
prop: "refId",
replace: "random"
},
{
@TimHeckel
TimHeckel / anonymization_transformation.json
Last active September 23, 2015 02:05
CedarExpert: anonymization transformation step
{
"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 September 23, 2015 01:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
##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 August 12, 2014 15:43
oplog tailing query example
"query" : {
"ns" : {
"$regex" : "^edspringload\\."
},
"$or" : [
{
"op" : {
"$in" : [
"i",
"u",