Skip to content

Instantly share code, notes, and snippets.


Bob Arezina barezina

  • Brisbane Australia
View GitHub Profile
barezina / remove.php
Last active Jun 30, 2021
Bulk remove collaborator from all repos
View remove.php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
* Remove the specified user from all repositories
* that we are authenticated to see and manage.
barezina /
Last active Mar 8, 2022
Install docker and docker compose, add ubuntu user to docker group.
apt update;
apt install -y ca-certificates curl gnupg lsb-release;
curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg;
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null;
apt update;
apt install -y docker-ce docker-ce-cli;
usermod -aG docker ubuntu;
sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose;
barezina / asciitable.php
Last active Feb 24, 2020
PHP ascii table from 2D array
View asciitable.php
function generateAsciiTable($data)
// Generate row widths
$rowWidths = [];
foreach ($data as $row) {
foreach ($row as $index => $cell) {
if (!isset($rowWidths[$index])) {
$rowWidths[$index] = strlen($cell) + 2;
} else {
barezina /
Last active Mar 13, 2021
ios backup extractor - restores an iTunes backup to it's original files
import sqlite3
import os
import uuid
import shutil
import re
print('ios backup python script for linux (ubuntu)')
# this function helps traverse the returned results from the db
def dict_factory(cursor, row):
barezina / singleton.m
Created Apr 4, 2017
Singleton for making get-post requests (passing in external block, completion handler)
View singleton.m
// singleton.m
#import "singleton.h"
typedef void(^ CompletionBlock)(NSData*, NSURLResponse*, NSError*);
@implementation singleton
@synthesize vData;