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 / FirstKarelProgram.w
Created July 18, 2011 04:55
CS106A World for First Karel Program
Dimension: (5, 3)
Wall: (4, 1) west
Wall: (4, 2) south
Wall: (5, 2) south
Beeper: (2, 1) 1
Karel: (1, 1) east
BeeperBag: INFINITE
Speed: 0.75
@lantrix
lantrix / pptxml2hrm.rb
Created October 18, 2011 11:04 — forked from mgratzer/pptxml2hrm.rb
Simple script to convert HRM data from XML documents exported via http://www.personaltrainer.com (e.g. for use with RunKeeper)
#!/usr/bin/env ruby
require 'rexml/document'
def file_name(file)
if file.end_with?(".xml") then
file = file.gsub(".xml", ".hrm")
else
file = "#{file}.hrm"
end
return file
git svn clone --prefix=svn/ --stdlayout \
--authors-file=authors.txt \
--no-minimize-url http://plugins.svn.wordpress.org/tweet/
diff --git a/build/ConfigureBizTalkServer2013EnvHostAndHostInstances.ps1 b/build/ConfigureBizTalkServer2013EnvHostAndHostInstances.ps1
index a596645..cbb6068 100755
--- a/build/ConfigureBizTalkServer2013EnvHostAndHostInstances.ps1
+++ b/build/ConfigureBizTalkServer2013EnvHostAndHostInstances.ps1
@@ -297,10 +297,14 @@ function ConfiguringBizTalkServerHostAndHostInstances
CreateBizTalkAdapterHandler 'FILE' 'Receive' $receiveHostName $defaultHostName $false $removeOriginalAdapterHandler
CreateBizTalkAdapterHandler 'MQSeries' 'Receive' $receiveHostName $defaultHostName $false $removeOriginalAdapterHandler
CreateBizTalkAdapterHandler 'MSMQ' 'Receive' $receiveHostName $defaultHostName $false $removeOriginalAdapterHandler
+ CreateBizTalkAdapterHandler 'SB-Messaging' 'Receive' $receiveHostName $defaultHostName $false $removeOriginalAdapterHandler
+ CreateBizTalkAdapterHandler 'SFTP' 'Receive' $receiveHostName $defaultHostName $false $removeOriginalAdapterHandler
# WordPress SEO - XML Sitemap Rewrite Fix
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
# END WordPress SEO - XML Sitemap Rewrite Fix

Keybase proof

I hereby claim:

  • I am lantrix on github.
  • I am lantrix (https://keybase.io/lantrix) on keybase.
  • I have a public key whose fingerprint is E564 BCC1 F601 5D1F 01CD AC10 C37D D2B0 2B27 2DFD

To claim this, I am signing this object:

@lantrix
lantrix / dumpIamPolicies.ps1
Last active December 5, 2016 02:10
A quick way to dump out all your AWS IAM Group Policies to the local file system
#!/usr/bin/env powershell
#requires -Modules AWSPowerShell
#requires -Version 2.0
<#
.SYNOPSIS
Script to output all the AWS IAM polcies
#>
@lantrix
lantrix / powershell_robocopy.ps1
Last active August 29, 2015 14:06
robocopy in powershell
#Path of git:master repo synced onto web console
$sqlSourcePath = "C:\Source Folder" #with trailing backslash
$sqlDestinationDrive = "C" #raw drive letter only
$sqlDestinationPath = "SQL_commands" # without trailing backslash or drive e.g.: path\to\copy\folder
$RobocopySyntax = ' /COPY:DAT /R:0 /W:0 /MIR'
$a = [char]34
$Source = $sqlSourcePath
$Destination = '\\' + $destinationIP + '\' + $sqlDestinationDrive + '$' + '\' + $sqlDestinationPath + '\'
$Robocopy = 'robocopy ' + $a + $Source + $a + ' ' + $a + $Destination + $a + $RobocopySyntax
@lantrix
lantrix / powershell_credentials.ps1
Created September 15, 2014 05:33
Powershell Credentials and some uses in remote file manipulation over SMB
$User = 'machine\administrator'
$Password = 'abcd1234!'
$host = 10.0.0.10
$securedPassword = ConvertTo-SecureString $Password -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ($User, $securedPassword)
#establish session
$session = New-PSSession -ComputerName $host -Credential $Credential -ErrorAction SilentlyContinue
@lantrix
lantrix / volumes.ps1
Created September 16, 2014 01:49
Find and attach volumes in AWS
$filter = New-Object Amazon.EC2.Model.Filter
$filter.Name = "tag:Version"
$filter.Value = "31"
$volumes = Get-EC2Volume -Filters $filter
$volumes | % {$_.VolumeId + " " + $_.State}
Add-EC2Volume -VolumeId vol-ec9398e8 -InstanceId i-5256f66e -Device 'xvdg'