Skip to content

Instantly share code, notes, and snippets.

View mikegreiling's full-sized avatar

Mike Greiling mikegreiling

View GitHub Profile
@samir
samir / gist:707798
Created November 20, 2010 12:51
Base for create .bash_profile for OS X
# --------------------------------------------------------
export APXS2=`which apxs`
export CFLAGS="-arch x86_64 -O2"
export ARCHFLAGS="-arch x86_64"
export EDITOR='mate -w'
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=DxGxcxdxCxegedabagacad
export LC_CTYPE=en_US.UTF-8
@Leechael
Leechael / WeiboController.php
Created January 25, 2011 05:23
The weibo oauth processing controller with li3_oauth.
<?php
namespace app\controllers;
use lithium\net\http\Router;
use lithium\storage\Session;
use li3_oauth\models\Consumer;
class WeiboController extends \lithium\action\Controller {
@mikegreiling
mikegreiling / StripeTutorialPage.html
Created October 11, 2012 05:02 — forked from boucher/StripeTutorialPage.html
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
#!/bin/bash
OPSWORKS_USERDATA_LOG_FILE='/var/log/aws/opsworks/user-data.log'
export OPSWORKS_USERDATA_LOG_FILE
mkdir -p $(dirname ${OPSWORKS_USERDATA_LOG_FILE})
touch ${OPSWORKS_USERDATA_LOG_FILE} && chmod 0600 ${OPSWORKS_USERDATA_LOG_FILE}
exec &> >(tee -a ${OPSWORKS_USERDATA_LOG_FILE}) 2>&1
conslog () {
echo "[$(date --rfc-2822)] opsworks-init: $1" | tee -a ${OPSWORKS_USERDATA_LOG_FILE} > /dev/console
@baranga
baranga / path_segment_encode.php
Created October 9, 2012 08:27
sample implementation of path segment encode with benchmark
<?php
class PathSegmentEncode
{
/**
* Map of allowed special chars in path segments.
*
* http://tools.ietf.org/html/rfc3986#appendix-A
* segement = *pchar
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
var gulp = require('gulp');
var browserify = require('browserify');
var notify = require('gulp-notify');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var plumber = require('gulp-plumber');
var less = require('gulp-less');
var csso = require('gulp-csso');
var watch = require('gulp-watch');
var envify = require('envify');
@czottmann
czottmann / gist:2490462
Last active October 23, 2020 02:49
The Unfollow Manifesto

At some point in the past, I've decided to follow you on Twitter or any other social network, because you appeared to be a person whose postings I might be interested in.

But recently you noticed me unfollowing you.

Now you're confused/sad/angry. Don't be. Because here are the three simple rules I adhere to.

  1. You may unfollow me at any given time, because what I post might not be your cup of tea. It's okay, no hard feelings. I won't take that as an insult. (Really.) I assume we're still cool outside said service, unless of course I wrote some horrible shit that offended you, in which case I am probably sorry.
@bcomnes
bcomnes / git-gpg.md
Last active February 13, 2024 07:33
my version of gpg on the mac
  1. brew install gnupg, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx