Skip to content

Instantly share code, notes, and snippets.

View mbaric's full-sized avatar

Matija Baric mbaric

View GitHub Profile
@mbaric
mbaric / s3-get.sh
Last active December 4, 2023 05:41 — forked from mmaday/s3-get.sh
S3 signed GET in plain bash (Requires openssl and curl)
#!/usr/bin/env bash
#
# Usage:
# s3-get.sh <bucket> <region> <source-file> <dest-path>
#
# Description:
# Retrieve a secured file from S3 using AWS signature 4.
# To run, this shell script depends on command-line curl and openssl
#
# References:
<?php
/* Charging a Customer
For a customer, you can use the same HTML, CSS, and JS. You just have to change the PHP script. You have to create a Customer object then charge this customer object.
*/
\Stripe\Stripe::setApiKey("____YOUR_STRIPE_SECRET_KEY____");
// Get the token from the JS script
$token = $_POST['stripeToken'];
@mbaric
mbaric / categories.php
Created June 20, 2017 12:47
Joomla 3.5 virutemart VirtueMart 3.2.2 - Count Products in Categories and SubCategories
<?php
/**
*
* Shows the products/categories of a category
*
* @package VirtueMart
* @subpackage
* @author Max Milbers
* @link ${PHING.VM.MAINTAINERURL}
* @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
alias gc=gitCheckout
.
.
.
gitCheckout() {
git checkout -b $1 origin/$1
}