Skip to content

Instantly share code, notes, and snippets.

View anthonygreen's full-sized avatar

Anthony Green anthonygreen

View GitHub Profile
+ cosmos-build --os=centos7
.___, [mock]
___(*v*)___ [spec]
`"-\._./-"' [7] []
^ ^ [/home/jenkins/workspace/media-availability-tool/]
(*v*) Running: /usr/bin/mock -r bbc-rhel-7-x86_64 --uniqueext=19505 --init
INFO: mock.py version 1.3.5 starting (python version = 2.6.6)...
@anthonygreen
anthonygreen / deleteJenkinsJobs.groovy
Created September 15, 2020 09:13 — forked from nextrevision/deleteJenkinsJobs.groovy
Groovy script to delete all jenkins jobs that match a regex pattern
import jenkins.model.*
def matchedJobs = Jenkins.instance.items.findAll { job ->
job.name =~ /my_regex_here/
}
matchedJobs.each { job ->
println job.name
//job.delete()
}
Microsoft Office Business Pro for Mac
https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_Office_16.31.19111002_BusinessPro_Installer.pkg
Microsoft Office for Mac
https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_Office_16.16.19111100_Installer.pkg
@anthonygreen
anthonygreen / jenkins_script_console.md
Created September 14, 2020 13:20 — forked from initcron/jenkins_script_console.md
Jenkins Script Tutorial

Jenkins Script Console Tutorial

Jenkins script console allows one to run groovy scripts/code to automate jenkins setup e.g installing plugins, setting configuration parameters. These groovy scripts can be run either through the web ui, or event loaded as scripts using curl from command line. With these groovy scripts, jenkins configurations can be completely automated.

Lets explore this script console and learn how to write/load simple scripts.

Exploring script console

From the jenkins UI, choose Jenkins => Manage Jenkins => Script Console . You should see script console installed, in which run the following,

@anthonygreen
anthonygreen / ansible-macos-homebrew-packages.yml
Created September 14, 2020 13:18 — forked from mrlesmithjr/ansible-macos-homebrew-packages.yml
Install MacOS Homebrew Packages With Ansible
---
- name: Install MacOS Packages
hosts: localhost
become: false
vars:
brew_cask_packages:
- atom
- docker
- dropbox
- firefox
### Keybase proof
I hereby claim:
* I am anthonygreen on github.
* I am anthonygreen (https://keybase.io/anthonygreen) on keybase.
* I have a public key whose fingerprint is 4152 86EE 2B4B 007E 9BCB 61C1 BB1F 2A3B C89D 86FD
To claim this, I am signing this object:
function DDBtoJSON(ddbData) {
var convertors = {
"BOOL": function(data) { return Boolean(data); },
"S": function(data) {
if (!data) { return ''; }
return String(data);
},
"NULL": function(data) { return null },
}
import jenkins.model.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import org.jenkinsci.plugins.plaincredentials.*
import org.jenkinsci.plugins.plaincredentials.impl.*
import hudson.util.Secret
import hudson.plugins.sshslaves.*
#!/bin/bash
# This snippet should hypothetically allow a totally unattended
# installation of Apple's XCode. After prompting for credentials,
# the script simulates a login, begins a download and subsequently
# mounts the disk image and installs XCode to the default location.
echo -n "ADC login: "
read login
echo -n "ADC password: "
@anthonygreen
anthonygreen / gist:1554f57e349f0b4df225
Created December 3, 2014 11:54
Connect Homebrew Formula
require 'formula'
class Connect < Formula
homepage 'https://github.com/anthonygreen/connect.c'
url 'https://raw.githubusercontent.com/anthonygreen/connect.c/master/connect.c'
version '1.100'
sha1 '39614dfa842514f46bdb6ff66a10d2f5b084234f'
def install
system ENV.cc, "connect.c", "-o", "connect", "-lresolv"