tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the
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
bind-key C-b send-prefix | |
bind-key C-o rotate-window | |
bind-key C-z suspend-client | |
bind-key Space next-layout | |
bind-key ! break-pane | |
bind-key " split-window | |
bind-key # list-buffers | |
bind-key $ command-prompt -I #S "rename-session '%%'" | |
bind-key % split-window -h | |
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window |
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 |
- 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
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
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep elasticsearch | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist | |
launchctl remove homebrew.mxcl.elasticsearch | |
pkill -f elasticsearch |
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
# Assumes the database container is named 'db' | |
DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
DB_HOSTNAME=db | |
DB_USER=postgres | |
LOCAL_DUMP_PATH="path/to/local.dump" | |
docker-compose up -d db | |
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
docker-compose stop db |
mysql> CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'localhost' WITH GRANT OPTION;
mysql> CREATE USER 'user_name'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'%' WITH GRANT OPTION;
NewerOlder