This file contains 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/sh | |
# counter file path | |
COUNTER_FILE="/tmp/raid_check_counter.txt" | |
CHECK_RET=0 | |
# telegram bot settings | |
BOT_TOKEN="bot:token" | |
CHAT_ID1="!!!first bot chat id" | |
CHAT_ID2="!!!second bot chat id" |
This file contains 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
'********************** | |
'Copyright(C) 2020 Xarial Pty Limited | |
'Reference: https://www.codestack.net/solidworks-api/document/sheet-metal/export-all-flat-patterns/ | |
'License: https://www.codestack.net/license/ | |
'********************** | |
'+Modify by r3l0c: add thickness+material subfolders' | |
Enum SheetMetalOptions_e | |
ExportFlatPatternGeometry = 1 |
This file contains 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 | |
FILETYPES=("*.jpg" "*.css" "*.js" "*.xml" "*.png" "*.ico" "*.svg" "*.woff2" "*.woff" "*.eot" "*.ttf") | |
DIRECTORIES=("/var/www/clients/client1/web1/web/js" | |
"/var/www/clients/client1/web1/web/css" | |
"/var/www/clients/client1/web1/web/fonts" | |
"/var/www/clients/client1/web1/web/images" | |
"/var/www/clients/client1/web1/web/assets" | |
) | |
MIN_SIZE=1 |
This file contains 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
require 'lfs' | |
local effil = require('effil') | |
print('MAX THREADS: ' .. effil.hardware_threads()) | |
os.execute('rm -rf /mnt/ramdisk/*') | |
os.execute('mkdir -p /mnt/ramdisk/encoded/') | |
local function trim1(s) | |
return (s:gsub('^%s*(.-)%s*$', '%1')) | |
end | |
local function SplitFilename(strFilename) |
This file contains 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
mkdir -p /mnt/ramdisk/encoded/ | |
if [ -z ${1+x} ]; then | |
find /mnt/recordings/ -name "*.mkv" -type f -exec bash -c '/home/user/encode.sh $0' {} \; | |
else | |
codec=$(/home/$USER/bin/ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 $1) | |
if [ "$codec" == "av1" ]; then | |
echo "Already encoded: $1 ..." | |
else | |
file=$1 | |
fname="$(basename -- $file)" |
This file contains 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
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer | |
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D | |
sudo -s | |
apt-get -y install mdadm | |
apt-get -y install grub-efi-amd64 | |
sgdisk -z /dev/sda | |
sgdisk -z /dev/sdb | |
sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda | |
sgdisk -n 2:0:+8G -t 2:fd00 -c 2:"Linux RAID" /dev/sda |