Skip to content

Instantly share code, notes, and snippets.

View 760524mkfa00's full-sized avatar

Kieran 760524mkfa00

View GitHub Profile
@michoelchaikin
michoelchaikin / gist:fc4db078c0f64f6f5d35
Last active November 13, 2022 18:54
Backup a mySQL database to Google Drive
#! /usr/bin/perl
# Backups and compresses a SQL database, and uploads to Google Drive
# Make sure ~/.my.cnf is set with mySQL login credentials
# Follow instructions at https://developers.google.com/drive/web/auth/web-server to generate a client id and secret
# Use bash script at https://github.com/soulseekah/bash-utils/blob/master/google-oauth2/google-oauth2.sh to create refresh token
# Configuration Options
my $HOST = ''; # mySQL server host
@fideloper
fideloper / stream_file.php
Last active May 22, 2024 20:50
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';