Skip to content

Instantly share code, notes, and snippets.

View Brantone's full-sized avatar

Brantone Brantone

  • Canada
View GitHub Profile
#!/usr/bin/env bash
source tc-props.bash
echo "Running on $agent_name"
echo "Deploying $org_app_version to $org_deploy_server..."
# ...
@Brantone
Brantone / kcpasswordEncode.sh
Created May 24, 2022 19:46 — forked from brunerd/kcpasswordEncode.sh
Encode a string for use in macOS /etc/kcpassword using shell, printf, sed, awk and xxd
#!/bin/bash
#kcpasswordEncode (20210911) Copyright (c) 2021 Joel Bruner (https://github.com/brunerd)
#Licensed under the MIT License
#given a string creates data for /etc/kcpassword
function kcpasswordEncode {
#ascii string
local thisString="${1}"
local i
@Brantone
Brantone / upload.sh
Created December 11, 2020 09:19 — forked from ouchadam/upload.sh
Upload APK to appcenter app=my-cool-app owner=owner-in-appcenter file=path/to/file token=1234-api-token destination_name=group-to-apply
#!/bin/bash
set -e
CONFIG=$@
for line in $CONFIG; do
eval "$line"
done
AUTH="X-API-Token: $token"
CONTENT_TYPE=application/vnd.android.package-archive
@Brantone
Brantone / git.migrate
Created May 21, 2019 17:42 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@Brantone
Brantone / gist:cc357a36d6199112a3fa9d80f8588802
Created June 28, 2018 08:20 — forked from evilchili/gist:1848087
invoke a downstream jenkins job with the current job parameters + additions
import hudson.model.*
// extract the version tag from the console log
def version_pattern = ".*\\[\\s*INFO\\s*\\]\\s+VERSION=(.*)\\s*\$"
def matcher = manager.getLogMatcher( version_pattern )
if ( matcher?.matches() ) {
// add the version string to the job summary
def ver = matcher.group(1)
manager.addInfoBadge( "Version: $ver" )
@Brantone
Brantone / Gemfile
Created May 16, 2018 21:49 — forked from jdennes/Gemfile
Export a list of members from a GitHub organisation
source "https://rubygems.org"
gem "octokit"
@Brantone
Brantone / pass.sh
Created February 9, 2017 00:30 — forked from deanet/pass.sh
Bash Password Manager with OpenSSL
#!/bin/bash
trap ctrl_c INT
function ctrl_c() {
echo "** WARNING HIT CTRL^C MAKE LOSS YOUR pass.enc File **"
}
file="pass.txt"
@Brantone
Brantone / mac.sh
Created February 1, 2017 08:50
Disable bunch of #$!@ in Sierra
#!/bin/bash
# This is a draft but it works
# FIRST (I don't even know if it works but we'll assume yes)
# sudo launchctl list
# sudo launchctl disable system/netbiosd
# sudo launchctl disable system/parsecd
# sudo launchctl disable system/parentalcontrols.check
# sudo launchctl disable system/airportd