Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Will be slower to respond than normal to Open Source projects

Matt Rogers mattr-

💭
Will be slower to respond than normal to Open Source projects
View GitHub Profile
@mattr-
mattr- / macos-10.14-setup.md
Created Feb 24, 2020
macOS 10.14 Catalina Setup
View macos-10.14-setup.md

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 Jul 20, 2020 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# 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
#
View get-api-token-of-user-jenkins-groovy.md

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")  
View generate_nginx_site_config.rb
#!/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 Dec 5, 2016
jekyll powered atom feed
View atom.xml
{% 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 %}
View keybase.md

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 Feb 20, 2020 — forked from kevinelliott/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup
View osx-10.11-setup.md

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.

View arrays.rb
class TransactionHistory
def transactions
adapters = [ChicagoTransactionAdapter, DallasTransactionAdapter]
transactions = []
adapters.each do |adapter|
transactions += adapter.fetch_transactions
end
end
end
@mattr-
mattr- / Gemfile
Created Dec 25, 2014
jglovier.github.io updated Gemfile
View Gemfile
source "https://rubygems.org"
gem 'github-pages', "31"
gem 'jekyll-redirect-from'
gem 'sass'
gem 'jekyll'
View .rspec
--colour
-I app
You can’t perform that action at this time.