There are a number of ways that i have seen to filter resource tags and i thought i better record them quick..
Here we filter for the tag called Name
You can do it simple, Name=tag:Name
aws ec2 describe-instances --filter Name=tag:Name,Values=WHATEVS --query 'Reservations[*].Instances[*].InstanceId' --output text
You can get the same effect using key and value so...
aws ec2 describe-instances --filter Name=tag-key,Values=name Name=tag-value,Values=WHATEVS --query 'Reservations[*].Instances[*].InstanceId' --output text
also - --filter and --filters both work the same
if you want to call describe tags instead of describe resources..
aws --output=text ec2 describe-tags --filters Name=resource-id,Values=i-1234566 Name=key,Values=Name
escaping back ticks in bash is also bitch for JMESPath query searches
these work..
take note of the use of ' vs " in two querys
' means strictly read the characters, " means operate on characters like $ if you see them.
# killme=`aws --region $AWSREGION ec2 describe-volumes --query 'Volumes[*].VolumeId' --filters "Name=tag:TerminationDate,Values="\`echo $todaysdate\`"" "Name=status,Values=available" --output text`
snaps_to_delete=`$AWS ec2 describe-images --image-ids $ami_ids_to_delete --owners self --query "Images[?contains(Tags[].Value, "'\`'$tag'\`'") == "'\`true\`'"]|[].[BlockDeviceMappings[].Ebs[].SnapshotId]" --filters Name=tag-key,Values="TerminationDate" Name=tag-value,Values=$terminationdate --output text`
Monday, May 9, 2016
Friday, June 5, 2015
How to Boot Windows 7 off a USB drive on a Mac Mini with EFI / UEFI
G'Day,
I have a Apple Mac mini "Core i5" 2.5 (Late 2012) at home and the HDMI output isn't working as expected when plugging it into my Sony DVD sound system. So i want to see how Windows 7 handles it, but i don't want to dual boot as that might break my Mac OS. Bugger that.
So lets boot off a USB hard drive right? When the Mac boots up, just after it makes the chime sound Hold Alt key and it will allow you to boot from external drives.
I tried the approach in this link but it didnt work... said something like "system disk not found press anykey to reboot"
http://bleeptobleep.blogspot.fr/2013/02/mac-install-windows-7-or-8-on-external.html
That guy is using MBR for the boot record, and i read Macs use EFI or some malarkey. So i went looking at stuff. Here is what i dun so far. :..:
To find out which Mac you have you have get the serial number then plug it into here
https://selfsolve.apple.com/agreementWarrantyDynamic.do
Or you can put in your model number here and take a guess. You want to check if you have an Intel processor which i pretty much guarantee you do.
http://www.everymac.com/ultimate-mac-lookup/?search_keywords=A1347
So then if you believe what they say here, Intel-based Macs support starting from an external USB storage device's volume that has been formatted with a GUID partition type
https://support.apple.com/en-us/HT201663
I'm not sure what EFI and UEFI are all about but i saw this App. The screenshots seem to say that this app installs Windows and is expecting a GUID (GPT) EFI boot partition. Groovy. So i decided to go for it see what happens.
http://lifehacker.com/how-to-run-a-portable-version-of-windows-from-a-usb-dri-1565509124
To get my USB ready, I used diskpart from my windows laptop. I wanted it in the same state as the screenshot in the link above, which is a GPT EFI fat32 boot partition and a Primary NTFS partition for windows.
The only tricky part was that one of the first things you do is convert the disk to gpt. Which creates a reserved partition at 1. So I had this
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Reserved 128 MB 17 KB
Partition 2 System 350 MB 129 MB
Partition 3 Primary 114 GB 479 MB
Which didn't match the picture. So i splatted that and started again. To match what they gave ...
diskpart
select disk 1
clean
convert gpt
select partition 1
delete partition override
create partition efi size=250
format fs=fat32 quick
create partition primary
format fs=ntfs quick
exit
Then i ran the app and installed Windows 7 as per the guide. Super sweet. I will test it out tonight - wish me luck.
Next time
Might need to assign drives letters?
Try this way?
http://www.sevenforums.com/tutorials/186875-uefi-unified-extensible-firmware-interface-install-windows-7-a.html
UPDATE:
well... it dint work, not the bloody mac wont boot. the apple log comes up, get half way down the load screen, stops then powers off.
So may as well try it again and see if i can get it going
I have a Apple Mac mini "Core i5" 2.5 (Late 2012) at home and the HDMI output isn't working as expected when plugging it into my Sony DVD sound system. So i want to see how Windows 7 handles it, but i don't want to dual boot as that might break my Mac OS. Bugger that.
So lets boot off a USB hard drive right? When the Mac boots up, just after it makes the chime sound Hold Alt key and it will allow you to boot from external drives.
I tried the approach in this link but it didnt work... said something like "system disk not found press anykey to reboot"
http://bleeptobleep.blogspot.fr/2013/02/mac-install-windows-7-or-8-on-external.html
That guy is using MBR for the boot record, and i read Macs use EFI or some malarkey. So i went looking at stuff. Here is what i dun so far. :..:
To find out which Mac you have you have get the serial number then plug it into here
https://selfsolve.apple.com/agreementWarrantyDynamic.do
Or you can put in your model number here and take a guess. You want to check if you have an Intel processor which i pretty much guarantee you do.
http://www.everymac.com/ultimate-mac-lookup/?search_keywords=A1347
So then if you believe what they say here, Intel-based Macs support starting from an external USB storage device's volume that has been formatted with a GUID partition type
https://support.apple.com/en-us/HT201663
I'm not sure what EFI and UEFI are all about but i saw this App. The screenshots seem to say that this app installs Windows and is expecting a GUID (GPT) EFI boot partition. Groovy. So i decided to go for it see what happens.
http://lifehacker.com/how-to-run-a-portable-version-of-windows-from-a-usb-dri-1565509124
To get my USB ready, I used diskpart from my windows laptop. I wanted it in the same state as the screenshot in the link above, which is a GPT EFI fat32 boot partition and a Primary NTFS partition for windows.
The only tricky part was that one of the first things you do is convert the disk to gpt. Which creates a reserved partition at 1. So I had this
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Reserved 128 MB 17 KB
Partition 2 System 350 MB 129 MB
Partition 3 Primary 114 GB 479 MB
Which didn't match the picture. So i splatted that and started again. To match what they gave ...
diskpart
select disk 1
clean
convert gpt
select partition 1
delete partition override
create partition efi size=250
format fs=fat32 quick
create partition primary
format fs=ntfs quick
exit
Then i ran the app and installed Windows 7 as per the guide. Super sweet. I will test it out tonight - wish me luck.
Next time
Might need to assign drives letters?
Try this way?
http://www.sevenforums.com/tutorials/186875-uefi-unified-extensible-firmware-interface-install-windows-7-a.html
UPDATE:
well... it dint work, not the bloody mac wont boot. the apple log comes up, get half way down the load screen, stops then powers off.
So may as well try it again and see if i can get it going
Monday, November 3, 2014
Julian's Raspberry Pi Front Door / Garage Opener install, headless, with no KB or monitor
I have put my place up for rent for short term stays. The problem is getting the key to the tenant while I am at work etc.
My building has an electronic opening secuirty gate that is hooked upto the intercoms in each apartment. A guest will buzz my number, i pickup the intercom and say hi, then hit the button on my intercom that buzzes them into the building.
So, I plan to make a raspberry pie with a relay attached to the intercom, that will open the front gate in the same way, just over the internet. I will then hook that up to a virtual button and the tenant can let themselves in to the building. When they get to my front door, I have a pin number lock. They enter the pin, they get in, and the spare key is waiting for them. Neat huh?
Step 1 - Buy and Setup the pi for SSH
Buy all the things: raspberry pie, SD card, mini USB cable for power, relay switch, wires etc
Get the debian image from here: http://www.raspberrypi.org/downloads/ (1GB approx)
Get this for windows: http://sourceforge.net/projects/win32diskimager/
Format the whoile SD card for FAT32
Unzip both downloads, then with win32diskimager put the whole image on the SD card.
This boots it with sshd running and DHCP. Plug in a network cable, look at your router for the newest IP, connect to it with an SSH client
ssh pi@yourip
u: pi
p: raspberry
So after you login... you see this
NOTICE: the software on this Raspberry Pi has not been fully configured. Please run 'sudo raspi-config'
switch to root as always...
pi@raspberrypi ~ $ sudo su -
This opened the config menu for for some reason... anywho
I select (1) to extend the root disk to take up the rest of the SD card. Then i rebooted.
When you get logged in again,,,,
Step 2 - Config
apt-get update
apt-get install node
apt-get install npm
npm config set registry http://registry.npmjs.org/
npm install forever -g
wget -O WebIOPi-0.7.0.tar.gz http://sourceforge.net/projects/webiopi/files/WebIOPi-0.7.0.tar.gz/download
tar xvf WebIOPi-0.7.0.tar.gz
cd WebIOPi-0.7.0
./setup.sh
/etc/init.d/webiopi start
http://192.168.1.118:8000/
u:webiopi
p:raspberry
yay! now you can click IN and OUT on left had side to operate gpios
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build
yay! now you can run
gpio mode 7 out
gpio mode 7 in
to turn pin 7 on and off. in means OFF
tadaaa! finished.
mostly
edit /etc/ssh/sshd_config
add Port 8001
port forward 8001
Now change passwords
root@raspberrypi:~# webiopi-passwd
WebIOPi passwd file generator
Enter Login: pi
Enter Password:
Confirm password:
raspi-config (option 2)
NOW WIFI!
this just worked
http://www.howtogeek.com/167425/how-to-setup-wi-fi-on-your-raspberry-pi-via-the-command-line/
NOW WIFI!
this just worked
http://www.howtogeek.com/167425/how-to-setup-wi-fi-on-your-raspberry-pi-via-the-command-line/
Step 3 - Assemble
... to follow!
----
Set Up DNS and hide that port number!
Get a domain
mydomain.com
create an amazon s3 bucket with EXACT same name domain name, and whatever prefix
bucketname = openthegate.mydomain.com
enable Static Website Hosting on the bucket
Redirect all requests to another host name
openthegate.no-ip.biz
goto no-ip.com and create a host with the IP of your router and enable Port 80 Redirect to 8000
openthegate.no-ip.biz 54.x.x.x:8000
check the port is open here
http://www.yougetsignal.com/tools/open-ports/
create an aws route53 record set for mydomain.com
create an alias record to point to your bucket
openthegate.mydomain.com ALIAS s3-website-ap-southeast-2.amazonaws.com
copy the NS name server names
goto registrar and re-point name servers to AWS route53 DNS servers
Now when you hit the domain http://openthegate.mydomain.com
it will look up the domain, look at the zone file and see that the name servers are over at AWS
it will goto AWS, check the NS servers, see the ALIAS and goto the bucket
The bucket re-directs all port 80 requests to your no-ip record
which then points to port 8000 on your local router
Forward the ports on your router 8000 > 8000
Now it all works. HAHAHAHAHAHAHA
Wednesday, September 7, 2011
Time to leap again

