- Recipes
- Anonymous GET access
- Anonymous GET access - match HTTP referrer
- Full access for specific IAM user/role
- GET/PUT/DELETE access to specific path within a bucket
- Restricted LIST & PUT/DELETE access to specific path within a bucket
- Full access (and S3 console) for specific IAM users
- Bucket and object delete deny
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from github comment: | |
# https://github.com/dimitri/pgloader/issues/782#issuecomment-1136067634 | |
if [ -z "$3" ]; then | |
echo "Usage: $0 <db name> <mysql dump> <psql dump output>" | |
echo "Requirements: docker" | |
exit 1 | |
fi | |
if ! command -v docker &> /dev/null |
Sample codes in this blog. https://dev.to/paprikamah/how-to-setup-aws-waf-v2-21f1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#multi-films .film-grid').children().map(function() { | |
var $this = $(this), | |
rank = $this.find('.list-film-position').text().trim(), | |
title = $this.find('.film-title').text().trim(), | |
dirYear = $this.find('.director-year').text().trim(), | |
re = dirYear.match(/^(.+), (\d+)$/), | |
dir = re ? re[1] : dirYear, | |
year = re ? re[2] : ''; | |
return [rank, title, year, dir].join('\t'); | |
}).get().join('\n'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- original code: https://github.com/ericelliott/cuid | |
-- Add the "plv8" extension | |
create extension if not exists "plv8"; | |
-- Add the "pgcrypto" extension | |
create extension if not exists "pgcrypto"; | |
\dx | |
-- Connect a database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.migrations.recorder import MigrationRecorder | |
>>> MigrationRecorder.Migration.objects.all() | |
>>> MigrationRecorder.Migration.objects.latest('id') | |
Out[5]: <Migration: Migration 0050_auto_20170603_1814 for model> | |
>>> MigrationRecorder.Migration.objects.latest('id').delete() | |
Out[4]: (1, {u'migrations.Migration': 1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "http://coleingraham.com/2014/09/26/an-approach-to-custom-scales-in-supercollider/" | |
s.boot; | |
( | |
~makeScale = { |ratios| | |
Scale( | |
(0..ratios.size-1), | |
ratios.size, | |
Tuning((ratios.ratiomidi % 12).sort) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ PATH=$(npm bin):$PATH; git diff-tree --no-commit-id --name-only -r HEAD | xargs prettier --write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<artists> | |
<artist> | |
<images> | |
<image height="450" type="primary" uri="" uri150="" width="600" /> | |
<image height="771" type="secondary" uri="" uri150="" width="600" /> | |
</images> | |
<id>1</id> | |
<name>The Persuader</name> | |
<realname>Jesper Dahlbäck</realname> |
NewerOlder