Skip to content

Instantly share code, notes, and snippets.

@bjtitus
bjtitus / backup-github.sh
Last active May 18, 2022 09:14 — forked from rodw/backup-github.sh
A shell script to backup your Github organization's repos.
#!/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_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments)
# I recommend using an API token so it is easily trackable and removable.
# Note that you MUST have SSH keys for a user with the access to all repos set up
@bjtitus
bjtitus / UIColor+ContrastAdditions.h
Created October 26, 2012 16:13
UIColor contrast additions
//
// UIColor+ContrastAdditions
//
// Created by Brandon Titus (bjtitus.net) on 10/26/12.
//
//
#import <UIKit/UIKit.h>
#import "UIColor-Expanded.h"
@bjtitus
bjtitus / Perl SafeConnect Bypass
Created January 25, 2011 16:46
SafeConnect Bypass
#!/usr/bin/perl
use Net::Ping;
$host = "www.google.com";
while (1) {
$p = Net::Ping->new('icmp');
if ($p->ping($host)) {
print "$host is alive.\n";
@bjtitus
bjtitus / gist:205540
Created October 8, 2009 23:47
Some code to play around with Python
import sys
import getopt
def main():
""" print ind(40, [ 55, 77, 42, 12, 42, 100 ])
print ind(42, range(0,100))
print ind('hi', [ 'hello', 42, True ])
print ind('hi', [ 'well', 'hi', 'there' ])
print ind('i', 'team')
print ind(' ', 'outer exploration')
print "Hello, World!"
value = raw_input("Input your name: ")
print "Hello, " + value + "!"