I might have to backfill this with the wonderful work i produced last time - but right now im pretty excited with round 2 of making posters for "It's All About the MUSIC". Krista's next party is coming up in October.
Had a great night last night working with Greg on a conceptual prototype. His immediate suggestion was to chopping up of the DJ images and applying filter in Photoshop first them moving them to Illustrator. I was against it as i wanted to spend time getting good at one piece of software at a time - but just for kicks, we applied some images and traced one DJ in photoshop.
Holy crap and OMG. Wish i hadn't have seen the number of filters and crazy shit you can do there. I was shaking my head at the possibilities that i now have to work with. Having more options, more filters is great - but now i have to pick one!
We didn't quite achieve a perfect cut and paste between programs yet though so the prototype above is based on the same method i used last time, with no photoshop. Just wait till i update it...
Thursday, May 12, 2011
Updated Group Poster
I managed to get a picture of Gavin or Torbynik finally and added him to the poster. So they are all there now. I also added the fonts that Greg gave me to my PC (c:\windows\fonts... AlteHaasGroteskBold) and added some names and a footer etc. The concept is ready to show to Krista i think.In addition, with the basic traced characters, i had some help from Dan, she has made me a few backgrounds with a consistent look and feel in much the same style as the banners. Might be time to show these to Krista too.
Still to come, re-doing the characters properly, adding some shooting stars and bass clefs etc.



