Skip to content

Instantly share code, notes, and snippets.

View bonelifer's full-sized avatar

William Jacoby bonelifer

View GitHub Profile
@bonelifer
bonelifer / install-hassio
Created May 3, 2020 20:01 — forked from davidvidmar/install-hassio
Install HASS.IO on Ubuntu Server 18.04
# source: https://www.juanmtech.com/set-up-hassio-in-docker-and-in-an-ubuntu-server/
# last update: 26 Oct 2019, DaVidmar
#
# update system and packages
#
apt-get update
apt-get upgrade
# INSTALL DOCKER
@bonelifer
bonelifer / backup
Created July 22, 2020 01:43 — forked from munyari/backup
#!/usr/bin/env bash
set -o errexit # Exit on most errors
set -o nounset # Dissallow expansion of unset variables
DISK=/media/backup
export BORG_PASSPHRASE="$(pass borg)"
BORG_REPOSITORY="$DISK/borg"
# DESC: notify the user that backups are done
@bonelifer
bonelifer / backup.sh
Created July 22, 2020 01:45 — forked from da-n/backup.sh
Backup script with Pushover notifications. Pushover is optional, you can edit it out if not required. To get this script running check all the parameters at the top.
#!/bin/bash
DATE=`date +%Y%m%d-%H%M%S`
PROGNAME=$(basename $0)
APPEND=-$DATE.tar.gz
# Set the local backup directory, ensure that this directory exists
LOCALDIR=$HOME/backups/
# Set the remote directory to backup
@bonelifer
bonelifer / pushover.sh
Created July 22, 2020 01:48 — forked from henri/pushover.sh
PushOver
#! /bin/bash
#
# RELEASED UNDER MIT LICENCE : https://mit-license.org
# Copyright Allrights Reserved 2020, Henri Shustak
# This Script Works With the PushOver <http://pushover.net> service and is capable of sending notifcations to your phone.
#
# Usage: ./pushover.bash message title url url_title priority device'
#
# Example: ./pushover.sh "this is a test" "test title" "http://mylink.com" "my url title" 0 "iPhone"'
# Note: All parameters except message are optional'
@bonelifer
bonelifer / create-unattended-iso.sh
Created August 20, 2020 22:15 — forked from mkjaer/create-unattended-iso.sh
Create unattended Ubuntu ISO
#!/bin/bash
cd $(dirname "${0}")
UBUNTU_VERSION=${UBUNTU_VERSION:=16.04.3}
INSTALL_HOSTNAME=${INSTALL_HOSTNAME:=ubuntu}
USERNAME=${USERNAME:=username}
PASSWORD=${PASSWORD:=password}
SEED_FILE=${SEED_FILE:=lvm.seed}
TIMEZONE=${TIMEZONE:=$(cat /etc/timezone)}
@bonelifer
bonelifer / maintenance.sh
Created September 3, 2020 18:52
Script that update, upgrade and clean ubuntu packages in one linux cmd.
#! / bin / sh
# @link https://gist.github.com/Junscuzzy/e7cd13973bd06b0927b959fe77283c10
# To make the script executable: chmod + x [filename]
# Then for the run: sh [filename]
echo "1. Make updates"
sudo apt-fast update # Get updates
@bonelifer
bonelifer / repo-labels.sh
Created September 3, 2020 19:11 — forked from camilleriluke/repo-labels.sh
Github repository labels standard
#!/usr/bin/env bash
# You can craete a token from https://github.com/settings/tokens and give the
# "repo" persmission to the token
AUTH_TOKEN=$1
OWNERREPO=$2
if [[ "$#" -ne 2 ]]; then
echo "Usage: $0 AUTH_TOKEN OWNER/REPO\n"
exit 1
@bonelifer
bonelifer / github_sync.sh
Created September 3, 2020 19:35 — forked from Zolmeister/github_sync.sh
Clone all github repos
curl -s https://api.github.com/users/<USERNAME>/repos\?per_page\=200 | grep ssh_url | cut -d \" -f 4 | xargs -n 1 git clone
@bonelifer
bonelifer / github-backup.sh
Created September 3, 2020 19:42 — forked from toddlucas/github-backup.sh
Back up GitHub repos
#!/bin/bash
USERNAME='xyz'
# https://news.ycombinator.com/item?id=22210681
for i in `seq 1 20`;
do
curl --fail -s https://api.github.com/users/$USERNAME/repos?page=$i | jq '.[] | .clone_url' | xargs -t -n1 git clone
sleep 1
done
@bonelifer
bonelifer / createRepo.sh
Created September 3, 2020 19:45 — forked from Krishna829/createRepo.sh
create github repo
#!/bin/sh
reponame="$1"
if [ "$reponame" = "" ]; then
read -p "Enter Github Repository Name: " reponame
fi
mkdir ./$reponame
cd $reponame
curl -u USERNAME https://api.github.com/user/repos -d "{\"name\":\"$reponame\"}"
git init
echo "ADD README CONTENT" > README.md