#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PHP CodeSniffer pre-commit hook for git | |
# | |
# @author Soenke Ruempler <soenke@ruempler.eu> | |
# @author Sebastian Kaspari <s.kaspari@googlemail.com> | |
# | |
# see the README | |
PHPCS_BIN=/usr/bin/phpcs | |
PHPCS_CODING_STANDARD="$(git rev-parse --show-toplevel)/doc/CodeStandard.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
print_r($argv); | |
if (count($argv) < 3) { | |
die("wrong number of arguments\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('recurlyphp/lib/recurly.php'); | |
// Required for the API | |
Recurly_Client::$subdomain = 'yoursubdomain' | |
Recurly_Client::$apiKey = 'apikey'; | |
Recurly_js::$privateKey = 'privatekey'; | |
$signature = Recurly_js::sign(array('account'=>array('account_code'=>'aaa1234588'),'subscription' => array( | |
'plan_code' => 'plan_trial', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "sha1.h" | |
#include <SoftwareSerial.h> | |
SoftwareSerial SerialRNXV(2, 3); | |
int irVal = 0; | |
int distOn = 0; // getting distance | |
const int ms = 1; // unit of milliseconds | |
bool authed = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// YourProject-Bridging-Header.h | |
#import <FacebookSDK/FacebookSDK.h> | |
// AppDelegate.swift | |
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Hacked together from the minim tutorial examples | |
**/ | |
import ddf.minim.analysis.*; | |
import ddf.minim.*; | |
Minim minim; | |
//AudioPlayer jingle; | |
FFT fftLin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout | |
//Usage: Exactly as PHP's SoapClient class, except that 3 new options are available: | |
// timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout | |
// connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout | |
// sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate | |
class SoapClientTimeout extends SoapClient | |
{ | |
private $timeout = 0; | |
private $connecttimeout = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#New Relic API Key see https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/api-key#creating | |
NR_API_KEY="INSERT_API_KEY_HERE" | |
#Find New Relic App Name, if your top level folder is not the name of your application change the below two lines to simply NR_APP_NAME="MY_APP_NAME". | |
NR_APP_NAME=$(git rev-parse --show-toplevel) | |
NR_APP_NAME=$(basename "$NR_APP_NAME") | |
#Get the current git branch |
OlderNewer