Skip to content

Instantly share code, notes, and snippets.

@leewinder
leewinder / local_user_environ_as_sudo.py
Last active September 29, 2016 21:41
Accessing the local users environment variables even when running via sudo (Mac only)
# Imports
import subprocess
import json
import os
#
# Appends a gven users environment variables to the current process
#
def __append_users_environment_variables(user_name):
@leewinder
leewinder / aws-request.js
Created September 3, 2016 06:32
JavaScript object to call authorised AWS functions and automatically retry failed calls multiple times
"use strict";
//
// Class to call and retry AWS requests
//
var AwsRequest = (function () {
//
// Constructor
//
@leewinder
leewinder / password-check.service.ts
Created August 30, 2016 10:33
Typescript object for checking password strength
// Password strengths
export const enum PasswordCheckStrength {
Short,
Common,
Weak,
Ok,
Strong,
};
// Object to check password strengths and various properties