Skip to content

Instantly share code, notes, and snippets.

<cfcomponent output="true">
<!--- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --->
<cffunction name="getManager" access="public" output="true" returntype="any">
<cfreturn variables.mainManager />
</cffunction>
<cffunction name="setManager" access="public" output="true" returntype="void">
<cfargument name="mainManager" type="any" required="true" />
<cfset variables.mainManager = arguments.mainManager />
<cffunction name="ListGetDifferent" output="yes">
<cfargument name="mainList" required="Yes" />
<cfargument name="compareList" required="Yes" />
<cfargument name="CompareType" required="Yes" default="Same" />
<cfset ReturnList = "" />
<cfif CompareType EQ "Same">
<cfloop list="#mainList#" index="i">
<cfif ListFindNoCase(compareList,i)>
<cfset ReturnList = ListAppend(ReturnList,i) />
</cfif>
@ppshein
ppshein / gist:3c06935d38ceffa2133a5ffd996700ed
Created December 5, 2018 09:34 — forked from mikepfeiffer/gist:4d9386afdcceaf29493a
EC2 UserData script to install CodeDeploy agent
#!/bin/bash
yum install -y aws-cli
cd /home/ec2-user/
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1
yum -y install codedeploy-agent.noarch.rpm
sudo yum update -y
sudo yum install docker -v
sudo service docker start
sudo yum-config-manager --enable epel
sudo yum repolist
sudo yum install ansible
#!/bin/bash
yum update
yum install -y ruby
cd /home/ec2-user
aws s3 cp s3://aws-codedeploy-us-west-1/latest/install .
chmod +x ./install
./install auto
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
@ppshein
ppshein / EMV QR
Last active January 9, 2019 10:59
0002010102112926000910091704805091009170485802MM64060002my54030.05303MMK6231010100209100917048100910091704863040956
/*
TagId
ValueLength
Value
*/
00 [Payload Format Indicator - M]
+-- app
| +-- bower.json
| +-- index.html
| +-- index.js
| +-- index.css
+-- gulpfile.js
+-- package.json
### STAGE 1: Build ###
@ppshein
ppshein / bobp-python.md
Created March 15, 2019 04:14 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@ppshein
ppshein / appspec.yml
Created April 10, 2019 10:56 — forked from moshest/appspec.yml
Node.js Project on AWS CodeDeploy CentOS
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/node
permissions:
- object: /home/ec2-user
owner: ec2-user
group: ec2-user
type:
@ppshein
ppshein / aws-codebuild-cross-account-image-push.yml
Created May 10, 2019 03:47 — forked from tvalletta/aws-codebuild-cross-account-image-push.yml
AWS CodeBuild buildspec.yml example for building a docker image and pushing it to a AWS ECS docker repo in another AWS account
version: 0.1
# REQUIRED ENVIRONMENT VARIABLES
# AWS_KEY - AWS Access Key ID
# AWS_SEC - AWS Secret Access Key
# AWS_REG - AWS Default Region (e.g. us-west-2)
# AWS_OUT - AWS Output Format (e.g. json)
# AWS_PROF - AWS Profile name (e.g. central-account)
# IMAGE_REPO_NAME - Name of the image repo (e.g. my-app)
# IMAGE_TAG - Tag for the image (e.g. latest)