Remote the prefix 'unwanted' from the beginning of each filename with .jpg suffix.
rename 's/^unwanted//' *.jpg
- Source(s)
- @climagic
#Raspberry Pi Fan Control Script | |
import RPi.GPIO as IO | |
from gpiozero import CPUTemperature | |
import time | |
minspin = 10 | |
IO.setwarnings(False) |
$ cat Makefile | |
.PHONY: all | |
.DEFAULT_GOAL := help | |
.ONE_SHELL: | |
SHELL = /bin/bash | |
FOLDER = $(shell basename "$$(pwd)" | cut -d'-' -f3) | |
help: ## Show the available CLI arguments | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
@echo "[+] Example:" |
Remote the prefix 'unwanted' from the beginning of each filename with .jpg suffix.
rename 's/^unwanted//' *.jpg
version: '3.1' | |
services: | |
unifi: | |
container_name: unifi | |
restart: unless-stopped | |
image: linuxserver/unifi | |
volumes: | |
- /srv/docker/unifi:/config | |
environment: | |
- PGID=0 |
#Reference: https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker | |
#Requirement: Set environmental variables: ${$USERDIR}, ${PUID}, ${PGID}, ${TZ}, ${DOMAINNAME}, ${CLOUDFLARE_EMAIL}, ${CLOUDFLARE_API_KEY}, ${HTTP_USERNAME}, ${HTTP_PASSWORD}, etc. as explained in the reference. | |
version: "3.6" | |
services: | |
######### FRONTENDS ########## | |
# Traefik Reverse Proxy | |
traefik: |
#!/usr/bin/env python3.6 | |
''' | |
Pihole is great, but the admin interface only displays device details | |
by IP address which can be confusing. This script changes the display | |
from IP address to a more recognizable hostname. And as a bonus, attaches | |
the profile (from fingerbank.org) of the device to the hostname as well - | |
so instead of something like 192.168.1.101, you see galaxys6-samsung. | |
Shweet. | |
Usage notes |
function extractPacktpubUrl() { | |
try { | |
var ss = SpreadsheetApp.getActiveSheet(); | |
var label = GmailApp.getUserLabelByName("packt_free_ebook"); | |
var threads = label.getThreads(); | |
if (threads[0] == undefined || threads[0].getMessages()[0] == undefined) { | |
Logger.log('No valid message found'); |
traefik: | |
container_name: traefik | |
domainname: homedomain.lan | |
image: traefik | |
restart: unless-stopped | |
# Note I opt to whitelist certain apps for exposure to traefik instead of auto discovery | |
# use `--docker.exposedbydefault=true` if you don't want to have to do this | |
command: "--web --docker --docker.domain=homedomain.lan --docker.exposedbydefault=false --logLevel=DEBUG" | |
ports: | |
- "80:80" |
# Cleanup commands | |
# To stop compose.yml | |
# docker-compose -f ~/docker/docker-compose.yml down | |
# docker system prune && docker image prune && docker volume prune | |
#Run after adding each container | |
# docker-compose -f ~/docker/docker-compose.yml up -d | |
version: "3.6" | |
services: |
# Redirect all http traffic to https | |
server { | |
listen 80; | |
return 301 https://$host$request_uri; | |
} | |
# Portainer Upstream | |
upstream portainer { | |
server YOUR.PI.IP.ADDRESS:9000; | |
keepalive 32; |