Skip to content

Instantly share code, notes, and snippets.

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
export PATH=/home/hadoop/scripts:${PATH}
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
### Configure Hadoop environment variables
export HADOOP_HOME=/usr/local/hadoop
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
@fcojperez
fcojperez / CHECK_TERMINAL_WINDOW_SIZE.md
Created November 14, 2025 19:26
How to check a Bash Terminal Window Size
@fcojperez
fcojperez / framework_decorator.md
Last active November 25, 2024 10:52
A python framework simulator
@fcojperez
fcojperez / cncf_event_parser.py
Last active March 1, 2024 17:57
CNCF Events Converter to ICS
"""
A script to parse cncf.io api events into ICS format
Developer: [email protected]
license: MIT
"""
import requests
from icalendar import Calendar, Event
from datetime import datetime
cluster/gce/gci/append_or_replace_prefixed_line_test.go: cmd := exec.Command("bash", "-c", args)
cluster/gce/gci/configure_helper_test.go: cmd := exec.Command("bash", "-c", args)
cmd/importverifier/importverifier.go: cmd := "go"
cmd/kubeadm/app/cmd/completion_test.go: cmd := newCmdCompletion(&out, "")
cmd/kubeadm/app/preflight/checks.go: _, err := ipc.exec.LookPath(ipc.executable)
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "conntrack", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "crictl", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ebtables", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ethtool", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ip", mandatory: true, exec: execer},
cluster/gce/gci/append_or_replace_prefixed_line_test.go: cmd := exec.Command("bash", "-c", args)
cluster/gce/gci/configure_helper_test.go: cmd := exec.Command("bash", "-c", args)
cmd/importverifier/importverifier.go: cmd := "go"
cmd/kubeadm/app/cmd/completion_test.go: cmd := newCmdCompletion(&out, "")
cmd/kubeadm/app/preflight/checks.go: _, err := ipc.exec.LookPath(ipc.executable)
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "conntrack", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "crictl", mandatory: true, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ebtables", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ethtool", mandatory: false, exec: execer},
cmd/kubeadm/app/preflight/checks_linux.go: InPathCheck{executable: "ip", mandatory: true, exec: execer},
@fcojperez
fcojperez / README.md
Last active May 7, 2024 11:42
chroot1.sh is a bash script to create a custom sandbox based on chroot0.sh from book Core Kubernetes. Christopher Love, Jay Vyas. The script creates a process isolated sandbox using unshare. More information on https://www.manning.com/books/core-kubernetes

chroot1

chroot1.sh is a bash script to create a custom sandbox based on chroot0.sh from book Core Kubernetes. Christopher Love, Jay Vyas.

The script creates a process isolated sandbox using unshare. More information on https://www.manning.com/books/core-kubernetes

@fcojperez
fcojperez / README.md
Last active May 7, 2024 11:48
chroot0.sh is a bash script to create a custom sandbox based on chroot0.sh from book Core Kubernetes. Christopher Love, Jay Vyas. More information on https://www.manning.com/books/core-kubernetes
#### Bash does not have a native ternary operator. Instead, the same functionality can be achieved using:
color="blue"
[[ "$color" == "blue" ]] && echo "🟦" || echo "🟩"
# Output: 🟦
### More information here, https://how.wtf/ternary-operator-in-bash.html#ternary-operation