Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# install needed curl package
sudo apt install --no-install-recommends curl -y
# install kubectl
# https://github.com/kubernetes/minikube/issues/3437#issuecomment-449408316, maybe use https://storage.googleapis.com/minikube/releases/v0.30.0/docker-machine-driver-kvm2
curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x /tmp/kubectl && \
sudo mv /tmp/kubectl /usr/local/bin/kubectl
# kubectl tab completion
sudo sh -c 'echo "source <(kubectl completion bash)" > /etc/bash_completion.d/kubectl'
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@troyharvey
troyharvey / deployment.yml
Last active June 7, 2024 15:09
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
kubectl get pods -a | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@negz
negz / kubedump.sh
Last active March 6, 2024 18:42
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
@bvis
bvis / Jenkinsfile
Last active January 3, 2023 20:45
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@StevenACoffman
StevenACoffman / Comparison of multi-host Docker networking.md
Last active June 27, 2022 09:14
Comparison of multi-host Docker networking
@noromanba
noromanba / apt-daily-timer-disable.md
Created December 25, 2016 17:51
how to disable apt-daily.timer

how to disable apt-daily.timer

$ systemctl stop apt-daily.timer
$ systemctl disable apt-daily.timer
$ systemctl mask apt-daily.service
$ systemctl daemon-reload

check current status

@mjnaderi
mjnaderi / install-arch.md
Last active June 13, 2024 23:27 — forked from mattiaslundberg/arch-linux-install
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.

@james-see
james-see / squid_http_setup_ubuntu.sh
Last active February 21, 2022 14:18
squid http proxy setup on ubuntu
#!/bin/bash
# get ip address
myip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install buildessentials apache2-utils
sudo apt-get install fakeroot devscripts gawk gcc-multilib dpatch
sudo apt-get install build-dep squid3
sudo apt-get install build-dep openssl
sudo apt-get install libssl-dev openssl