Skip to content

Instantly share code, notes, and snippets.

View ViktorNova's full-sized avatar

Viktor Nova ViktorNova

View GitHub Profile
@ViktorNova
ViktorNova / list-all-domains.sh
Last active February 23, 2022 10:06
List all domains in an Apache server
#!/usr/bin/env bash
apachectl -S |grep 'namevhost\|alias' |sed 's/^.*namevhost //'|sed 's/^.*alias //'|cut -f1 -d"("|sort -u
@ViktorNova
ViktorNova / taiga-centos8.sh
Last active October 13, 2020 13:02 — forked from abradshaw/Taiga for EL8
Install Taiga on CentOS 8 / RHEL 8
#!/bin/bash
# Stop on error
set -e
# Stop on unitialized variables
set -u
# Stop on failed pipes
set -o pipefail
# IP_ADDR can be the IP address of your server OR FQDN that points to your server
@ViktorNova
ViktorNova / setup-taiga-el7-scl.sh
Created March 20, 2020 15:56 — forked from abradshaw/setup-taiga-el7-scl.sh
This script sets up Taiga, on a Centos7 server, using software collections.
#!/bin/bash
IP_ADDR="10.10.10.120"
#take care of selinx and the firewall
setsebool -P httpd_read_user_content 1
yum install -y policycoreutils-python
semanage port -m -t http_port_t -p tcp 8000
@ViktorNova
ViktorNova / ffmpeg_stuff.sh
Created September 28, 2017 06:01
FFMPEG Stuff
# Boost volume of all videos in directory
# This ONLY works in BASH. (maybe others, but it does NOT work in Fish shell)
# This is meant to be done by first moving all the videos into a subdirectory
# Then the output files with boosted volume are dumped one directory up
for i in *.avi; do ffmpeg -i $i -vcodec copy -af "volume=10dB" ../$i; done
# ____________________________________________________________________________________
# Combine video from first video with audio from anthe second video.
@ViktorNova
ViktorNova / boost-volume-batch.sh
Last active June 28, 2017 07:18
Boost volume on a folder full of videos
# This ONLY works in BASH. (maybe others, but it does NOT work in Fish shell)
# This is meant to be done by first moving all the videos into a subdirectory
# Then the output files with boosted volume are dumped one directory up
for i in *.avi; do ffmpeg -i $i -vcodec copy -af "volume=10dB" ../$i; done
@ViktorNova
ViktorNova / gist:e6a5e86a8f122264054473a6b128bd5f
Last active July 15, 2017 04:28
Making StagecraftOS 16.04 (from netinstall).sh
## Basic audio and system packages
apt install jackd2 jackd2-firewire jack-tools jack-midi-clock alsa-base alsa-utils alsa-firmware-loaders libasound2 libasound2-data linux-firmware aj-snapshot python3-liblo liblash-compat-1debian0 libarchive13 aj-snapshot software-properties-common unrar-free unzip zip
## Graphical environment and system packages
apt install nodm xinit xserver-xorg-input-all compton pcmanfm-qt lxqt-config lxqt-config-randr lxqt-session lxqt-runner lxqt-admin lxqt-globalkeys lxqt-power lxqt-panel lxqt-powermanagement lxqt-notificationd lxqt-openssh-askpass compton-conf
# For some reason this installed a TON of KDE/plasma dependencies!!! No good. Purge em:
apt purge plasma-framework plasma-workspace sddm sddm-theme-breeze
@ViktorNova
ViktorNova / rotate-video.sh
Created August 8, 2016 21:33
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
@ViktorNova
ViktorNova / clean-csv.sh
Created April 21, 2016 23:54
This cleans up CSVs by removing duplicates based on a column, removes all double-quoted commas, and all doublequotes
#!/bin/bash
# This cleans up CSVs
echo "Removing all commas between quotes" #Quick and dirty
echo "Then removing quotes"
echo "Lastly, we remove duplicates based on Column 7 - Phone number"
cat $1 | sed ':a;s/^\(\([^"]*,\?\|"[^",]*",\?\)*"[^",]*\),/\1 /;ta' | \
sed 's/\"//g' | \
sort -t ',' -k 7,7 -u > $1-OUTPUT.csv
@ViktorNova
ViktorNova / gist:9202e97b76013e159343
Created March 8, 2016 19:51
qt5_visual_theme.sh
# This will set all QT5 apps to use whatever theme is set up from qt5ct.
# This file needs to be put into /etc/profile.d/
# It actually works! (I have been fighting with this for over a year and finally figured it out)
export QT_QPA_PLATFORMTHEME="qt5ct"
@ViktorNova
ViktorNova / Making Stagecraft Buildbox - 16.04 Xenial.sh
Last active January 20, 2016 23:52
Making Stagecraft Buildbox - 16.04 Xenial
libqt5x11extras5-dev libqt5xmlpatterns5-dev cmake-extras extra-cmake-modules libasound2-dev libjack-jackd2-dev libqt5xdg-dev