Skip to content

Instantly share code, notes, and snippets.

View d8aninja's full-sized avatar
🐙

Jeff d8aninja

🐙
View GitHub Profile
@d8aninja
d8aninja / cdk-profile-plugin.js
Created April 28, 2022 20:01 — forked from jeshan/cdk-profile-plugin.js
How to select AWS profiles per account in AWS CDK
const { CredentialProviderChain } = require('aws-sdk');
const AWS = require('aws-sdk');
const accountProvider = require('./account-provider');
let getEnv = function(accountId) {
// TODO: insert logic to get your desired profile name
return profileName;
};
let getProvider = async (accountId, mode) => {
@d8aninja
d8aninja / django_ami.md
Created March 15, 2022 14:31 — forked from aderowbotham/django_ami.md
Django stack setup on EC2 AMI

Django Stack

Overview

This is a set of instructions to setup a Django Nginx Gunicorn MySQL/Postgres stack on a single Amazon EC2 instance.

Server - AWS

@d8aninja
d8aninja / README.md
Created May 27, 2018 22:48 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@d8aninja
d8aninja / filedec.py
Created July 24, 2017 04:54 — forked from oaass/filedec.py
Helper script to try many different openssl cipher algorithms against a file
#!/usr/bin/env python
import subprocess
import argparse
import os
import sys
def yesno(message_type, default = 'y'):
if message_type == 'DELETE_FILES_IN_FOLDER':
question = 'The folder is not empty. Do you want to delete the files in it?'
@d8aninja
d8aninja / thpsetup.py
Created July 24, 2017 04:52 — forked from oaass/thpsetup.py
This will install the additional tools to Kali recommended by "The Hacker Playbook". It will install the tools in /opt/tools
#!/bin/bash
echo ""
echo "=========================================================================="
echo "= Pentest Attack Machine Setup ="
echo "= Based on the setup from The Hacker Playbook ="
echo "=========================================================================="
echo ""
# Prepare tools folder
// Source: http://www.census.gov/geo/www/ansi/countylookup.html
var countyToFIPS = {
'Alabama': {
'Autauga County': '01001',
'Baldwin County': '01003',
'Barbour County': '01005',
'Bibb County': '01007',
'Blount County': '01009',
'Bullock County': '01011',
# Decision Tree Classifier
from sklearn import datasets
from sklearn import metrics
from sklearn.tree import DecisionTreeClassifier
# load the iris datasets
dataset = datasets.load_iris()
# fit a CART model to the data
model = DecisionTreeClassifier()
model.fit(dataset.data, dataset.target)
# Thanks to John Maindonald
library(WDI)
indnams <- c("fertility.rate", "life.expectancy",
"population", "GDP.per.capita.Current.USD",
"15.to.25.yr.female.literacy")
inds <- c('SP.DYN.TFRT.IN','SP.DYN.LE00.IN',
'SP.POP.TOTL','NY.GDP.PCAP.CD',
'SE.ADT.1524.LT.FE.ZS')
wdiData <- WDI(country="all", indicator=inds,
start=1960, end=format(Sys.Date(), "%Y"),