Skip to content

Instantly share code, notes, and snippets.

View lantrix's full-sized avatar
:octocat:
always coding and merging

Ted B lantrix

:octocat:
always coding and merging
View GitHub Profile
@lantrix
lantrix / 1password_5.0.1.txt
Created October 24, 2014 03:12
Crash Report
Process: 1Password 5 [15513]
Path: /Applications/1Password 5.app/Contents/MacOS/1Password 5
Identifier: com.agilebits.onepassword4
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: 1Password 5 [15513]
User ID: 501
Date/Time: 2014-10-24 14:11:50.300 +1100
@lantrix
lantrix / README.md
Last active August 29, 2015 14:08 — forked from abernier/README.md
'Clone in Mac' button on gists for GitHub

Download the user.js file and then drop it into your chrome://extensions/ tab and enjoy the Clone in Desktop button on your gists!

@lantrix
lantrix / stripe_2_ephemeral.ps1
Last active August 29, 2015 14:08
Stripe AWS Ephemeral Drive where 2 x available
#
# This will take the two non-system disks on an AWS windows server 2012 R2 instance and ERASE THEM; creating a single striped Volume.
# WARNING: Before using this be sure to check that ((Get-Disk) |where issystem -eq $false) are actually the ***DISKS YOU WANT ERASED***
#
#Get ephemeral disk
$ephemeralDisks = (Get-Disk) |where issystem -eq $false
if ($ephemeralDisks.Count -ne 2) {throw "Not correct amount of disks. Expecting 2"}
#Prepare diskpart Script for each disk
@lantrix
lantrix / invoke_remote_PSjobs.ps1
Created October 30, 2014 00:34
Invoke parametised jobs on a Remote Host with Powershell
$remoteCode = {
#Passing in two parameters
param(
[Parameter(Position=0, Mandatory=$true)][ValidateNotNullOrEmpty()][Int]$jobLoop,
[Parameter(Position=1, Mandatory=$true)][ValidateNotNullOrEmpty()][Int]$jobCount
)
$job = {
param(
[Parameter(Position=0, Mandatory=$true)][ValidateNotNullOrEmpty()][String]$jobParam
Write-Host 'throw'
try
{
try
{
throw "exception"
}
catch
{
@lantrix
lantrix / throw_example.ps1
Last active August 29, 2015 14:08
Powershell Throw, Catch, Finally example passing Throw Text
$throwError = ""
try {
throw "exception has occured! Failure text"
} catch {
#Catch throw test
$throwError = $_
} finally {
if ([bool]$throwError) {
Write-Host "$throwError"
} else {
@lantrix
lantrix / new_tag.ps1
Created October 31, 2014 08:11
Add new tags to AWS EC2 instances found by tag filter
#get instances with specific tag
$tagFilter1 = New-Object Amazon.EC2.Model.Filter
$tagFilter1.Name = "tag:Environment Name"
$tagFilter1.Value.Add("MyEnv")
$instances = Get-EC2Instance -Filter @($tagFilter1)
#New or update tag on instances
foreach ($i in $instances.Instances) {
New-EC2Tag -ResourceId $i.InstanceId -Tags @(@{ Key="YourTagName"; Value="YourTagValue" })
}
@lantrix
lantrix / jive_extension_office2013_x64.reg
Created November 20, 2014 09:08
Registry fix to get the Jive extension v30.1.655.15760 working on Office 2013 x64 http://techdebug.com/blog/2014/11/20/jive-for-office-2013-64bit/
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Outlook]
"Bitness"="x64"
@lantrix
lantrix / proxy_aliash.sh
Last active August 9, 2023 09:49
Proxy On/Off Alias for Bash including Curl
#Proxy Alias
alias proxyon="echo -e \"proxy = http://user:password@proxyserver:8080\n\" > ~/.curlrc && export http_proxy='http://user:password@proxyserver:8080';export https_proxy='http://user:password@proxyserver:8080'"
alias proxyoff="export http_proxy='';export https_proxy='' && rm ~/.curlrc"
@lantrix
lantrix / aws_saml_request.xml
Last active May 6, 2017 19:33
SOAP request for a SAML token for Amazon Web Services from an ADFS SOAP endpoint
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://www.w3.org/2005/08/addressing"
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</a:Action>
<a:To s:mustUnderstand="1">https://youradfsserver.com.au/adfs/services/trust/13/usernamemixed</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:UsernameToken u:Id="uuid-6a13a244-dac6-42c1-84c5-cbb345b0c4c4-1">
<o:Username>[email protected]</o:Username>
<o:Password>password</o:Password>