Skip to content

Instantly share code, notes, and snippets.

View darktim's full-sized avatar

Andre Timmermann darktim

  • Baden, Switzerland
View GitHub Profile
#! /bin/bash
# This script takes two arguments:
# * the repository URL for your puppet modules
# * the destination directory to check out all the branches into
#
# It then checks out all possible branches so you can have dynamic environments
#
# It would probably work better if we just checkout master instead of multiple
# cloning operations, but we'll leave that for version 2
@darktim
darktim / backup-github.sh
Last active November 8, 2021 09:14 — forked from rodw/backup-github.sh
If you have more than 30 Repositories, the original script will not download all. The github api limits the entries to 30 per page but you can raise that up to 100. I have added a small loop which sets the limit to 90 and cycles through all pages until the listing on a page is empty...
#!/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-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see notes)
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
@darktim
darktim / 0_reuse_code.js
Created February 27, 2014 07:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@darktim
darktim / spam Besipiel 2
Created March 4, 2016 09:57
Spam Beispiel 2
Delivered-To: [email protected]
Received: by 10.79.114.82 with SMTP id n79csp310900ivc;
Fri, 4 Mar 2016 01:49:54 -0800 (PST)
X-Received: by 10.28.50.133 with SMTP id y127mr3972347wmy.4.1457084994098;
Fri, 04 Mar 2016 01:49:54 -0800 (PST)
Return-Path: <[email protected]>
Received: from mailhost.local.ch (mailhost.local.ch. [194.169.219.199])
by mx.google.com with ESMTPS id w74si3102988wmw.35.2016.03.04.01.49.53
for <[email protected]>