Skip to content

Instantly share code, notes, and snippets.

💭
PHP Dev Available For Hire!

Joshua Copeland OGProgrammer

💭
PHP Dev Available For Hire!
Block or report user

Report or block OGProgrammer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e2a586d663fd9f50685bc2c8441c97bf
#!/usr/bin/env bash
#usage ./new-ee-site.sh <domain name≥ <subdomain> <short name>
# Short name is for when domain name is too long for mysql username.
echo "===Creating New EasyEngine WordPress Site==="
newSiteDomain="$1"
if [ -z "${newSiteDomain}" ]; then
echo "Site param missing! Script needs the domain name of the site. Ex: mysite.com"
exit
@OGProgrammer
OGProgrammer / Terraform+Jenkins+AWS+Docker-Instructions.md
Last active Oct 14, 2018
Terraform+Jenkins+AWS+Docker Tutorial Prep
View Terraform+Jenkins+AWS+Docker-Instructions.md

Instructions

This tutorial will walk you through setting up a Jenkins Pipeline to Deploy a Docker app to AWS ECS using Terraform. If you are looking to use docker then this is the perfect choice for high traffic microservice infrastucture. The tutorial will show you the power of Terraform to provision your cloud infrastructure, how jenkins can help speed up deployments, and how AWS Elastic Container Service can be a great solution for hosting your Enterpise level applications. Be aware this tutorial will spin up infrastructure in AWS and you must run the destroy scripts at the end so you aren't leaving the example running.

Prerequisites

Please read the following and install/sign up for what you need before the tutorial for the best experience.

  • Use a *nix bash/zsh terminal (Mac/Linux)
View php 7.2 with ast phan argon support
FROM php:7.2-fpm-stretch
# needed PHAN and ast ext so I found this and copied some stuff https://github.com/mre/docker-php-phan
RUN DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y unzip git curl
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# DEPS
@OGProgrammer
OGProgrammer / .gitignore_global
Last active Nov 3, 2017 — forked from octocat/.gitignore
Some common .gitignore configurations
View .gitignore_global
# IDE Files #
###################
# IntelliJ
*.iml
*.iws
*.ipr
.idea/
# Eclipse
@OGProgrammer
OGProgrammer / talks.md
Created Apr 15, 2017
ZendCon Talk Submissions
View talks.md

Joshua Copeland

Tech Conference Talks

45-60 min presentations

Create your own dependancies!

Do you have multiple PHP projects with the same or similar logic? Are you sick of your team copy pasting code from one project to another? Let's talk about pulling all that shared code into one (or more) libraries and how to implement them in your projects via composer. We'll also be touching on related topics like statis, packagist, toran proxy, composer settings, code structure, autoloading, and strategies to use when refactoring classes into your new library. Quit duplicating code and come check out this talk!

@OGProgrammer
OGProgrammer / utag.318.js
Created Feb 21, 2017
350v2 bred hmac source
View utag.318.js
//tealium universal tag - utag.318 ut4.0.201701161351, Copyright 2017 Tealium.com Inc. All Rights Reserved.
try{(function(id,loader){var u={"id":id};utag.o[loader].sender[id]=u;if(utag.ut===undefined){utag.ut={};}
var match=/ut\d\.(\d*)\..*/.exec(utag.cfg.v);if(utag.ut.loader===undefined||!match||parseInt(match[1])<41){u.loader=function(o,a,b,c,l,m){utag.DB(o);a=document;if(o.type=="iframe"){m=a.getElementById(o.id);if(m&&m.tagName=="IFRAME"){b=m;}else{b=a.createElement("iframe");}o.attrs=o.attrs||{};utag.ut.merge(o.attrs,{"height":"1","width":"1","style":"display:none"},0);}else if(o.type=="img"){utag.DB("Attach img: "+o.src);b=new Image();}else{b=a.createElement("script");b.language="javascript";b.type="text/javascript";b.async=1;b.charset="utf-8";}if(o.id){b.id=o.id;}for(l in utag.loader.GV(o.attrs)){b.setAttribute(l,o.attrs[l]);}b.setAttribute("src",o.src);if(typeof o.cb=="function"){if(b.addEventListener){b.addEventListener("load",function(){o.cb();},false);}else{b.onreadystatechange=function(){if(this.r
View d3stryr-3stripes.php
<html>
<head>
<meta charset="UTF-8">
<?php
$debug=False;
set_time_limit(0);
$actionURL="/d3stryr-3stripes.php";
?>
<title>d3stryr 3stripes</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
View gist:89cbd7bd19c1b07c0c16b9cfae77c066
All:
* Vagrant
* Virtual Box
* Composer
Setup a bashrc and bash_profile
MacOS:
* brew
* php70 keg from brew
Windows:
View CF->s3 bucket policy
{
"Version": "2012-10-17",
"Id": "Policy1478288369041",
"Statement": [
{
"Sid": "Stmt1478288367501",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::meadows-dev-uploads/*"
@OGProgrammer
OGProgrammer / d3stryr-3stripes-atc-cs.php
Created Sep 25, 2016
Helper script for d3stryr-3stripes.php
View d3stryr-3stripes-atc-cs.php
<?php
$marketsList=[];
$marketsList['AT']='de_AT';
$marketsList['AU']='en_AU';
$marketsList['BE']='fr_BE';
$marketsList['BR']='pt_BR';
$marketsList['CA']='en_CA';
$marketsList['CL']='es_CL';
$marketsList['CO']='es_CO';
$marketsList['CZ']='cz_CZ';
You can’t perform that action at this time.