Skip to content

Instantly share code, notes, and snippets.

View visualdensity's full-sized avatar
🤷‍♂️
Whassup?

Wicked visualdensity

🤷‍♂️
Whassup?
View GitHub Profile
<?php
/**
* PHP Akamai Purge
*
* By: Jason Rundell <jason dot rundell (at) gmail dot com> http://jasonrundell.com @jasonrundell
* Started: December 20th 2011
* Fork me: https://github.com/jasonrundell/PHP-Akamai-Purge
* Cudos: https://github.com/hradtke http://hermanradtke.com @hermanradtke
* I came across https://bugs.php.net/bug.php?id=43910 while doing a Google search for
* other folks who have worked with Akamai's SOAP API and PHP. The original function
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "CloudFormation Template to provision a Jenkins instance",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String",
@visualdensity
visualdensity / npm_install_output
Created June 13, 2013 01:21
NPM install output
npm WARN package.json peazie@0.0.0 No repository field.
npm WARN package.json peazie@0.0.0 No readme data.
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/grunt-contrib-compass
npm http GET https://registry.npmjs.org/grunt-contrib-connect
npm http GET https://registry.npmjs.org/grunt-contrib-clean
npm http GET https://registry.npmjs.org/grunt-contrib-htmlmin
npm http GET https://registry.npmjs.org/grunt-contrib-imagemin
npm http GET https://registry.npmjs.org/grunt-contrib-livereload
npm http GET https://registry.npmjs.org/grunt-bower-requirejs
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Single node MongoDB deployment with a RAID10 storage configuration",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access",
"Type" : "String"
},
"Resources" : {
"JenkinsInstance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"AvailabilityZone" : "us-west-1b",
"SecurityGroups" : [ "qa" ],
"KeyName" : "pav_prod",
"ImageId" : "ami-d383af96",
"UserData" : { "Fn::Base64" : {
"Fn::Join" : [
@visualdensity
visualdensity / php.ini
Created July 4, 2013 11:54
For automated rollout
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
[{rabbitmq_shovel,[
{shovels, [
{log_shovel, [
{sources, [
{broker, "amqp://logger:logging123@localhost/logging"},
{declarations, [
{'queue.declare',
[
{queue, <<"log_replica_queue">> },
durable
@visualdensity
visualdensity / Vagrantfile
Created September 10, 2013 10:46
Multi-instance vagrant config with shell provision and arguments passed.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "exp01" do |exp01|
exp01.vm.box = "ubuntu1304"
exp01.vm.network :private_network, ip: "10.16.1.30"
exp01.vm.provision "shell", path: "bootstrap.sh", :args => "'exp01'"
end
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`