Skip to content

Instantly share code, notes, and snippets.

View ajyounguk's full-sized avatar

Andrew Young ajyounguk

  • Shropshire, UK
View GitHub Profile
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<Locations>
<Location elevation="50.0" id="14" latitude="54.9375" longitude="-2.8092" name="Carlisle Airport" region="nw" unitaryAuthArea="Cumbria"></Location>
<Location elevation="22.0" id="26" latitude="53.3336" longitude="-2.85" name="Liverpool John Lennon Airport" region="nw" unitaryAuthArea="Merseyside"></Location>
<Location elevation="25.0" id="33" latitude="60.4322" longitude="-1.2992" name="Scatsta" region="os" unitaryAuthArea="Shetland Islands"></Location>
<Location elevation="7.0" id="3066" latitude="57.6494" longitude="-3.5606" name="Kinloss" region="gr" unitaryAuthArea="Moray"></Location>
<Location elevation="6.0" id="3068" latitude="57.712" longitude="-3.322" obsSource="LNDSYN" name="Lossiemouth" region="gr" unitaryAuthArea="Moray"></Location>
<Location elevation="36.0" id="3075" latitude="58.454" longitude="-3.089" obsSource="LNDSYN" name="Wick John O Groats Airport" region="he" unitaryAuthArea="Highland"></Location>
<Location el
@ajyounguk
ajyounguk / check-aws-ec2.sh
Created June 11, 2019 14:48
aws script for listing all ac2 instances across all regions, requires aws cli installed and permissions configured
for region in `aws ec2 describe-regions --output text | cut -f3`
do
echo -e "\nListing Instances in region:'$region'..."
aws ec2 describe-instances --region $region
done
@ajyounguk
ajyounguk / gist:3e49c848ec381e4e07d2b5129b56dd67
Last active February 13, 2019 14:37
object and array splicing / object spread operator (...)
messages = {
1: {
id: '1',
text: 'This is a message',
userId: '1',
},
2: {
id: '2',
text: 'This is a message too',
userId: '2',
@ajyounguk
ajyounguk / gist:fe8532727a72c575dfb8e5e0eed2ab9f
Last active February 11, 2019 14:38
node js function notation and syntactic sugar
// from https://medium.com/@chineketobenna/lambda-expressions-vs-anonymous-functions-in-javascript-3aa760c958ae
function traverseArray(arr, func) {
let result = '';
for (const value of arr) {
result += func(value) + ' ';
}
console.log(result);
}