Instructions on how to setup a secured Jenkins CI on a Mac.
All of these operations are done with your admin user.
Install the command line developer tools.
#!/usr/bin/env bash | |
# pip install youtube-dl | |
# This will only download the videos you have not already downloaded so you can run it nightly. | |
# Add "-x --audio-format mp3" to produce MP3s - but it will run the conversion every time you run the script. | |
youtube-dl \ | |
-icw \ | |
--write-description \ |
-- https://dba.stackexchange.com/a/18952 | |
SELECT DBName,CONCAT(LPAD(FORMAT(SDSize/POWER(1024,pw),3),17,' '),' ', | |
SUBSTR(' KMGTP',pw+1,1),'B') "DataSize", | |
CONCAT(LPAD(FORMAT(SXSize/POWER(1024,pw),3),17,' '),' ', | |
SUBSTR(' KMGTP',pw+1,1),'B') "IndexSize", | |
CONCAT(LPAD(FORMAT(STSize/POWER(1024,pw),3),17,' '),' ', | |
SUBSTR(' KMGTP',pw+1,1),'B') "Total Size" | |
FROM (SELECT IFNULL(DB,'All Databases') DBName,SUM(DSize) SDSize, | |
SUM(XSize) SXSize,SUM(TSize) STSize | |
FROM (SELECT table_schema DB,data_length DSize,index_length XSize, |
#!/usr/bin/env bash | |
# Credits to https://stackoverflow.com/a/246128 | |
# Just added here for reference. | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
#!/usr/bin/env | |
set -e | |
set -x | |
sudo apt-get update | |
sudo apt install -y \ | |
git \ | |
pkg-config \ | |
gcc make \ | |
autoconf \ | |
bison \ |
#/usr/bin/env python | |
from bs4 import BeautifulSoup | |
import sys | |
input_file = sys.argv[1] | |
output_file = sys.argv[2] | |
ifile = open(input_file, "r") | |
html = ifile.read() | |
ifile.close() |
# change the file name and --audio-format mp3 for mp3. | |
radiohead: | |
test -d venv || virtualenv venv | |
venv/bin/pip install youtube-dl | |
mkdir -p music | |
venv/bin/youtube-dl --output music/exit_music_for_a_film.ogg \ | |
--extract-audio --audio-format vorbis \ | |
https://youtu.be/8051Hipbmmw |
#!/bin/bash | |
# Creates venv if it dosen't exist and installs requirements.txt. | |
# Saves a checksum of requirements.txt, checks against that. | |
# Reruns pip install if checksum changes on subsequent runs. | |
# TODO: | |
# - Make python/ folder prefix customizable. | |
# - Use git version instead of crc32. | |
# Aaron Saderholm 7/16/17 | |
set -e |
#!/usr/bin/env bash | |
# Install i3-gaps on Ubuntu 16 | |
set -e | |
set -x | |
sudo apt-get update && sudo apt-get -y upgrade | |
sudo apt-get install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-shape0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev dh-autoreconf | |
mkdir -p $HOME/repos | |
cd $HOME/repos |
#!/bin/bash | |
DATE_STR=$(date +%s) | |
cd /usr/share/pve-manager/js/ | |
cp pvemanagerlib.{js,js.bak_$DATE_STR} | |
sed -i "s#data.status !== 'Active'#false#g" pvemanagerlib.js | |
apt update | |
apt upgrade |