Sunday, May 8, 2011
Getting Some Live Trace Practice, All the DJs!

I met with my sister the legendary Dan last week to get some help. We worked through the ideas, then got on the tools and had a play. Making something look pretty good with a combo of illustrator and Photoshop didn't look to hard for her being a pro, but she did show me some easy stuff.
Use the Pen tool and draw a swirl, then change the brush type to paint splatter. Make it bright green then fade the opacity, whack it on a layer behind your subject and you have a prett cool effect. Pretty Cool. Now if only i could get ti to do that with some stars.... we'll see.
Besides the fun stuff, we decided was that I do in fact have to go for a vectored approach if I want to blow things up to a large scale. Which i do. A1 maybe? No matter what the combination, each DJ would need to be vector traced. Once tracing those assets was completed, i'd have what i needed to make several designs.
One minor problem was that the trace i had done in Phtoshop of Floody was not an actual vector. It was infact a traced bitmap. Which would remain a bitmap. And, Floody wasn't actually playing.
So, I read through a neat tutorial on Live Trace for illustrator. It was a simple one but wasn't 100% clear at every step though, it said "now you do this..." but i dont know the buttons or where to find ... this. I took what i knew and started carving up what i had. And i did this ....
So step by step, live tracing a photo.
1. place the photo
2. live trace the photo using a preset
3. open a colour palette (not all work, i used earth tones)
4. modify the live trace settings to be colour and use the earthtone palette
5. live paint the trace. if you dont do this, you can't edit the image, scribble on it or erase anything.
6. expand the trace. if you dont do this, you can't select segments and move them around or delete them.
7. use the correct select tool and start deleting bits you dont want. If it deletes abit you DO want, use the eraser to build a white edge between the sections. Then you can delete it easy.
That's about it. I then copied each DJ to a new drawing on their own layer and moved them around. I added a black background and the banner from the flyer we are using. (Cheers Greg!)
Im still missing one DJ but - presto! Concept one on the page and new skills in vectoring coming along nicely.
Tuesday, May 3, 2011
My first Photoshop Vector
Right - i now have Photoshop and Illustrator. Woo!
Using a Tutorial i found here, http://www.vectorportraits.com/tracing-shapes/
and a photo of one of the DJs which you can find here, http://floodydj.podomatic.com/ I have now vectorized a photo in Photoshop by hand. You kind of trace the image. Lots of layers and clicking.
Ta da! First draft of course. And back ground is still a bit map. Happy with it so far though.
DJ Floody
Using a Tutorial i found here, http://www.vectorportraits.com/tracing-shapes/
and a photo of one of the DJs which you can find here, http://floodydj.podomatic.com/ I have now vectorized a photo in Photoshop by hand. You kind of trace the image. Lots of layers and clicking.
Ta da! First draft of course. And back ground is still a bit map. Happy with it so far though.
DJ Floody
Subscribe to:
Posts (Atom)