sudo apt-get update
sudo apt-get upgrade -y
This file contains hidden or 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 | |
# List all non-ephemeral containers used by pods in all namespaces of a k8s cluster | |
kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" | \ | |
tr -s '[[:space:]]' '\n' | \ | |
sort | uniq |
This file contains hidden or 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 | |
# From: https://druid.apache.org/docs/latest/tutorials/tutorial-delete-data.html | |
# We assume here that TLS is enabled for Druid's router. If not, use port `8888` and `http` as protocol | |
DRUID_PORT=9088 | |
DRUID_ROUTER=https://localhost:${DRUID_PORT} | |
NAMESPACE=druid | |
# If the Druid endpoint contains 'localhost', assume a port-forward is needed |
This file contains hidden or 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 | |
mkdir -p $HOME/.kube | |
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
echo "export KUBECONFIG=\$HOME/.kube/config" >> ~/.bashrc | |
export KUBECONFIG=$HOME/.kube/config |
This file contains hidden or 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 | |
# From: https://stackoverflow.com/a/49997119 | |
git submodule update | |
git submodule foreach git checkout master | |
git submodule foreach git pull origin master |
This file contains hidden or 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 | |
cd | |
mkdir satapps | |
cd satapps | |
git init | |
git remote add -f origin https://github.com/luigidifraia/jupyterhub-platform-tutorials.git | |
git config core.sparseCheckout true | |
echo "datacube/examples" >> .git/info/sparse-checkout | |
git pull --depth=1 origin master |
This file contains hidden or 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
/* | |
* Title: I2C <-> USB serial bridge | |
* Board: Arduino Pro-Micro (ATMega32U4) | |
* Author: Luigi Di Fraia | |
* | |
* Note: This example is provided as a guideline only, without any warranty! | |
*/ | |
#include <Wire.h> |
This file contains hidden or 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
#!/usr/bin/env perl | |
use strict; | |
use File::Basename; | |
my $tag_closed = ">"; | |
my $tag_bold = "<b>"; | |
my $tag_bold_closed = "</b>"; | |
my $tag_font = "<font class="; | |
my $tag_font_closed = "</font>"; |
This file contains hidden or 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 | |
# Pre: make sure you have the find-rom-name binary available in your PATH | |
# binaries available @ https://www.luigidifraia.com/software/#Filename_extractors | |
for filename in *.TAP; do | |
echo -n "Parsing $filename: " | |
cbm_name=$(find-rom-name "$filename" | grep "^FOUND:" | awk '{ print $2 }' | sed -e "s/\"//g") | |
if [ ! -z $cbm_name ]; then | |
mv "${filename}" "${filename%.*}_${cbm_name}.${filename##*.}" |