Skip to content

Instantly share code, notes, and snippets.

View Braunson's full-sized avatar

Braunson Yager Braunson

View GitHub Profile
@Braunson
Braunson / ShopifyMultipass.php
Last active May 22, 2022 11:12 — forked from xthexder/ShopifyMultipass.php
ShopifyMultipass - Ported to PHP
<?php
date_default_timezone_set("UTC");
class ShopifyMultipass {
private $encryption_key;
private $signature_key;
public function __construct($multipass_secret) {
// Use the Multipass secret to derive two cryptographic keys,
// one for encryption, one for signing
@Braunson
Braunson / all-calendar-freebusy-check.php
Last active August 29, 2015 14:22
Checking freebusy on all Google Calendars for an authorized account.
<?php
// Create an authorized calendar service object
$calendarService = new Google_Service_Calendar( $client );
$calendarList = $calendarService->calendarList->listCalendarList();
$calendarArray = [];
// Put together our calendar array
while(true) {
foreach ($calendarList->getItems() as $calendarListEntry) {
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"
@Braunson
Braunson / README.md
Last active August 29, 2015 14:18 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@Braunson
Braunson / gist:aa83fb9531db5c580252
Last active August 29, 2015 14:17
Test Credit Card Account Numbers - PayPal

While testing, use only the credit card numbers listed here. Other numbers produce an error.

Expiration Date must be a valid date in the future (use the mmyy format).

Credit Card Type Credit Card Number
American Express 378282246310005
American Express 371449635398431
American Express Corporate 378734493671000
Australian BankCard 5610591081018250

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@Braunson
Braunson / index.php
Last active August 29, 2015 14:15 — forked from elsassph/index.php
<?php
// first create a new voice chat room:
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query(array()),
)
@Braunson
Braunson / dataTables.less
Created February 9, 2015 20:19
DataTables 1.10.4 converted to LESS
//
// Colour customisation
//
// Border between the header (and footer) and the table body
@table-header-border: 1px solid #111111;
// Border of rows / cells
@table-body-border: 1px solid #dddddd;