Skip to content

Instantly share code, notes, and snippets.

View GeneralistDev's full-sized avatar
🏠
Working from home

Daniel Parker GeneralistDev

🏠
Working from home
View GitHub Profile
TASK [Bootstrapping KMS stack] *****************************************************************************************************************************************************************************
task path: /Users/daniel/Documents/Programming/school/infrastructure/ansible/tasks/bootstrap-kms-stack.yml:2
Using module file /Users/daniel/.pyenv/versions/3.6.1/lib/python3.6/site-packages/ansible/modules/cloud/amazon/cloudformation.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: daniel
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/daniel/.ansible/tmp/ansible-tmp-1499706883.218642-104371674492072 `" && echo ansible-tmp-1499706883.218642-104371674492072="` echo /Users/daniel/.ansible/tmp/ansible-tmp-1499706883.218642-104371674492072 `" ) && sleep 0'
<127.0.0.1> PUT /var/folders/_2/fcw_kflx3wgch8yb0qyp7ll40000gn/T/tmp44xzvxj_ TO /Users/daniel/.ansible/tmp/ansible-tmp-1499706883.218642-104371674492072/cloudformation.py
<127.0.0.1> EXEC /
---
- name: Bootstrapping KMS stack
cloudformation:
stack_name: "acloudguru-kms-{{ STAGE }}-ansible"
state: "present"
region: "{{ REGION }}"
profile: "acloudguru-{{ STAGE }}"
template: "../kms/bootstrap.yaml"
template_parameters:
Stage: "{{ STAGE }}"
@GeneralistDev
GeneralistDev / message.txt
Created December 16, 2016 04:19
For John
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.61
Comment: https://keybase.io/crypto
wcFMAyqWtFZBM6UIAQ/+OSyIMIzxpodbR+r8rYnbgLnS0Kv3ihCIS9LqYnYSVwTO
nx6pZcFLvb2G0ir7bQ6KqAvDc63Hv4g+SH8Yc1h/gJw5e1A9cBH6pb1PR5a4oLCr
BkYqA1ZPuYwgHdwQ4eGlfeXgOdj+xCcgkzdjiY/1heAsfUud7LAA2Z+NkYN3WX++
7jncgGCff29yYarhD+ltWANassa6+gkr4HCrJvEZ7YSIkWxBwbyj9QhEz5FknRW3
VlT6La4aPyjr2lNV15ycgpxLjI6/M6ixlBCNNx/RWzDYl67jjFouOkPhpN7vU3dd
UpwsNFdeQlj5NEAQJGGS3l49KJg8D2pY7G0qZgWPAJ84Gwaicl8Q4ZOjWaS1PHm+
@GeneralistDev
GeneralistDev / discussion-schema.json
Last active November 12, 2016 06:49
Discussion Forums Schema
{
"discussions": {
"data": {
"id-1": {
"title": "My question",
"author": "userid-1",
"tags": {
"ec2": true,
"s3": true
},
function getMostPopularForCourse(courseId, tag) {
var questionsNode =
tag ?
ref.child('discussions').child('byCourseByTag').child(courseId).child(tag)
: ref.child('discussions').child('byCourse').child(courseId);
// create a query for the most popular messages on the server
var query = questionsNode.orderByChild("voteSum")
return $firebaseArray(query.limitToLast(pagingOptions.count));
@GeneralistDev
GeneralistDev / fb-query-1-snippet.js
Created November 5, 2016 01:59
Firebase query 1
function getMostRecentActivity(count) {
var questionsNode = ref.child('discussions').child('data');
// create a query for the most recent 25 messages on the server
var query = questionsNode.orderByChild("updatedTimestamp");
return $firebaseArray(query.limitToLast(count));
}
@GeneralistDev
GeneralistDev / correlation_id search
Created October 20, 2016 03:52
Sumologic correlationid search
@GeneralistDev
GeneralistDev / Approach2.py
Last active February 3, 2022 11:05
Second approach to solving background colour detection
import sys # System bindings
import cv2 # OpenCV bindings
import numpy as np
from collections import Counter
class BackgroundColorDetector():
def __init__(self, imageLoc):
self.img = cv2.imread(imageLoc, 1)
self.manual_count = {}
@GeneralistDev
GeneralistDev / Approach1.py
Last active June 9, 2020 13:46
First Approach to solving bg color detection
import sys # System bindings
import cv2 # OpenCV bindings
import numpy as np
class ColorAnalyser():
def __init__(self, imageLoc):
self.src = cv2.imread(imageLoc, 1) # Reads in image source
# Empty dictionary container to hold the colour frequencies
self.colors_count = {}
@GeneralistDev
GeneralistDev / cftemplate-eb.json
Created December 27, 2015 05:01
Cloud Formation Template (danielparker.com.au) WordPress and Elastic Beanstalk
{
"Outputs":{
"AWSEBLoadBalancerURL":{
"Value":{
"Fn::Join":[
"",
[
"http:\/\/",
{
"Fn::GetAtt":[