Skip to content

Instantly share code, notes, and snippets.

View aidancasey's full-sized avatar

Aidan Casey aidancasey

View GitHub Profile
@aidancasey
aidancasey / linux-cli-tips.txt
Last active March 9, 2016 15:29
Linux CLI tips and tricks
> pwd
Print working Directory
> env
Print environment variables
> env | less
Pipes environment variables to less text editor (type 'q' to quit)
> echo hello world
@aidancasey
aidancasey / gist:c68d9f8cc4e872e2b954
Created August 26, 2015 02:22
Linux - give particular user write acces to a folder
sudo chown -R vagrant /home/code
@aidancasey
aidancasey / gist:99565dfe79c0e955f904
Last active August 26, 2015 02:22
Linux - to execute a .sh script file from a bash shell
// to change permissions to make this file executable:
// then execute it
chmod +x file.sh
./file.sh
@aidancasey
aidancasey / gist:8eaf77289257299bede5
Created July 17, 2015 07:53
Git command to remove a bunch of deleted files from a repo
git ls-files --deleted | xargs git rm

#Microservices - Size Doesn't Matter!

alt text

I work as part of a team at MYOB that has been building a new platform for accountants for the past year using a microservices architecture. We're now running approximately 20 microservices in production and we've learned a lot about the right size and granularity of microservices during the project.

"Microservice" is a very loaded word, it immediately evokes connotations about the size of what you are building - what is the right size and granularity for a microservice? If I go too large am I doing it all wrong? It's gotta be small because it's a microservice , right?

@aidancasey
aidancasey / JSHint_Windows
Last active August 29, 2015 14:01
Configuring JSHint with Sublime Text 3 on Widows 7
(1)Install jshint node module globally
$npm install jshint -g
(2)In Sublime Text install JSHint Gutter via package manager
https://github.com/victorporof/Sublime-JSHint
(3) You now need to sepcificy the absolute path to node to enable the plugin to shell out to node.js to do the JSHint'ing
take care to use forward slashes and to escape out any spaces yuck, here's the config in all its awesomeness for a 64 bit node install on windows (gulp)

Amazon Web Services Global Infrastructure Graph

Amazon Web Services global infractructure is steadily expanding and now serves thousands of customers in over 190 countries. Certain services are only available in some regions and compute prices vary across the globe. Wouldn’t it be nice if you could slice and dice through the entire AWS domain of services, data centres and prices all in one spot to optimise your AWS bill? , enter the AWS Global Infrastructure Graph!

At the time of writing the AWS global infrastructure graph consists of 5 continents, with 10 regions, and 21 availability zones, offering 32 services. The data shown here is current as of 21 January 2014.

disclaimer AWS consumers beware! The prices and services listed in the graph are correct as of January 21st 2014, please refer to the AWS price calculator for the latest prices and service offering’s per region - http://calculator.s3.amazonaws.com/calc5.html

@aidancasey
aidancasey / gist:7179271
Created October 27, 2013 08:44
Setting Sublime Text 3 as GIT_EDITOR using Git Bash Command Line on Windows.
git config —-global core.editor “‘c:/program files (x86)/sublime text 3/sublime_text.exe’ -w”
@aidancasey
aidancasey / gist:5222756
Last active December 15, 2015 07:19
Securing and authenticating azure service bus relay messages using a shared secret. : http://acaseyblog.wordpress.com/2013/03/22/securing-and-authenticating-azure-service-bus-relay-messages-using-a-shared-secret/
using (var serviceRequest = new WebClient())
{
string token = GetAuthorizationToken("yourservice","owner", "NW1wr7/nlgggTFnB5L7nDBrOLC+o1E1P4ZZqPaP2mY4=");
serviceRequest.Headers["Authorization"] = string.Format("WRAP access_token=\"{0}\"", token);
string response = serviceRequest.DownloadString(new Uri(url));
return response;
}
// connects to ACS and gets WRAP Authorization token