Skip to content

Instantly share code, notes, and snippets.

Sean Duffy Shogan

Block or report user

Report or block Shogan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am shogan on github.
  • I am shongololo ( on keybase.
  • I have a public key ASC__OwOlbi7tNQGZyWVkXDzfeQlJgMjKxLwYydvVwz7jAo

To claim this, I am signing this object:

Shogan / aws-vault-terraform-reference.ps1
Last active Nov 8, 2018
aws-vault + terraform useful references
View aws-vault-terraform-reference.ps1
# Using aws-vault with Terraform (to generate secure temporary session credentials in AWS for Terraform to use) can be tricky if you use a persistent session with aws-vault.
# These are the basic terraform workflow commands that work with aws-vault.
# The trick to using aws-vault and avoid session credential issues is to simply instruct aws-vault to not use a session with the --no-session flag.
# List / change TF workspace
aws-vault exec your_profile_name --no-session -- terraform workspace list
aws-vault exec your_profile_name --no-session -- terraform workspace select workspacenamehere
# Plan a change
aws-vault exec your_profile_name --no-session -- terraform plan -out="yourplan.tfplan"
Shogan / ps-oneliners.ps1
Created Nov 8, 2018
Powershell useful one-liners
View ps-oneliners.ps1
# Search command history for specific terms
Get-Content (Get-PSReadlineOption).HistorySavePath | Where { $_ -match "SEARCH TERM HERE" }
Shogan / docker-powershell-one-liners.ps1
Last active Nov 7, 2018
Powershell Docker commands and useful one-liners
View docker-powershell-one-liners.ps1
# Get list of all untagged images with no repository set
docker images --format "{{.ID}}--{{.Repository}}--{{.Tag}}" | Where { $_ -match "<none>--<none>" } | % { $_.Split("--")[0] }
# Remove all untagged / no repository docker images
docker images --format "{{.ID}}--{{.Repository}}--{{.Tag}}" | Where { $_ -match "<none>--<none>" } | % { $_.Split("--")[0] } | % { docker rmi $_ }
# Remove all stopped containers
docker ps -a -q | % { docker rm $_ }
View RandomShrub for Pixel Sprite Generator Unity
using UnityEngine;
using System.Collections;
using PixelSpriteGenerator;
public class RandomShrub : MonoBehaviour {
private PsgMask mask;
private PsgSprite sprite;
private SpriteRenderer sr;
Shogan / .gitignore
Created Aug 30, 2015
Unity3D .gitignore for team collaboration
View .gitignore
# Unity generated and a few customs #
# ================================= #
# ===================================== #
Shogan / ExampleLaserHit.cs
Created Aug 18, 2015
An example method that gets subscribed to the OnLaserHitTriggered event. This is attached to an entity, and when the laser raycast hits the entity, damage is dealt to it.
View ExampleLaserHit.cs
private void OnLaserHitTriggered(RaycastHit2D hitInfo)
if (hitInfo.collider.gameObject == gameObject)
if (bloodParticleSystem != null)
HealthPoints --;
Shogan / ExampleLaserStuff.cs
Created Aug 18, 2015
Example of laser damage event with interval
View ExampleLaserStuff.cs
public delegate void LaserHitTriggerHandler(RaycastHit2D hitInfo);
/// <summary>
/// Event that fires whenever the laser collides with an object (requires ignoreCollisions to be false). Subscribe to this event to be notified when the laser is hitting an object. The RaycastHit2D info will be sent through the event.
/// </summary>
public event LaserHitTriggerHandler OnLaserHitTriggered;
/// <summary>
/// Fires the OnLaserHitTriggered event every triggerInterval seconds.
/// </summary>
Shogan / gist:6587adafbaa3bac05be9
Created May 25, 2015
View gist:6587adafbaa3bac05be9
// Setup our credentials which will use our Cognito identity pool to hand us short-term session credentials,
// giving us access to what we have provided access to with our IAM role policies, in this case, access to our
// DynamoDB table.
credentials = new CognitoAWSCredentials(cognitoIdentityPoolString, RegionEndpoint.USEast1);
credentials.GetIdentityIdAsync(delegate(AmazonCognitoIdentityResult<string> result)
if (result.Exception != null)
Debug.LogError("exception hit: " + result.Exception.Message);
View gist:7bb02ff347cdc94ea069
private void CreateCharacterInTable()
var newCharacter = new CharacterEntity
CharacterID = Guid.NewGuid().ToString(),
BodySpriteName = selectedBody,
FaceSpriteName = selectedFace,
ShirtSpriteName = selectedShirt,
HairSpriteName = selectedHair,
PantsSpriteName = selectedPants,
You can’t perform that action at this time.