Skip to content

Instantly share code, notes, and snippets.

View jgaydos's full-sized avatar
Status Error (4): Please try again in 5 minutes.

Jon Gaydos jgaydos

Status Error (4): Please try again in 5 minutes.
  • Earth?
View GitHub Profile
@jgaydos
jgaydos / ffmpeg_loop.sh
Created February 14, 2019 01:10
FFmpeg: Convert files matchting pattern
#!/bin/bash
for i in *.mkv; do ffmpeg -i "$i" "${i%.*}.mp4"; done
@jgaydos
jgaydos / ffmpeg_streams.sh
Created February 14, 2019 01:12
FFmpeg: List file streams
#!/bin/bash
ffmpeg -i in.mkv 2>&1 | grep "Stream #"
@jgaydos
jgaydos / ffmpeg_remove_streams.sh
Created February 14, 2019 01:13
FFmpeg: Remove unwanted streams (audio/sub)
#!/bin/bash
ffmpeg -i in.mkv -map 0:0 -map 0:1 -acodec copy -vcodec copy out.mkv
@jgaydos
jgaydos / ffmpeg_convert_streams.sh
Created February 14, 2019 01:15
FFmpeg: Convert and
#!/bin/bash
ffmpeg -i in.mkv -map 0:0 -map 0:3 out.mp4
@jgaydos
jgaydos / ubuntu18.04_php7.2_sqlsrv.sh
Created February 14, 2019 01:22
Ubuntu 18.04 + PHP7.2 + SQLSRV
#!/bin/bash
#ubuntu 18.04
#php7.2
#install php w/o apache
apt -y install php7.2-cli php7.2-mbstring php-pear php7.2-dev
#install sqlcmd
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
@jgaydos
jgaydos / ubuntu16.04_php7.2_sqlsrv.sh
Created February 14, 2019 01:24
Ubuntu 16.04 + PHP7.2 + SQLSRV
#!/bin/bash
#ubuntu 16.04
#php7.2
# install php ppa
add-apt-repository ppa:ondrej/php
apt update -y
# install php w/o apache
@jgaydos
jgaydos / ubuntu18.04_php7.3_sqlsrv.sh
Last active November 21, 2022 21:02
Ubuntu 18.04 + PHP7.3 + SQLSRV
#!/bin/bash
#ubuntu 18.04
#php7.3
# install php ppa
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php -y
apt update
@jgaydos
jgaydos / ubuntu18.04_php7.3_oci8.sh
Created February 14, 2019 01:30
Ubuntu 18.04 + PHP7.3 + OCI8 (must provide your own oracle rpms)
#!/bin/bash
#install
apt -y install alien build-essential php7.3-dev libaio1
alien oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
alien oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
alien oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
dpkg -i oracle-instantclient12.2-basic_12.2.0.1.0-2_amd64.deb
@jgaydos
jgaydos / add_variable.sh
Created February 14, 2019 01:33
Setting system variables when they wont stick
#!/bin/bash
# This is useful for setting variables when they will not stick
echo "Enter variable name: "
read variable_name
echo "Enter variable value: "
read variable_value
echo "adding " $variable_name " to einvironment variables: " $variable_value
@jgaydos
jgaydos / current_gpu.sh
Created February 14, 2019 01:45
Current GPU
#!/bin/bash
sudo prime-select query