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 yum install -y htop | |
sudo amazon-linux-extras install -y docker | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
sudo usermod -a -G docker ec2-user | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo ln -s /usr/local/bin/docker-compose /bin/docker-compose |
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
// | |
// For use in SwiftUI Text() views | |
// Supports Italic, Bold and Links | |
// Feedback welcome! | |
extension String { | |
@available(iOS 15, *) | |
func toMarkdown() -> String { | |
var transformed = self | |
.replacingOccurrences(of: "<i>\\s?+", with: "*", options: .regularExpression, range: nil) /// italic |
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 the number of runners to create at the bottom of script | |
# Required ENV: | |
# export MACHINE_NAME=whimby | |
# export GITHUB_PERSONAL_ACCESS_TOKEN=xxxx | |
# export RUNNER_LABELS=self-hosted,Linux,X64 |
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
class CarPlayMapView: UIViewController, CPMapTemplateDelegate { | |
var mapView: MKMapView? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
print("loading the carplay mapview") | |
let region = MKCoordinateRegion( |
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
import json | |
import requests | |
import time | |
import warnings | |
from enum import Enum | |
from dataclasses import dataclass | |
from dataclasses_json import dataclass_json | |
from typing import List, Tuple | |
warnings.filterwarnings('ignore', message='Unverified HTTPS request') |
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
# Scans your plex movies, if a movie has only SD quality, it will send it to Radarr | |
# pip install plexapi | |
# python 3.6+ | |
# | |
from plexapi.server import PlexServer | |
import re | |
import requests | |
plex_url = 'http://192.168.1.100:32400' | |
plex_token = 'abc123' |
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
# Enable bridged traffic - https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ | |
cat <<EOF > /etc/sysctl.d/k8s.conf | |
net.bridge.bridge-nf-call-ip6tables = 1 | |
net.bridge.bridge-nf-call-iptables = 1 | |
EOF | |
sysctl --system | |
# Enable IP Forward | |
echo "1" > /proc/sys/net/ipv4/ip_forward |
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
# How to install Check MK Agent on ubuntu 16.04 | |
# Install check_mk_agent: | |
# - sudo apt-get install check-mk-agent (will install older version) | |
# - On your Check_MK dashboard, go to "Monitoring Agents", click the link for "Check_MK Agent for Linux", save the raw text | |
# on your server: | |
sudo vi /usr/bin/check_mk_agent | |
# paste Check_MK dashboard > Monitoring Agents > Check_MK Agent for Linux |
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
# what a headache! | |
# 10-05-2017 | |
# FIRST! | |
# Install kyngchaos 1.11 complete: | |
# http://www.kyngchaos.com/software/frameworks | |
# Go into your folder where your virtualenv lives and activate | |
source bin/activate |
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 id3v2 ffmpeg | |
# | |
# USAGE: | |
# cd /book title/ | |
# bash ~/this_script_path.sh | |
# rm *.m4b (you need to manually remove the original in case something goes wrong) | |
# | |
# |
NewerOlder