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
#!/bin/sh | |
# attach_ebs.sh - Attach an EBS volume to an EC2 instance. | |
# Copyright (C) 2020 Peter Willis <[email protected]> | |
# | |
# This script is designed to create and mount a single EBS volume based on its tag:Name | |
# in order to implement persistent storage. If there is more than one EBS volume | |
# with the same tag, this script will fail. | |
# | |
# Order of operations: | |
# 1. Detect EBS volume based on "tag:Name" "$TAG_NAME" |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
#!/bin/sh | |
# | |
# LICENSE AT END OF FILE | |
# | |
# This is a script to automatically install pacaur from the AUR. It is | |
# intended for fresh systems with no other means to install from AUR. | |
# Theoretically, this script can install other packages too. Just modify | |
# the $aurpkgs variable below. | |
# |
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
'use strict'; | |
var crypto = require('crypto'); | |
var _ = require('lodash'); | |
/** | |
* Will encrypt password in Symfony2 way using a given salt. | |
* | |
* @param {string} password | |
* @param {string} salt |