Skip to content

Instantly share code, notes, and snippets.

@chriseyre2000
chriseyre2000 / export_roles.sh
Last active September 21, 2023 10:44
Export permssions by group using auth0
auth0 login
auth0 roles list --json | jq ".[] | .id, .name" | sed 's/\"//g' | sed 'N;s/\n/,/;s/ /_/g' > roles.txt
while read p; do
group=`echo $p | awk -F, '{print $1}'`
filename=`echo $p | awk -F, '{print $2}'`
auth0 roles permissions list $group --json | jq ".[] | .permission_name" > $filename
done <roles.txt
@chriseyre2000
chriseyre2000 / gist:7efb9eb807555b2a86d7cdfd2ac7879b
Created July 7, 2021 12:32
You can't catch up: Once you are behind you can never recover
Mix.install([
{:vega_lite, "~> 0.1.0"},
{:kino, "~> 0.2.1"}
])
alias VegaLite, as: Vl
vl_widget =
Vl.new(width: 400, height: 400)
# If this does not work on a docker version of livebook, update your docker image
# docker run -p 8080:8080 livebook/livebook
Mix.install([
{:vega_lite, "~> 0.1.0"},
{:kino, "~> 0.2.1"}
])
alias VegaLite, as: Vl
@chriseyre2000
chriseyre2000 / Mentor helper
Last active April 4, 2019 21:03
Exercism.io helper tampermonkey script - allows quickly to see how many one day old exercise there are.
// ==UserScript==
// @name Mentor Helper
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Helps to find items that are about a day old
// @author chriseyre2000
// @match https://exercism.io/mentor/dashboard/next_solutions
// @grant none
// @require http://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"];
cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
@chriseyre2000
chriseyre2000 / fix_test.bat
Created September 2, 2018 08:07
Exercism.io helper for the elixir track - runs all the scripts
@rem fix a.test.exs
@rem removes the pending tag from the test and adds _2 to filename
@echo %1 | sed -e "s/.exs/_2.exs/" > temp.txt
@set /p Filename=<temp.txt
@cat %1 | grep -v "@tag :pending" > %Filename%
@rm temp.txt
elixir %Filename%
function Load-Packages
{
param ([string] $directory = 'Packages')
$assemblies = Get-ChildItem $directory -Recurse -Filter '*.dll' | Select -Expand FullName
foreach ($assembly in $assemblies) { [System.Reflection.Assembly]::LoadFrom($assembly) }
}
Load-Packages
$routes = @{
@chriseyre2000
chriseyre2000 / _.md
Last active August 29, 2015 14:14
graph
@chriseyre2000
chriseyre2000 / _.md
Last active August 29, 2015 14:14
MAP
<!doctype html >
<html ng-app="myApp">
<head>
<meta charset="utf-8">
</head>
<body>
<div ng-controller="FirstController" ng-click="stopTimer()" >{{name}}</div>
<script src="node_modules/angular/angular.min.js" ></script>
<script>
var myApp = angular.module('myApp',[]);