Skip to content

Instantly share code, notes, and snippets.

View mathieubotter's full-sized avatar

Mathieu mathieubotter

View GitHub Profile
@CorneliusJack
CorneliusJack / PS-GetLatestReleaseZip.ps1
Created November 15, 2017 16:46
PowerShell script used to download and extract the latest release zip file of a private project from the GitHub API
## PowerShell script used to download and extract the latest release zip file of a private project from the GitHub API ##
# Parameters
$orga = "[YOUR_ORGANIZATION]"
$repo = "[YOUR_PROJECT]"
$apiUrl = "https://api.github.com/repos/$orga/$repo/releases/latest"
$token = "[YOUR_TOKEN]"
$folder = "C:\[YOUR_PATH]"
$date = Get-Date -format "yyyy-MM-dd"
$zip = "$folder\$repo-$date.zip"
@JeffreyWay
JeffreyWay / gist:5695346
Created June 2, 2013 23:33
And we wonder why we get overwhelmed.
So you want to accept payments online with PHP?
- Well, you probably don't want to handle that process manually. Too dangerous and risky.
- So learn the Stripe API. Works great!
- But you'll still need to setup SSL. So go learn how to do that.
- Stripe provides a PHP package, so download that through Composer. If you're not familiar with Composer, you'll need to learn that too.
- If you want the most flexibility, you'll want to manually create the payment form.
- So you'll need to send an AJAX request with a special token to Stripe's API. jQuery makes this easy, so go learn jQuery.
- Once the payment completes, you'll likely want to send the buyer a "Purchased" email, so learn how to send email.
- But don't make the user wait for the email to send. That takes too long. Add that to a background job.