Watch a table for changes and push a notification with a payload describing the change.
In the Postgres shell:
-- Create the functions
| #!/bin/bash | |
| # Sign a file with a private key using OpenSSL | |
| # Encode the signature in Base64 format | |
| # | |
| # Usage: sign <file> <private_key> | |
| # | |
| # NOTE: to generate a public/private key use the following commands: | |
| # | |
| # openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048 | |
| # openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem |
Watch a table for changes and push a notification with a payload describing the change.
In the Postgres shell:
-- Create the functions
Install the React Developer Tools Chrome Extension.
Go to the egghead website, i.e. Getting Started with Redux
Click View -> Developer -> Javascript Console, then the React tab, then the <NextUpLessonList ...> tag.
Click back to the Console tab, then run:
| aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-2 |
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| #!/bin/bash | |
| bucket=$1 | |
| set -e | |
| echo "Removing all versions from $bucket" | |
| versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
| markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d startSometimes you need to iterate over a ton of items and you don't want the overhead of creating AR objects out of all of them. Hell, you only need a few things! Well, #pluck has your back.
But what if you want to iterate over many tonnes of items?
Pluck in batches to the rescue!
Enjoy!