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
services: | |
ssl_terminator: | |
# ssl terminator docs: https://24hoursmedia.github.io/docker-nginx-ssl-terminator/ | |
image: 24hoursmedia/nginx-ssl-terminator:1.2.0-nginx1.25-alpine3.18-slim | |
restart: always | |
depends_on: | |
- caching_proxy | |
ports: | |
- "${PUBLIC_HTTPS_PORT:-443}:12443" |
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/bash | |
set -e | |
set -o pipefail | |
# Install docker and docker compose plugin on AWS Linux AMI 2023 | |
# Defaults to compose plugin for intel machines | |
# Run this with: | |
# bash <(curl -sL https://gist.githubusercontent.com/24HOURSMEDIA/52b3f516ee1427437b6f52b9b65ac969/raw/install-docker-x86.sh?_cb=$(date +%s)) |
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/bash | |
sudo apt-get install hdparm | |
# get disk names with | |
sudo lsblk -l | |
# test speed without cache | |
sudo hdparm -Tt --direct /dev/sda1 | |
# with cache |
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
# Add your ssh keys first to .ssh/authorized keys | |
# Be sure to have the proper permissions: | |
chmod 700 ~/.ssh | |
chmod 644 ~/.ssh/authorized_keys |
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 | |
sudo curl -sSL https://get.docker.com | sh | |
sudo usermod -aG docker $USER |
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
pipeline{ | |
/** | |
* A declarative Jenkins pipeline tjat demonstrates how variables are handled in Jenkins pipelines | |
* and more specifically how they are handled in stages where the agent running the stage is a docker containers. | |
* | |
* EAP Bachman / 24hoursmedia | |
* https://www.24hoursmedia.com | |
*/ |
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
output: | |
no callback: testing...destruct... | |
with callback: testing...callback...destruct... | |
with callback 2: testing...callback...destruct...was unset... | |
(destruct was always called so that's ok) |
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/bash -e | |
# Put this script in the root of the boot partition (i.e. system-boot) and chmod it with +x | |
# Set Variables | |
BTPATH=/boot/firmware | |
CKPATH=$BTPATH/vmlinuz | |
DKPATH=$BTPATH/vmlinux | |
#Check if compression needs to be done. | |
if [ -e $BTPATH/check.md5 ]; then |
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
<?php | |
return [ | |
'AD' => 'EUR', | |
'AE' => 'AED', | |
'AF' => 'AFN', | |
'AG' => 'XCD', | |
'AI' => 'XCD', | |
'AL' => 'ALL', | |
'AM' => 'AMD', |
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
<?php | |
// assume aws sdk is in composer: "aws/aws-sdk-php": "^3.0", | |
require __DIR__ . '/../../vendor/autoload.php'; | |
// load $AWS_KEY, $AWS_SECRET | |
require __DIR__ . '/../../local/credentials.php'; | |
$bucket = 'BUCKETNAME' | |
$awsCredentials = new \Aws\Credentials\Credentials($AWS_KEY, $AWS_SECRET); |
NewerOlder