Skip to content

Instantly share code, notes, and snippets.

View dbrownidau's full-sized avatar

Damion dbrownidau

View GitHub Profile
@dbrownidau
dbrownidau / stream.sh
Last active February 9, 2016 12:54
Linux stream to youtube via libav. (for distributions utilizing Aptitude)
#! /bin/bash
INRES="1366x768"
OUTRES="1366x768"
VBR="1800k"
FPS="30" # fps
QUAL="slow"
STREAM_KEY=$(cat ~/bin/youtube_key)
if [ $(dpkg-query -W -f='${Status}' libav-tools 2>/dev/null | grep -c "ok installed") -eq 0 ];

Keybase proof

I hereby claim:

  • I am dbrownidau on github.
  • I am dbrown (https://keybase.io/dbrown) on keybase.
  • I have a public key whose fingerprint is F66B D46F 33C2 B160 25E4 0D52 7F1F 27C3 C19D 9B74

To claim this, I am signing this object:

@dbrownidau
dbrownidau / .bashrc
Created July 23, 2018 01:01
Windows Subsystem for Linux ssh-agent bootstrap
##- WSL ssh-agent boostrap
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
eval $(ssh-agent -s) > /dev/null
else
@dbrownidau
dbrownidau / esxi.hackion.com
Created August 28, 2018 04:10
Nginx HTTPS with Basic Auth reverse proxy for VMware ESXi 6.5 fixed VMRC /screen
server {
listen 80;
server_name esxi.hackion.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name esxi.hackion.com;
@dbrownidau
dbrownidau / run.sh
Last active September 5, 2018 12:00
Run chrome on a VFB with VNC from headless chrome casting
Xvfb -screen 0 1920x1080x24 &
x11vnc -forever -display :0 &
export DISPLAY=:0
chromium &
#loopback audio for uh... purposes
modprobe snd-aloop
usermod -a G audio <user>
aplay -L #find the audio device
#set your application to list on X loopback device
@dbrownidau
dbrownidau / jira
Last active April 30, 2019 01:51
Jira logrotate config (/etc/logrotate.d/jira)
/var/atlassian/application-data/jira/log/*.log
/var/atlassian/application-data/jira/log/automation-jira-performance.csv
{
su jira jira
copytruncate
daily
rotate 30
compress
delaycompress
missingok
@dbrownidau
dbrownidau / 50unattended-upgrades
Last active May 7, 2019 06:38
Lazy unattended upgrades what could go wrong
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
Unattended-Upgrade::Mail "**EMAIL HERE**";
// Automatically upgrade packages from these
Unattended-Upgrade::Origins-Pattern {
"o=Debian,a=stable";
"o=Debian,a=stable-updates";
@dbrownidau
dbrownidau / run.sql
Last active May 6, 2019 02:23
Jira database encoding & collation setup (Postgrsql)
# As of Jira 8.1
# https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-postgresql-938846851.html
create database jira with owner jira ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;
@dbrownidau
dbrownidau / run.sql
Last active May 6, 2019 02:29
Confluence database encoding & collation setup (Postgresql)
# As of Confluence 6.15 please use char encoding UTF-8
# WARN: Collations, such as "C", are known to cause issues with Confluence.
# https://confluence.atlassian.com/doc/database-setup-for-postgresql-173244522.html
# Ommitting collation settings will cause the system to default to current locale.
# If you force " LC_COLLATE = 'en_US.UTF-8' " and the system local is not en_US, errors will occure.
create database confluence with owner confluence ENCODING 'utf-8';
@dbrownidau
dbrownidau / run.sh
Last active May 10, 2019 01:01
dump yt videos in highest quality
youtube-dl --merge-output-format mp4 $1
# https://github.com/ytdl-org/youtube-dl#format-selection-examples
#
# Since the end of April 2015 and version 2015.04.26, youtube-dl uses -f bestvideo+bestaudio/best as the default format selection (see #5447, #5456).
# If ffmpeg or avconv are installed this results in downloading bestvideo and bestaudio separately and muxing them together into a single file giving the best overall quality available.
# Otherwise it falls back to best and results in downloading the best available quality served as a single file.