- example: using bash (aws cli sdk)
- example: using php (aws php sdk v3.*)
- you need to add example.com as custom auth provider in aws console (cognito/federated)
import gifAnimation.*; | |
GifMaker gifExport; | |
int frames = 0; | |
int totalFrames = 120; | |
public void setup() { | |
smooth(); | |
size(400, 400); |
public class ExodusWriter { | |
private JdbcTemplate jdbcTemplate; | |
private TransactionTemplate transactionTemplate; | |
public ExodusWriter(DataSource dataSource) { | |
DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource); | |
jdbcTemplate = new JdbcTemplate(transactionManager.getDataSource()); | |
transactionTemplate = new TransactionTemplate(transactionManager); | |
} |
List of regions your project is served from when you deploy using surge. | |
yyz.surge.sh : 159.203.50.177 : CA : Toronto | |
jfk.surge.sh : 159.203.159.100 : US : New York | |
sfo.surge.sh : 138.197.235.123 : US : San Francisco | |
lhr.surge.sh : 46.101.67.123 : GB : London | |
ams.surge.sh : 188.166.132.94 : NL : Amsterdam | |
fra.surge.sh : 138.68.112.220 : DE : Frankfurt | |
sgp.surge.sh : 139.59.195.30 : SG : Singapore |
#!/bin/bash | |
S3_BUCKET_NAME=$1 | |
CF_ID=$2 | |
# Sync all files except for service-worker and index | |
echo "Uploading files to $S3_BUCKET_NAME..." | |
aws s3 sync build s3://$S3_BUCKET_NAME/ \ | |
--acl public-read \ | |
--exclude service-worker.js \ |
#!/bin/bash | |
set -m | |
showhelp() { | |
echo "Usage: $0 [-ohvrc] <command>" | |
echo "Pipes stderr from command to a new tmux pane." | |
echo " -h | -v split horizontally or vertically (default vertically)" | |
echo " -r send stdout to pane instead of stderr" | |
echo " -o send both stdout and stderr to new panes" | |
echo " -c close pane automatically after program terminates" |
<?php | |
/* | |
This code sample demonstrates several style for representing an option array with | |
the following fields: name, label, type_id, visible, default. | |
When designing this we should keep in mind that the option key may be represented | |
by either a literal or a (class)constant. As such we mix and match those for | |
illustrative purposes. | |
*/ |
The Mosquitto Pub CLI | |
$> mosquitto_pub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/thing' -m "Hello from Mosquitto" | |
The Mosquitto Sub CLI | |
$ mosquitto_sub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/+' |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |