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
echo "Usb power status:" | |
echo "" | |
sudo cat /sys/bus/usb/devices/*/power/level | |
echo "" | |
echo "" | |
while true; do | |
read -p "Do you wish to change usb power status? " yn | |
case $yn in | |
[Yy]* ) make install; break;; |
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
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install core dependencies | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
bash \ | |
grep \ |
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
# do sha256asum for each file | |
# find . -type f ! -name "*.sha256sum" -exec bash -c 'for f; do echo "Processing: $f"; (cd "$(dirname "$f")" && sha256sum "$(basename "$f")" > "$(basename "$f").sha256sum"); done' _ {} + | |
# find . -type f ! -name "*.sha256sum" -exec sh -c 'for f; do echo "Processing: $f"; (cd "$(dirname "$f")" && sha256sum "$(basename "$f")" > "$(basename "$f").sha256sum"); done' _ {} + | |
# if you want to skip existing | |
#find . -type f ! -name "*.sha256sum" -exec sh -c 'for f; do if [ -f "$f.sha256sum" ]; then echo "Skipping (already exists): $f.sha256sum"; else echo "Processing: $f"; (cd "$(dirname "$f")" && sha256sum "$(basename "$f")" > "$(basename "$f").sha256sum"); fi; done' _ {} + | |
# check each file sha256sum is match | |
# find . -type f -name "*.sha256sum" -exec sh -c 'cd "$(dirname "{}")" && sha256sum -c "$(basename "{}")"' \; |
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
@echo off | |
cls | |
echo ======================================== | |
echo DNS Flush Utility - Windows | |
echo ======================================== | |
echo. | |
set /p userinput=Do you want to flush the DNS cache now? (y/n): | |
if /i "%userinput%"=="y" ( | |
echo. |
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 | |
LABEL="OVERLAY_ROOT" | |
FSTYPE="ext4" | |
# Find all devices with the label | |
DEVICES=($(blkid | grep "LABEL=\"$LABEL\"" | cut -d: -f1)) | |
COUNT=${#DEVICES[@]} |
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
function Find-Exact-FileWithProgress { | |
param ( | |
[string] $BasePath, | |
[string] $FileName | |
) | |
$files = Get-ChildItem -Path $BasePath -Recurse -File -ErrorAction SilentlyContinue | |
$total = $files.Count | |
$counter = 0 |
OlderNewer