This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! / 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://api.github.com/users/<USERNAME>/repos\?per_page\=200 | grep ssh_url | cut -d \" -f 4 | xargs -n 1 git clone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# [ -z "$1" ] || ACCESS_TOKEN="$1" | |
[ -z "$1" ] || ACCESS_AUTH="$1" | |
[ -z "$2" ] || REPO_NAME="$2" | |
# [ -z "$ACCESS_TOKEN" ] && { echo "Token not set" ; exit 1; } | |
[ -z "$ACCESS_AUTH" ] && { echo "Username[:Password] not set" ; exit 1; } | |
[ -z "$REPO_NAME" ] && { echo "Repo not set" ; exit 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"tterp"} # the GitHub organization whose repos will be backed up | |
GHBU_UNAME=${GHBU_UNAME-"dskarataev"} # the username of a GitHub account (to use with the GitHub API) | |
GHBU_PASSWD=${GHBU_PASSWD-"xc4cv0q0"} # the password for that account | |
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments) | |
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted | |
GHBU_PRUNE_AFTER_N_DAYS=${GHBU_PRUNE_AFTER_N_DAYS-3} # the min age (in days) of backup files to delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username=$1 | |
repos=$(curl -s https://api.github.com/users/$username/repos?per_page=1000 | jq -r '.[] | .name + "|" + .clone_url') | |
for repo in $(echo $repos | tr " " "\n") | |
do | |
name=$(echo $repo | cut -d"|" -f1) | |
clone_url=$(echo $repo | cut -d"|" -f2) | |
git clone --mirror $clone_url ./$username/$name.git && tar -czvf ./$username/$name.tgz -C ./$username/$name.git . | |
rm -rf ./$username/$name.git |