Skip to content

Instantly share code, notes, and snippets.

View philfreo's full-sized avatar

Phil Freo philfreo

View GitHub Profile
@philfreo
philfreo / closeio_rest_api.php
Last active March 18, 2019 14:34
POST HTTP request with JSON in PHP
$lead = array('name' => 'test');
$headers = array('Content-Type' => 'application/json');
$options = array('auth' => array('YOUR_API_KEY', ''));
$request = Requests::post('https://api.close.com/api/v1/lead/', $headers, json_encode($lead), $options);
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active August 25, 2026 18:55
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@anemitz
anemitz / drip_email.py
Created August 24, 2013 00:07
Send drip-style email through Close.io's API
#!/usr/bin/env python
import sys
import time
import codecs
import argparse
from pybars import Compiler
from closeio_api_client.api import CloseIO_API as CloseIO
@atmos
atmos / heaven.md
Last active November 23, 2020 22:35
Response to a dude who asked about heaven. https://github.com/holman/feedback/issues/422

@holman got a request about our deployment system, heaven

I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?

There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.

When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?

Normally I focus around four questions:

@rxaviers
rxaviers / gist:7360908
Last active October 3, 2026 11:45
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
____ ____ ___ ____ _ _ ____ _____ ____
| _ \ | _ \ / _ \ | _ \ | | | | / ___||_ _|/ ___|
| |_) || |_) || | | || | | || | | || | | | \___ \
| __/ | _ < | |_| || |_| || |_| || |___ | | ___) |
|_| |_| \_\ \___/ |____/ \___/ \____| |_| |____/
___ _ _
|_ _|| \ | |
| | | \| |
| | | |\ |
|___||_| \_|
@gustavohenke
gustavohenke / svg2png.js
Created February 18, 2014 15:27
SVG to PNG
var svg = document.querySelector( "svg" );
var svgData = new XMLSerializer().serializeToString( svg );
var canvas = document.createElement( "canvas" );
var ctx = canvas.getContext( "2d" );
var img = document.createElement( "img" );
img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) );
img.onload = function() {
@teppeis
teppeis / jquery-release-notes.md
Last active November 21, 2022 16:10
jQuery Release Notes
@pokle
pokle / gist:9271432
Last active August 22, 2017 16:01
Automatically mount the EC2 ephermal SSDs as raid0 on Ubuntu

Launch your EC2 EBS instance with two SSDs on the second and third slots (after the root EBS volume), with this in your userdata:

#!/usr/bin/env bash

umount /dev/xvdb
umount /dev/xvdc
apt-get install mdadm -y
mkdir /u01

cat > /etc/init/mount-ephermal-ssd.conf <

@sergejmueller
sergejmueller / ttf2woff2.md
Last active November 15, 2025 22:07
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2