Skip to content

Instantly share code, notes, and snippets.

View Brantone's full-sized avatar

Brantone Brantone

  • Canada
View GitHub Profile
@ouchadam
ouchadam / upload.sh
Last active February 20, 2023 15:02
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
@mastef
mastef / gist:9a84666759796ae9df65edde69130465
Last active June 10, 2022 13:03
Extract Pricing template from Google Play Console to .csv format
// Go to "All Applications" / "Settings" / "Pricing templates" and select the template you want to export
javascript: (function(e, s) {
e.src = s;
e.onload = function() {
jQuery.noConflict();
console.log('jQuery injected');
$ = jQuery;
extractData();
};
REST API
### Artifactory ####
deploy artifact using REST
curl -u myUser:myP455w0rd! -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt
query artifacts by Repo and Path
curl -u user:pw -X POST -k http://mrxartifactory:8081/artifactory/api/search/aql -d "items.find({\"type\" : \"file\",\"\$and\":[{\"repo\" : {\"\$match\" : \"myRepo*\"}, \"path\" : {\"\$match\" : \"myPkg*\"} }]}).include(\"name\",\"repo\",\"path\",\"size\")"
@chinshr
chinshr / Jenkinsfile
Last active October 16, 2023 09:25
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
#!/usr/bin/env bash
source tc-props.bash
echo "Running on $agent_name"
echo "Deploying $org_app_version to $org_deploy_server..."
# ...
@aaronjensen
aaronjensen / edit_data_bag.rb
Created November 21, 2012 04:39
Edit encrypted data bags for use with chef-solo and knife-solo
#!/usr/bin/env ruby
Dir.chdir File.join(__FILE__, "../..")
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
exit 1
end
unless ARGV.count == 2
@evilchili
evilchili / gist:1848087
Created February 16, 2012 21:42
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" )