Skip to content

Instantly share code, notes, and snippets.

View donaldsteele's full-sized avatar

Don Steele donaldsteele

  • GTR Event Technology
  • Charlotte , NC
View GitHub Profile
@donaldsteele
donaldsteele / bootstrap.sh
Created January 18, 2018 18:48
Install magneticod go-rewrite on a brand new scaleway ubuntu 16.04 instance
####
# Install magneticod go-rewrite on a brand new scaleway ubuntu 16.04 instance
####
apt-get update && apt-get -y upgrade
apt-get install -y software-properties-common python-software-properties git trickle
add-apt-repository ppa:gophers/archive
apt update
apt-get -y install golang-1.9-go
mkdir -p $HOME/go/src
cd $HOME/go/src
@donaldsteele
donaldsteele / list_installed.sh
Created January 21, 2018 02:35
find Installed Software Linux
(zcat $(ls -tr /var/log/apt/history.log*.gz); cat /var/log/apt/history.log) 2>/dev/null |
egrep '^(Start-Date:|Commandline:)' |
grep -v aptdaemon |
egrep '^Commandline:'
@donaldsteele
donaldsteele / install_elasticsearch.sh
Last active February 3, 2018 23:35
ubuntu install Elasticsearch
apt-get update
apt-get -y upgrade
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list
add-apt-repository ppa:webupd8team/java
apt-get install -y elasticsearch oracle-java9-installer
apt-get install -y oracle-java9-set-default
systemctl daemon-reload
systemctl enable elasticsearch.service
@donaldsteele
donaldsteele / goinstall.sh
Last active June 30, 2018 17:16
install golang on ubuntu server base install
#!/bin/bash
set -e
GVERSION="1.10.3"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
TMPDIR=/tmp
@donaldsteele
donaldsteele / install_vbox_guest_additions.sh
Last active July 22, 2018 03:33
install latest virtualbox guest additions on a virtual ubuntu /debian guest
apt-get update
apt-get -y upgrade
apt install -y linux-headers-$(uname -r) build-essential dkms curl
tmpmount=/tmp/iso
vboxversion=$(curl -s -L https://download.virtualbox.org/virtualbox/LATEST-STABLE.TXT)
echo fetching $vboxversion
mkdir -p ${tmpmount}
vboxisourl="https://download.virtualbox.org/virtualbox/${vboxversion}/VBoxGuestAdditions_${vboxversion}.iso"
isoname="/tmp/VBoxGuestAdditions_${vboxversion}.iso"
@donaldsteele
donaldsteele / vbox-backup.sh
Created October 8, 2018 12:09 — forked from dv336699/vbox-backup.sh
Backup Running VirtualBox VMs
#!/bin/sh
BASEFOLDER=/home/vbox/backups
for VMNAME in $(VBoxManage list runningvms | cut -d ' ' -f1 | sed 's/"//g;')
do
echo ""
VBoxManage controlvm "$VMNAME" acpipowerbutton
echo "Waiting for VM "$VMNAME" to poweroff..."
until $(VBoxManage showvminfo --machinereadable "$VMNAME" | grep -q ^VMState=.poweroff.)
@donaldsteele
donaldsteele / convert_svg_to_ico.sh
Last active November 12, 2018 17:15
Convert folder of svg files to standard windows icon sized .ico files using imagemagik
#!/bin/bash
#requires imagemagik, inkscape and pngquant
#sizes you wish to create
size=(16 32 24 48 72 96 144 152 192 196 256)
for file in *.svg; do
base=${file%.*}
for i in ${size[@]}; do
inkscape $file --export-png="${base}_${i}.png" -w$i -h$i --without-gui
@donaldsteele
donaldsteele / encode.php
Last active December 17, 2019 20:25
can a directory and encode the media using scene 2016 standards
<?php
/**
* Created by PhpStorm.
* User: don
* Date: 2/22/2019
* Time: 10:11 AM
* Scan a directory and encode the media using scene 2016 standards
* this will ouput a bash script (could be modified at line 27 to exec instead of echo to execute
*
* Usage::
@donaldsteele
donaldsteele / glass.css
Last active August 10, 2019 20:56 — forked from gjhilton/glass.css
Glass CSS
.glass{
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0)));
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
border: 2px solid #DDDBD7;
-webkit-box-shadow: 3px 3px 10px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255, 0.8);
-moz-box-shadow: 3px 3px 10px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255, 0.8);