Skip to content

Instantly share code, notes, and snippets.

View robdyke's full-sized avatar

Rob Dyke robdyke

View GitHub Profile
@robdyke
robdyke / .env.example
Created November 23, 2021 18:52 — forked from gavincampbell/.env.example
Post-deployment configuration of WordPress in Azure App Service, notes at https://gavincampbell.dev/post/post-deployment-configuration-azure-web-apps/
LOCATION=uksouth
RESOURCE_GROUP_NAME=webapp-config-demo
SERVICE_PLAN_NAME=app-service-plan-free-wp
SERVICE_PLAN_SKU=FREE
WEB_APP_NAME=mywpsite-ahfdskf
MARIADB_SKU=B_Gen5_1
MARIADB_SERVER_NAME=dbserver-ahfdskf
MARIADB_ADMIN_USER=BOSS_HOGG
MARIADB_ADMIN_PASSWORD=R05coePColtrane
WORDPRESS_DB_NAME=wpdb
@robdyke
robdyke / readme.md
Created September 24, 2021 14:45 — forked from primaryobjects/readme.md
How to remote desktop from Linux Mint to Windows 10 with AzureAD Azure AD login

How to remote desktop from Linux Mint to Windows 10 with AzureAD

The following steps detail how to connect over Remote Desktop from Linux Mint or Ubuntu to Windows 10 with an AzureAD username and password login account.

  1. In Windows 10, right-click This PC or My Computer and select Properties.
  2. Click Remote Settings.
  3. Check the option Allow remote connections to this computer.
  4. Uncheck the option Allow connections only from computers running Remote Desktop with Network Level Authentication.
  5. Click OK.
@robdyke
robdyke / readme.md
Created September 24, 2021 14:45 — forked from primaryobjects/readme.md
How to remote desktop from Linux Mint to Windows 10 with AzureAD Azure AD login

How to remote desktop from Linux Mint to Windows 10 with AzureAD

The following steps detail how to connect over Remote Desktop from Linux Mint or Ubuntu to Windows 10 with an AzureAD username and password login account.

  1. In Windows 10, right-click This PC or My Computer and select Properties.
  2. Click Remote Settings.
  3. Check the option Allow remote connections to this computer.
  4. Uncheck the option Allow connections only from computers running Remote Desktop with Network Level Authentication.
  5. Click OK.
#!/usr/bin/env python3
import zipfile
import sys
import re
import xml.etree.ElementTree as ET
namespaces = {
'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
@robdyke
robdyke / wireguard.conf
Created January 24, 2021 01:05 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@robdyke
robdyke / odoo_calculate_workers.sh
Created December 22, 2018 01:58
Analyzes the characteristics of the server and helps calculate the number of workers and memory for each
#!/bin/bash
# CONST 1GB
CONST_1GB="1024*1024*1024"
# VARIABLE WORKERS
CMD_W=0
@robdyke
robdyke / docker-compose.yml
Created June 28, 2018 00:44 — forked from ernest-okot/docker-compose.yml
Traefik Docker Stack with HTTPS integration with LetsEncrypt
version: '3'
services:
traefik:
image: traefik:alpine
command: |-
--entryPoints="Name:http Address::80 Redirect.EntryPoint:https"
--entryPoints="Name:https Address::443 TLS"
--defaultentrypoints="http,https"
--accesslogsfile="/var/log/access.log"
@robdyke
robdyke / hastebin.sh
Last active July 12, 2017 20:20 — forked from flores/hastebin.sh
hastebin shell client
#!/bin/bash
server='hastebin.com';
usage="$0 pastes into $server
usage: $0 something
example: '$0 pie' or 'ps aufx |$0'"
if [ -z $1 ]; then
str=`cat /dev/stdin`;
@robdyke
robdyke / custom-queries.php
Created December 13, 2016 00:00 — forked from carlodaniele/custom-queries.php
An example plugin showing how to add custom query vars, rewrite tags and rewrite rules to WordPress
<?php
/**
* @package Custom_queries
* @version 1.0
*/
/*
Plugin Name: Custom queries
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
@robdyke
robdyke / 1 nginx-railo.conf
Created October 28, 2016 14:25 — forked from igal-getrailo/1 nginx-railo.conf
this is a reverse-proxy connector that connects nginx to Railo. the files in this example assume that they are located in the same folder as the nginx executable file (i.e. nginx.exe on Windows).the main conf file is nginx-railo.conf which should be passed to nginx as the config file, e.g. nginx -c nginx-railo.confit includes other config files …
#### this is the main config file for nginx, to specify it from the command line, use the -c switch, e.g
#### nginx.exe -c nginx-railo.conf
##** if connecting to Tomcat, use Tomcat's RemoteIpValve to resolve CGI.REMOTE_ADDR, CGI.SERVER_NAME, and CGI.SERVER_PORT_SECURE
##** <Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="X-Forwarded-Proto" remoteIpHeader="X-Forwarded-For" protocolHeaderHttpsValue="https" />
#user nobody;
#pid logs/nginx.pid;