Skip to content

Instantly share code, notes, and snippets.

View dancingfrog's full-sized avatar
🎸

John Hall dancingfrog

🎸
View GitHub Profile
@dancingfrog
dancingfrog / UserPermissions.sql
Created January 23, 2020 14:11 — forked from JustinMcNamara74/UserPermissions.sql
#MSSQL List all user permissions/roles for all users
/*
********************************************************************************************************************************
Credits: @Jeremy
Posted: http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database
********************************************************************************************************************************
Security Audit Report
1) List all access provisioned to a sql user or windows user/group directly
2) List all access provisioned to a sql user or windows user/group through a database or application role
3) List all access provisioned to the public role
@dancingfrog
dancingfrog / str.rs
Last active April 18, 2021 11:08 — forked from rust-play/playground.rs
Code shared from the Rust Playground
// https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=09a4f12d1c599376037d00f054ac359f
extern crate rand;
use rand::Rng;
use std::str;
// use std::string; // .to_string() is already impl on u8
fn main() {
let mut rng = rand::thread_rng();
let robot = rng.gen::<u8>().to_string();
let greeting: &str = &(format!("Hello, {}!", robot));
@dancingfrog
dancingfrog / render_toc.R
Created February 5, 2022 13:20 — forked from gadenbuie/render_toc.R
Generate Manual Table of Contents in (R)Markdown Documents
#' Render Table of Contents
#'
#' A simple function to extract headers from an RMarkdown or Markdown document
#' and build a table of contents. Returns a markdown list with links to the
#' headers using
#' [pandoc header identifiers](http://pandoc.org/MANUAL.html#header-identifiers).
#'
#' WARNING: This function only works with hash-tag headers.
#'
#' Because this function returns only the markdown list, the header for the
@dancingfrog
dancingfrog / .gitignore
Last active June 20, 2022 14:01 — forked from dabit3/Dockerfile
Next.js + Fargate Dockerfile
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage