Skip to content

Instantly share code, notes, and snippets.

View stevewaffles's full-sized avatar

stevewaffles

View GitHub Profile
@stevewaffles
stevewaffles / Install Composer using MAMP's PHP.md
Created December 12, 2017 03:30 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@stevewaffles
stevewaffles / mamp.md
Created February 15, 2017 21:49 — forked from jfloff/mamp.md
How to get MAMP to work with SSL ... Yes really.

First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:

sudo lsof | grep LISTEN

If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)

ps <pid of that process>

If you don't see MAMP, you are in good hands, I have just the thing for you:

CakePHP via composer

composer.json

{
  "name": "assando-sites",
  "require": {
    "cakephp/cakephp": ">=2.5.0",
    "ext-apcu": "*",
@stevewaffles
stevewaffles / aweber.php
Last active August 29, 2015 14:27
Aweber subscribe
<?php
public function handle($event) {
$params = $event->subject();
//create new instance of aweber using our dev creds
$app = new AweberAPI(Configure::read('aweber.consumerKey'), Configure::read('aweber.consumerSecret'));
//get our aweber account
$account = $app->getAccount(Configure::read('aweber.accessToken'), Configure::read('aweber.accessSecret'));
//find the list id that we want to subscribe the email to
$get_list = $account->lists->find(array('name' => $params['list_id']));
$get_list = $get_list[0];
client
dev tun
proto tcp
remote 1.tcp.ngrok.io 20352
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
local 192.168.1.2 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto tcp #Some people prefer to use tcp. Don't change it if you don't know.
port 443
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/ttg.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/ttg.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints
@stevewaffles
stevewaffles / MakeOpenVPN.sh
Last active August 29, 2015 14:26 — forked from laurenorsini/MakeOpenVPN.sh
MakeOpenVPN.sh by Eric Jodoin
#!/bin/bash
# Default Variable Declarations
DEFAULT="Default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".3des.key"
CA="ca.crt"
TA="ta.key"
var Video = Backbone.Model.extend({});
var VideoList = Backbone.Collection.extend({
model: Video,
url: '/videos'
});
var VideoPlayerView = Backbone.View.extend({
id: 'video-player',
className: 'video-player',
@stevewaffles
stevewaffles / filepicker_acclaim.js
Created December 2, 2014 22:40
FilePicker upload to Acclaim
filepicker.setKey('Ar6ip0fB0RbyQ2LuJnyB4z');
filepicker.pickAndStore({services:['computer']}, {location:"S3"}, function(response) {
upload_finished(response);
});
function upload_finished(response) {
$.ajax({
url: '/media/add/780',
type: "POST",

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>