Skip to content

Instantly share code, notes, and snippets.

View mattr-'s full-sized avatar

Matt Rogers mattr-

View GitHub Profile
@mattr-
mattr- / macos-10.14-setup.md
Created February 24, 2020 14:17
macOS 10.14 Catalina Setup

Mac OS X 10.14 Catalina

Custom recipe to get OS X 10.14 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 year or so, 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- / 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") 
#!/usr/bin/env ruby
require 'optparse'
require 'erb'
class GeneratesConfig
attr_accessor :repo_dir, :output_file, :host, :port
def initialize
@host = "localhost"
@mattr-
mattr- / atom.xml
Created December 5, 2016 18:05
jekyll powered atom feed
{% for post in site.posts %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ site.url }}{{ site.baseurl }}{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}

Keybase proof

I hereby claim:

  • I am mattr- on github.
  • I am mattr (https://keybase.io/mattr) on keybase.
  • I have a public key whose fingerprint is 48F5 B4D9 E3B8 BC74 1798 C9FC 03A5 6FE6 B821 BF47

To claim this, I am signing this object:

@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.

class TransactionHistory
def transactions
adapters = [ChicagoTransactionAdapter, DallasTransactionAdapter]
transactions = []
adapters.each do |adapter|
transactions += adapter.fetch_transactions
end
end
end
@mattr-
mattr- / Gemfile
Created December 25, 2014 04:22
jglovier.github.io updated Gemfile
source "https://rubygems.org"
gem 'github-pages', "31"
gem 'jekyll-redirect-from'
gem 'sass'
gem 'jekyll'
@mattr-
mattr- / .rspec
Last active August 29, 2015 14:10 — forked from coreyhaines/.rspec
--colour
-I app