Skip to content

Instantly share code, notes, and snippets.

Avatar
🦕
☄️

Colin Wilson colinwilson

🦕
☄️
View GitHub Profile
@fridgerator
fridgerator / instructions.md
Created Nov 14, 2019
Auto-renewing Lets Encrypt certificates for Rancher 1.6
View instructions.md

Lets Encrypt has removed their ACME V1 api in favor of ACME V2. The Rancher 1.6 catalog entry for Lets Encrypt certificates doesn't support this api. There is a forked version of the repo, however the service has to be created manually instead of from the catalog.

  1. Create a new service, give it a name, use vxcontrol/rancher-letsencrypt:v1.0.0 for the image
  2. In the "Volumes" tab, add a volume /var/lib/rancher:/var/lib/rancher
  3. In the "Command" tab, set the "Console" option to none
  4. Click to add an Environment Variable, and paste the following into the first "Variable" input field.
  • All of the environment variables should auto-fill.
  • Fill in the necessary values
@DavidWells
DavidWells / netlify.toml
Last active Jan 12, 2021
All Netlify.toml & yml values
View netlify.toml
[Settings]
ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "project/"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active Jan 15, 2021
Online Resources For Web Developers (No Downloading)
View webdev_online_resources.md
@superseb
superseb / get_kubeconfig_custom_cluster_rancher2.sh
Last active Nov 12, 2020
Get kubeconfig for custom cluster in Rancher 2.x
View get_kubeconfig_custom_cluster_rancher2.sh
#!/bin/bash
# Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name
# Needs to be run on the server running `rancher/rancher` container
# Check if jq exists
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; }
# Check if clustername is given
if [ -z "$1" ]; then
echo "Usage: $0 [clustername]"
@ErikSaunier
ErikSaunier / cloud-sql-proxy.service
Created May 30, 2018
How to install Cloud SQL Proxy on Compute Engine instance and make it start on boot with Systemd
View cloud-sql-proxy.service
[Unit]
Description=Connecting MySQL Client from Compute Engine using the Cloud SQL Proxy
Documentation=https://cloud.google.com/sql/docs/mysql/connect-compute-engine
Requires=networking.service
After=networking.service
[Service]
WorkingDirectory=/usr/local/bin
ExecStart=/usr/local/bin/cloud_sql_proxy -dir=/var/run/cloud-sql-proxy -instances=<INSTANCE_CONNECTION_NAME>=tcp:3306
Restart=always
View Traefik-Helm.yml
acme.challengeType=http-01
acme.email=hostmaster@domain.tld
acme.enabled=true
acme.staging=false
acme.logging=true
acme.persistence.enabled=true
acme.persistence.size=1Gi
acme.persistence.storageClass=longhorn
dashboard.domain=traefik.clusterXY.domain.tld
dashboard.enabled=true
@mreferre
mreferre / k8s-sa
Created Apr 26, 2018
Kubernetes Service Account
View k8s-sa
# Inspired by: https://stackoverflow.com/questions/42170380/how-to-add-users-to-kubernetes-kubectl
# this script creates a service account (user1) on a Kubernetes cluster (tested with AWS EKS 1.9)
# prereqs: a kubectl ver 1.10 installed and proper configuration of the heptio authenticator
# this has been tested on Linux in a Cloud9 environment (for MacOS the syntax may be slightly different)
**************************************************
******* Create an account *******
**************************************************
# Create service account for user user1
kubectl create sa user1
@goodwill
goodwill / cloud-sql-proxy.service
Last active Jul 4, 2020
Example Systemd file for starting cloud sql proxy at system start
View cloud-sql-proxy.service
[Install]
WantedBy=multi-user.target
[Unit]
Description=Google Cloud Compute Engine SQL Proxy
Requires=networking.service
After=networking.service
[Service]
Type=simple
@ardziej
ardziej / Kernel.php
Created Oct 12, 2017 — forked from huiralb/Kernel.php
Laravel Language ( Localization )
View Kernel.php
<?php
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\App\Http\Middleware\LanguageMiddleware::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
@paulund
paulund / phpcs.xml
Created Aug 20, 2017
PHP PSR-2 CodeSniffer Config for Laravel
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<!--
The name attribute of the ruleset tag is displayed
when running PHP_CodeSniffer with the -v command line
argument. The description tag below is not displayed anywhere
except in this file, so it can contain information for
developers who may change this file in the future.
-->
You can’t perform that action at this time.