Skip to content

Instantly share code, notes, and snippets.

Avatar

Josh Worden solocommand

  • Parameter1
  • Madison, WI
View GitHub Profile
@solocommand
solocommand / auth.sh
Created Dec 18, 2018
Amazon STS MFA Authentication
View auth.sh
#!/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 Jul 29, 2019
Dump Jenkins credentials
View script.groovy
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()
View app.js
(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;
View duosecurity.repo
[duosecurity]
name=Duo Security Repository
baseurl=http://pkg.duosecurity.com/CentOS/$releasever/$basearch
enabled=1
gpgcheck=1
View 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 Apr 6, 2017
MongoDB Server-side CSV formatting
View csv.js
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;
View components--browse-filter-checkbox.js
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 Jan 30, 2017
Continually execute mongo JS
View mongoupdate.sh
#!/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
View keybase.md

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:

View gist:ad44ace1fb062fccdd9a3c66c6c32c30
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()
You can’t perform that action at this time.