Skip to content

Instantly share code, notes, and snippets.

View solocommand's full-sized avatar

Josh Worden solocommand

  • Parameter1
  • Madison, WI
  • 10:02 (UTC -05:00)
View GitHub Profile
@solocommand
solocommand / auth.sh
Created December 18, 2018 14:51
Amazon STS MFA Authentication
#!/bin/bash
MFA_SERIAL=arn:aws:iam::TRUNCATED:mfa/TRUNCATED
read -p "MFA Code: " MFA_CODE
aws sts get-session-token --serial-number $MFA_SERIAL --token-code $MFA_CODE > ~/.aws/l0creds
SECRET_ACCESS_KEY=$(jq -r '.Credentials.SecretAccessKey' ~/.aws/l0creds)
SESSION_TOKEN=$(jq -r '.Credentials.SessionToken' ~/.aws/l0creds)
ACCESS_KEY_ID=$(jq -r '.Credentials.AccessKeyId' ~/.aws/l0creds)
@solocommand
solocommand / script.groovy
Last active July 29, 2019 15:25
Dump Jenkins credentials
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.impl.*
domain = Domain.global()
store = SystemCredentialsProvider.getInstance().getStore()
@solocommand
solocommand / app.js
Last active January 10, 2019 21:29
AdButler
(function () {
if ( typeof window.CustomEvent === "function" ) return false;
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
@solocommand
solocommand / duosecurity.repo
Created February 6, 2018 20:58
duosecurity.repo
[duosecurity]
name=Duo Security Repository
baseurl=http://pkg.duosecurity.com/CentOS/$releasever/$basearch
enabled=1
gpgcheck=1
@solocommand
solocommand / mongodb-org-3.4.repo
Created February 6, 2018 20:56
mongodb-org-3.4.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
@solocommand
solocommand / csv.js
Created April 6, 2017 13:55
MongoDB Server-side CSV formatting
db.system.js.save({
_id: "csv",
value: function(doc, fields) {
var getValue = function(doc, field) {
var tree = field.split('.');
var value = doc;
tree.forEach(function(key) {
value = value[key];
})
return value;
import Ember from 'ember';
const { Component } = Ember;
export default Component.extend({
value : null,
label : null,
title : null,
linkTo : null,
icon : Ember.computed('value', function() {
@solocommand
solocommand / mongoupdate.sh
Created January 30, 2017 16:50
Continually execute mongo JS
#!/bin/bash
function error {
echo -e "\033[91mAn error was encountered! $1\033[0m"
exit 1
}
if [ "$#" -ne 2 ]; then
error "Usage: mongoupdate DATABASE SCRIPT"
fi

Keybase proof

I hereby claim:

  • I am solocommand on github.
  • I am solocommand (https://keybase.io/solocommand) on keybase.
  • I have a public key whose fingerprint is 3FE9 68B5 22DB B3DD 851E FDA7 EA1F CD62 9994 2524

To claim this, I am signing this object:

Date: 2016-09-07 21:52:36
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\TitanReputation\TitanReputation.lua line 822:
attempt to concatenate local 'name' (a nil value)
Debug:
[C]: ?
TitanReputation\TitanReputation.lua:822: method()
TitanReputation\TitanReputation.lua:1172: TitanPanelReputation_GatherFactions()