Skip to content

Instantly share code, notes, and snippets.

View SammyK's full-sized avatar
🐶
Meredith Palmer Memorial Celebrity Rabies Awareness ProAm FunRun Race 4 The Cure

Sammy Kaye Powers SammyK

🐶
Meredith Palmer Memorial Celebrity Rabies Awareness ProAm FunRun Race 4 The Cure
View GitHub Profile
@labbati
labbati / local-build.sh
Last active January 25, 2019 14:18
Build packages for dd-trace
#!/usr/bin/env bash
rm -rf extensions
mkdir -p extensions
rm -rf build/packages
mkdir -p build/packages
function build_version() {
PHP_VERSION=$1
@dcousineau
dcousineau / app.js
Last active August 29, 2015 14:19
How to initialize cookies for Safari when your app lives in an Iframe
import cookie from 'cookie-cutter';
App.on('before:start', () => {
//Safari does not respect P3P policies by default and blocks all 3rd party cookies (which is what our cookie is when
//loaded in an Iframe). To work around this we need to open a window to our application and set the cookies then
//close it. Safari allows us to interact with cookies that have already been set (but not create new ones).
if (cookie.get('expected_cookie') === undefined) {
//However, Safari (like all browsers) puts the kibosh on all windows that open without user interaction!
//Therefore we intercept all clicks to open the short-lived window that initializes all of our cookies.
$(document.body).one('click', '[data-goto]', e => {
@hikari-no-yume
hikari-no-yume / config-bare.sh
Created February 11, 2015 03:06
PHP config scripts that I use
#!/bin/sh
make clean
./vcsclean
./buildconf
YACC=/usr/local/opt/bison27/bin/bison ./configure --enable-debug --enable-phpdbg "$@"
var Style = React.createClass({
render: function() {
var style = assign({}, this.props);
delete style.children;
return React.createElement(
'div',
{style: style, children: this.props.children}
);
}
@natelandau
natelandau / .bash_profile
Last active March 20, 2024 22:19
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@fideloper
fideloper / Gettable.php
Created March 9, 2014 19:33
Trait for making protected/private attributes "gettable", leaving "setting" the attributes a matter of business logic to be implemented.
<?php
trait Gettable {
/**
* Retrieve private attributes.
* Attributes should be protected
* so they cannot be *set* arbitrarily.
* This allows us to *get* them as if they
* were public.
@dariodiaz
dariodiaz / CleverLink.php
Created February 17, 2014 20:02
php laravel: macro to change current active link
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@nateware
nateware / gist:3997958
Created November 2, 2012 00:53
Cheat sheet to create auto-scaling group behind ELB
  1. Create the appropriate VPC that your application is going to live in. Create subnets for each availability zone you want to use.

  2. Create VPC security group(s) for your auto-scaling instances. For example, if you're going to auto-scale web servers, create a "web" VPC security group.

  3. Go into AWS console and create an ELB. Easy wizard. Select HTTP and (if needed) HTTPS. Make sure it's associated with the VPC you created in step 1.

  4. Create an auto-scaling launch configuration from the CLI. The launch configuration has the AMI, size, and security group from step #2. The security group must be by ID not name ("sg-12345"):

       as-create-launch-config web --image-id ami-2e31bf1e --instance-type m1.medium \
    

-g sg-7619041a --key root