Skip to content

Instantly share code, notes, and snippets.

View elmariofredo's full-sized avatar
💭
building Cloud Native Thermostat 🔥 🥶

Mario Vejlupek elmariofredo

💭
building Cloud Native Thermostat 🔥 🥶
View GitHub Profile
@elmariofredo
elmariofredo / Fill_mikrotik_config.bash
Last active September 6, 2023 11:25
L2TP IPSEC VPN Auto config for mikrotik based on following tutorial http://www.nasa-security.net/mikrotik/mikrotik-l2tp-with-ipsec/ !!! Edit user name/user pass and ipsec secret
# Fetch and fill config
mikrotik_vpn_config=$(curl https://gist.github.com/elmariofredo/7232556/raw/VPN-L2TP-IPSEC.mikrotik \
| sed -e '
s/IPSEC_PEER_SECRET/somesecret/g;
s/USER1_NAME/mario/g;
s/USER1_PASS/somepass/g;
s/IP_RANGE/172.16.24.100-172.16.24.200/g;
s/DNS_SERVER/172.16.22.1/g;
s/LOCAL_ADDRESS/172.16.22.1/g;
s/WINS_SERVER/172.16.22.1/g')
@elmariofredo
elmariofredo / Standard 14 Fonts.md
Last active January 5, 2023 15:32
Fourteen typefaces—known as the standard 14 fonts—have a special significance in PDF documents
  • Courier
  • Courier-Bold
  • Courier-Oblique
  • Courier-BoldOblique
  • Helvetica
  • Helvetica-Bold
  • Helvetica-Oblique
  • Helvetica-BoldOblique
  • Times-Roman
  • Times-Bold
@elmariofredo
elmariofredo / db
Last active January 19, 2022 08:42
Docker run and docker build simplified
#!/bin/bash
if [ -z "$1" ]
then
IMAGE=image
else
IMAGE=$1
fi
WORK_DIR=$(docker image inspect ${IMAGE} --format='{{.Config.WorkingDir}}')
@elmariofredo
elmariofredo / error_page.configmap.yaml
Last active January 16, 2022 02:18
Custom Kubernetes ingress nginx error page
apiVersion: v1
kind: ConfigMap
metadata:
name: error_page
namespace: ingress-nginx
data:
error_page: |
<!DOCTYPE html>
<html>
<head>
locals {
task_definition_family = "${local.prefix}-${var.ecs_task_name}"
}
data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
data "aws_ecs_task_definition" "hack_get_image" {
count = var.preserve_image ? 1 : 0
task_definition = local.task_definition_family
@elmariofredo
elmariofredo / chromeicon.sh
Last active October 12, 2021 10:15
Google Chrome.app custom icon
#!/bin/bash
cp $HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs/Icons/Google\ Chrome /Applications/Google\ Chrome.app/Icon$'\r'
osascript <<EOS
set appName to "Google Chrome"
tell application appName to quit
repeat
tell application "System Events"
if appName is not in (name of application processes) then exit repeat
@elmariofredo
elmariofredo / teamcity-agent.service
Last active March 4, 2021 10:13 — forked from BenWhitehead/teamcity-agent.service
systemd service files for running TeamCity (create in /usr/lib/systemd/system)
[Unit]
Description=TeamCity Build Agent
After=network.target
[Service]
Type=forking
RemainAfterExit=yes
PIDFile=/opt/tc01/logs/buildAgent.pid
Environment="JAVA_HOME=/usr/java/latest"
ExecStart=/opt/tc01/bin/agent.sh start
@elmariofredo
elmariofredo / dnsutils.yaml
Created March 24, 2020 11:35
K8s debug pods
apiVersion: v1
kind: Pod
metadata:
name: dnsutils
namespace: default
spec:
containers:
- name: dnsutils
image: gcr.io/kubernetes-e2e-test-images/dnsutils:1.3
command:
  1. Observability -> Collect all data to be able to observe all events market/users/profit.
  2. Focus -> Give everybody some timeframe (min 1h) to focus on specific thing, don't switch focus unless really necessary thus create perfect task queues with priorities.
  3. Ownership -> Give e2e ownership dev/test/ops/appsupport.
  4. Human -> Always remember that humans are great for their errors because our creativity is based on it.
  5. Re(spect/ward) -> Respect and Reward work.