Skip to content

Instantly share code, notes, and snippets.

View tominal's full-sized avatar
👨‍💻
Creating stuff

tom tominal

👨‍💻
Creating stuff
View GitHub Profile
@tominal
tominal / index.js
Last active July 8, 2023 17:37 — forked from amiantos/index.js
Zip and Stream Files from and to S3 using AWS Lambda
// Based on the gist thread from
//
// @amiantos Lambda S3 Zipper http://amiantos.net/zip-multiple-files-on-aws-s3/
//
// and
//
// @RyanClementsHax TypeScript implementation in the same Gist thread
//
// Adapted into JavaScript by @tominal
@tominal
tominal / create-checkout-session.php
Created March 8, 2022 18:28
An example of Stripe Checkout
<?php
require __DIR__ . '/../vendor/autoload.php';
// This is a public sample test API key.
// Don’t submit any personally identifiable information in requests made with this key.
// Sign in to see your own test API key embedded in code samples.
\Stripe\Stripe::setApiKey('sk_test_key_here');
header('Content-Type: application/json');
@tominal
tominal / btnPriceWindowClick.js
Created April 23, 2019 20:24
btnPriceWindowClick function fix
var isZero = false;
function btnPriceWindowClick(btnClick) {
if (btnClick == 'CLR') {
$("#customPrice").data("kendoNumericTextBox").value(0);
}
else {
var priceText = $("#customPrice").val();
var priceLastText = priceText.slice(-2);
if (priceText == null) {
priceText = '0';
@tominal
tominal / size.html
Created October 17, 2017 19:40
Width and height of the current window.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Browser Size Calculator</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #222;