http://stackoverflow.com/q/43344791/1108919
I want to rewrite filter_script.sh
to accepts globbing patter only instead of regexp (current working)
echo -e 'apple tree\nbanana tree\norange tree' | ./filter_script.sh '*ban' '*ge*'
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
set -e | |
BASEDIR="$(mktemp -d '/tmp/ffmpeg_XXXXXX')" | |
echo "### TEMP DIR: ${BASEDIR} ###" |
http://stackoverflow.com/q/43344791/1108919
I want to rewrite filter_script.sh
to accepts globbing patter only instead of regexp (current working)
echo -e 'apple tree\nbanana tree\norange tree' | ./filter_script.sh '*ban' '*ge*'
#!/bin/bash | |
set -eufo pipefail | |
shopt -s extglob | |
patterns='' | |
for pattern in "$@"; do | |
patterns+="${pattern}|" | |
done | |
while read -r i; do |
#!/usr/bin/zsh | |
set -e | |
# TAB indented file! | |
### PREPARATION ### | |
# mkdir test | |
# cd test | |
# wget -q https://gist.github.com/andras-tim/f8aebf9243cecf3719d27d020a718ef8/raw/fun.zsh -O - | zsh | |
This is a mass device rename utility for Phoscon. You can set unique names for all sensors and lights not only per devices.
python3 rename_sensors.py 'http://phoston_app_url:2080' 'API_KEY'
devices.json
devices.json
w/ your favorite editor#!/bin/bash | |
set -eufo pipefail | |
SHELL_PREFERENCE=( | |
'bash' | |
'zsh' | |
'sh' | |
) | |
{ | |
"title": "JSON Schema for autoinstall config", | |
"$schema": "https://ubuntu.com/server/docs/install/autoinstall-schema", | |
"type": "object", | |
"properties": { | |
"autoinstall": { | |
"type": "object", | |
"properties": { | |
"version": { | |
"type": "integer", |
#cloud-config | |
# based on | |
# * https://ubuntu.com/server/docs/install/autoinstall-quickstart | |
# * https://curtin.readthedocs.io/en/latest/topics/storage.html | |
# * https://gist.github.com/wpbrown/b688a934339cb4228c3faf5b527fbe5b | |
autoinstall: | |
version: 1 |
*.deb |