Skip to content

Instantly share code, notes, and snippets.

@j0shua
j0shua / gist:e6cee53d0530d3c59267258304908943
Created December 30, 2019 03:38 — forked from kbastani/gist:4471127413fd724ed0a3
GraphGist of Neo4j Access Control
= Entitlements and Access Control Management
:neo4j-version: 2.2.0
:author: Kenny Bastani
:twitter: @kennybastani
:description: Graph database access control, entitlements, authorization solutions
:tags: domain:finance, use-case:access-control
This interactive Neo4j graph tutorial covers entitlements and access control scenarios.
'''
@j0shua
j0shua / proxyTrack.js
Created January 12, 2019 23:37 — forked from mrharel/proxyTrack.js
Using Proxy to Track Javascript Class
const callerMap = {};
function getCaller(error) {
if (error && error.stack) {
const lines = error.stack.split('\n');
if (lines.length > 2) {
let match = lines[2].match(/at ([a-zA-Z\-_$.]+) (.*)/);
if (match) {
return {
name: match[1].replace(/^Proxy\./, ''),
@j0shua
j0shua / books.go
Created October 25, 2018 15:51 — forked from egonelbre/books.go
package main
import (
"database/sql"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"time"
#!/bin/sh
if [ "$1" == "" ]; then
echo "Usage: $0 <PROJECT_ROOT> <GITHUB_REPO>"
exit 1
fi
if [ "$2" == "" ]; then
echo "Usage: $0 <PROJECT_ROOT> <GITHUB_REPO>"
exit 1
fi
@j0shua
j0shua / Hands-On-Intro-to-Kubernetes.html
Created April 26, 2017 18:10 — forked from ryanj/Hands-On-Intro-to-Kubernetes.html
Kubenetes Zone "Hands-On Intro to Kubernetes" Workshop 4/17 in Austin, TX http://bit.ly/k8s-zone
<section>
<section id="kubernetes-hands-on">
<h1>Kubernetes Zone</h1>
<h1>Hands-On Workshop</h1>
<br/>
<p><a href="https://www.eventbrite.com/e/kubernetes-zone-workshop-andor-reception-tickets-32538282880">Kubernetes Zone - April 17, 2017</a></p>
<p><a href="http://bit.ly/k8s-zone">bit.ly/k8s-zone</a></p>
</section>
<section data-state='blackout' data-background-color="#000000" id='presented-by'>
<p>presented by&hellip;</p>
@j0shua
j0shua / create_status_alarm.py
Created September 30, 2015 02:18 — forked from mikeyk/create_status_alarm.py
Create a StatusCheckFailed alarm
import boto.ec2.cloudwatch
import sys
import os
AWS_KEY = os.environ.get("AWS_ACCESS_KEY_ID")
AWS_SECRET = os.environ.get("AWS_SECRET_ACCESS_KEY")
AWS_REGION = os.environ.get("AWS_EC2_REGION", "us-east-1")
TOPIC = 'YOUR_TOPIC'
def create_status_alarm(instance_id):
@j0shua
j0shua / gist:8364eb5f013a44ead31f
Created September 30, 2015 02:17 — forked from mikeyk/gist:1329319
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
angular.module('app.resources', ['ngResource'])
.factory('api', function ($resource) {
var api = {
defaultConfig : {id: '@id'},
extraMethods: {
'update' : {
method: 'PUT'
}
# -*- coding: utf-8 -*-
# This script is used to combine PHP source files together into one big glob.
# I wrote this so I could distribute a single file web application, but develop
# it in a sane fashion.
# Copyright (c) 2010, John M. Hobbs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,