Skip to content

Instantly share code, notes, and snippets.

View offsky's full-sized avatar

Jake Olefsky offsky

View GitHub Profile
@offsky
offsky / ManagesPaymentMethods.php
Last active April 24, 2020 16:36
Laravel Cashier optimized for 3D Secure cards
//Add these lines to Cashier's Concerns/ManagesPaymentMethods.php
use Stripe\PaymentIntent as StripePaymentIntent;
...
public function createPaymentIntent(array $options = [])
{
return StripePaymentIntent::create(
@offsky
offsky / vhost setup on Mac
Last active August 29, 2015 14:04
vhost setup on Mac
From http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/
sudo nano /etc/apache2/httpd.conf
Uncomment
Include /private/etc/apache2/extra/httpd-vhosts.conf
sudo nano /etc/apache2/extra/httpd-vhosts.conf
Make your changes and save
@offsky
offsky / chutesnladders
Last active December 17, 2015 08:39
Chutes and Ladders in Javascript (Computer vs Computer)
function roll() {
return Math.floor((Math.random()*6)+1);
}
function turn(curPos) {
var newPos = curPos+roll(); //get new position
if(newPos>100) return 100; //Win!
switch(newPos) { //apply chutes or ladders
@offsky
offsky / NewMacConfig.md
Last active July 3, 2017 15:50
Setup new mac for web development (Updated for Yosemite)