Skip to content

Instantly share code, notes, and snippets.

View mattr-'s full-sized avatar

Matt Rogers mattr-

View GitHub Profile
@mattr-
mattr- / boxstarter.ps1
Last active July 20, 2020 01:25 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Modified by: Matt Rogers <mattr-@github.com>
# Last Updated: 2020-07-19
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#

This is pretty simple snippet to get API Token of a user , lets say "MYUser" in jenkins.
its pretty useful when you are working with 'jenkins-job-builder' to update jobs in jenkins, and you need to get the api token which JJB needs inorder to update jobs to ..
run this code in either jenkins script console , or as i prefer, in form of init.groovy.
so when jenkins master starts, i create a user for JJb.
after that i get the token right away and pass it to my JJB jobs folder to file 'jenkins_jobs.ini' :)_ .

import jenkins.security.*       
User u = User.get("Myuser") 
@mattr-
mattr- / osx-10.11-setup.md
Last active February 20, 2020 21:03 — forked from kevinelliott/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@mattr-
mattr- / .rspec
Last active August 29, 2015 14:10 — forked from coreyhaines/.rspec
--colour
-I app
I also got the same problem, especially when use with AMD RequireJS, and optimised by r.js\r\n\r\n```\r\n$ r.js -o build.js \r\n\r\nTracing dependencies for: main\r\n\r\n/Project/www/scripts/main-built.js\r\n----------------\r\n/Project/www/scripts/less.js\r\n/Project/www/scripts/sockjs-0.3.4.min.js\r\n/Project/www/scripts/jquery-1.8.2.min.js\r\n/Project/www/scripts/jquery.ba-hashchange-1.3.js\r\n/Project/www/scripts/vertxbus.js\r\n/Project/www/scripts/can/util/can.js\r\n/Project/www/scripts/can/util/array/each.js\r\n/Project/www/scripts/can/util/jquery.js\r\n/Project/www/scripts/can/util/library.js\r\n/Project/www/scripts/can/view.js\r\n/Project/www/scripts/can/util/string.js\r\n/Project/www/scripts/can/util/bind.js\r\n/Project/www/scripts/can/observe/compute.js <<< Note here, No can/observe was included\r\n/Project/www/scripts/can/view/elements.js\r\n/Project/www/scripts/can/view/scanner.js\r\n/Project/www/scripts/can/view/node_lists.js\r\n/Project/www/scripts/can/view/live.js\r\n/Project/www/scripts/can/vi