Skip to content

Instantly share code, notes, and snippets.

View davidpp's full-sized avatar

David Paquet Pitts davidpp

View GitHub Profile
@scyto
scyto / docker-swarm-architecture.md
Last active June 9, 2024 08:10
My Docker Swarm Architecture
@bdmorin
bdmorin / putio_blackhole_uploader.bash
Last active January 29, 2023 16:37
my blackhole solution for put.io & sonarr
#!/usr/bin/env bash
# authornote: i need to change all mentions of blackhole -> transferdir or something
# tested on macos, YMMV
# Gist: https://gist.github.com/bdmorin/d3c53e0f495f4947bf61fb55e1c85310
# Set ur putio oath token
OAUTH_TOKEN=$(cat ${HOME}/.putio_oauth)
@Sugavanas
Sugavanas / revert-floating-ip-gateway.sh
Last active February 10, 2022 09:09 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean floating IP gateway script (force droplet to use the assigned floating IP for outbound traffic as well as inbound traffic). This forked script will revert back to original settings. Pass the original IP address of the droplet as the first parameter.
#!/bin/bash
# Revert outbound traffic back to original ip. Call script with the original ip address of droplet
NET_INT="eth0"
CURL_TIMEOUT=3
if [ "$1" == "" ]; then
echo "Original IP of droplet not given."
exit 1
fi
@syntaqx
syntaqx / cloud-init.yaml
Last active June 12, 2024 12:59
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@ryenski
ryenski / hello.vue
Last active April 27, 2023 03:04
Stimulus.js + Vue.js
<template>
<div id="app">
<p>{{ message }}</p>
</div>
</template>
<script>
export default {
data: function () {
return {
@ahmadawais
ahmadawais / flywheel-local-xdebug-vscode.md
Last active June 3, 2024 13:28
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@holmberd
holmberd / php-pools.md
Last active June 28, 2024 14:43
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@tmaiaroto
tmaiaroto / Dockerfile
Last active June 30, 2022 08:48
WordPress on Amazon ECS
FROM alpine:3.3
MAINTAINER Tom Maiaroto <tom@outdoorsy.co>
# Install packages
RUN apk --update --repository http://dl-3.alpinelinux.org/alpine/edge/main add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
php7 \
@eschwartz
eschwartz / Dockerfile
Last active November 2, 2023 15:11
npm install from private repo, in docker build
# Add these lines to your dockerfile, before `npm install`
# Copy the bitbucket private key to your docker image
COPY ./bitbucket_ssh_key /opt/my-app
# Copy the ssh script to your docker image
COPY ./ssh-bitbucket.sh /opt/my-app
# Tell git to use your `ssh-bitbucket.sh` script
ENV GIT_SSH="/opt/map-project-tile-server/ssh-bitbucket.sh"
@dduvnjak
dduvnjak / add_cloudflare_ips.sh
Last active June 26, 2024 07:47
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# set the security group ID
SG_ID="sg-00000000000000"
# iterate over the IP ranges in the downloaded file
# and allow access to ports 80 and 443
while read p
do