Skip to content

Instantly share code, notes, and snippets.

View michaeljberry's full-sized avatar

Michael michaeljberry

  • Raleigh, North Carolina
View GitHub Profile
@evgalak
evgalak / aws-quicksight-embed-dashboard.php
Last active March 13, 2024 12:38
PHP code snippet to generate signed URL of the AWS QuickSight embed dashboard
<?php
// In addition to explanations from:
// https://stackoverflow.com/questions/53773313/how-to-get-generate-aws-quicksight-secure-dashboard-url/54052069#54052069
use Aws\Sts\StsClient;
use Aws\Credentials\Credentials;
use Aws\QuickSight\QuickSightClient;
use Aws\CognitoIdentity\CognitoIdentityClient;
use Aws\QuickSight\Exception\QuickSightException;

Given a subscribed calendar with a url like

https://example.com/example.ics

To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like

https://example.com/example.ics#1

Adding the anchor tag will force Google Calendar to think of it as a new calendar

@mareksuscak
mareksuscak / bump-version.sh
Created March 15, 2015 12:56
Bump version shell script.
#!/bin/bash
# Thanks goes to @pete-otaqui for the initial gist:
# https://gist.github.com/pete-otaqui/4188238
#
# Original version modified by Marek Suscak
#
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3" or even "1.2.3-beta+001.ab"
@benjamw
benjamw / array_filter_recursive.php
Last active December 12, 2024 06:58
PHP array_filter_recursive function
<?php
/**
* Exactly the same as array_filter except this function
* filters within multidimensional arrays
*
* @param array $array
* @param callable|null $callback optional filter callback function
* @param bool $remove_empty_arrays optional flag removal of empty arrays after filtering
*