Skip to content
Permalink
Browse files

tweaks

  • Loading branch information...
Tiernan O'Toole
Tiernan O'Toole committed Jul 13, 2018
1 parent 278dd54 commit 41e62ff9093a7ef1014ed157de9d8c2c5d15a99a
@@ -8,7 +8,8 @@ title: My new Git Powered Site
slug: newsite
disqus_url: https://www.tiernanotoole.ie/2012/08/29/NewSite.html
disqus_identifier: https://www.tiernanotoole.ie/2012/08/29/NewSite.html

aliases:
- /2012/08/29/NewSite.html
---
So, this site is brought to you by [GIT][1], [Jekyll][3] and Magic... here is how i did it...

@@ -7,7 +7,8 @@ title: AutoScaling with Amazon
slug: AutoScalling-With-Amazon
disqus_url: https://www.tiernanotoole.ie/2012/08/30/AutoScalling-With-Amazon.html
disqus_identifier: https://www.tiernanotoole.ie/2012/08/30/AutoScalling-With-Amazon.html

aliases:
- /2012/08/30/AutoScalling-With-Amazon.html
---
I have a few [Amazon EC2][1] instances running on a project, and one of these instances was known as the Zombie Instance! Every time i killed it, it came back to life a few min later... I found out that i, at some point, set that instance to be in an [AutoScaling][2] group. Any time the instance died, Amazon would check and restart the instance. So, how did I kill this undead instance? Check out "[Auto Scaling with Amazon EC2 II][3]" on LLOVIZNA's blog. They had the same issue i had (trying to kill the Auto Scaling group gives an error) and figured out how to do it. Handy stuff. Now the instance is dead, and hopefully it wont come back any time soon... Mind you, When AutoScaling works correctly, it can be very cool indeed!

@@ -11,11 +11,11 @@ aliases:
---
My new Favorite cross platform text editor is [Sublime Text 2][1]. It works on Windows, Mac OS and Linux, and i am very happy with it. My only problem is the path to start it is not exactly easy to type... So, with the help of PowerShell, my new favorite command line tool on Windows, i added an alias:

Set-Alias subl 'c:\program files\sublime text 2\sublime_text.exe'
`Set-Alias subl 'c:\program files\sublime text 2\sublime_text.exe'`

I added this to my Microsoft.PowerShell_profile.ps1 file in Documents\WindowsPowerShell folder. If you don't have one of these files, check out this [Computer Performance.Co.UK post on Creating PowerShell profile files][2] and then edit the file and add the line above... Now, I can edit files in PowerShell with Sublime Text 2 by typing:

subl filename
`subl filename`

Happy days!

@@ -10,8 +10,6 @@ disqus_url: https://www.tiernanotoole.ie/2012/08/31/Understanding-Windows8-Stora
disqus_identifier: https://www.tiernanotoole.ie/2012/08/31/Understanding-Windows8-Storage-Spaces.html

---
So, Windows Server 2012 and Windows 8 have both RTMed in the last couple of weeks and will be available to the public in the next month or so (September for Server, October for Client). If you are an MSDN Subscriber, you already have Client, and will (hopefully) get server in the next couple of weeks... Fingers crossed... Anyway, one of the interesting features i am waiting for is [Storage Spaces][2]. Tim Anderson's Gadget Writing blog has some information on [how Storage Spaces works][1]. handy notes on what to do and what not to do.


So, Windows Server 2012 and Windows 8 have both RTMed in the last couple of weeks and will be available to the public in the next month or so (September for Server, October for Client). If you are an MSDN Subscriber, you already have Client, and will (hopefully) get server in the next couple of weeks... Fingers crossed... Anyway, one of the interesting features i am waiting for is [Storage Spaces][2]. Tim Anderson's Gadget Writing blog has some information on [how Storage Spaces works][1]. handy notes on what to do and what not to do.
[1]:http://gadgets.itwriting.com/1462-understanding-windows-8-storage-spaces-confusing-but-powerful.html
[2]:http://blogs.msdn.com/b/b8/archive/2012/01/05/virtualizing-storage-for-scale-resiliency-and-efficiency.aspx
@@ -12,7 +12,7 @@ disqus_identifier: https://www.tiernanotoole.ie/2012/09/17/SSH-Tunneling-Made-Si
---
Something I do on a regular basis is use the internet while "out and about". This could be college, which has a semi open network, or it could be a coffee shop, which also usually has a semi open connection. There is also the possibility of using the a mobile internet connection on my iPhone, which can be slow, but at least its only shared with me... Anyway, over on RevSys.com, there is a post [SSH Tunneling made simple][1] which shows you how to open an SSH tunnel to your machine somewhere else (could be at home, as is my case, or a VPS/Dedicated server somewhere, or even on Amazon...) and use that for different things... In the case he shows, its for SMTP access. For my case, i am forwarding my local port 3128 to my Microsoft TMG 2010 Server in house on port 8080. Then my system proxy on my laptop is set to use localhost:3128 for all web and HTTPS requests. Very handy. One other tip: Using the -C flag, so your command may look like:

ssh yourname@remotemachine -L 3128:remoteMachine:8080 -C
`ssh yourname@remotemachine -L 3128:remoteMachine:8080 -C`

will compress data between you and the SSH server, which for basic web browsing (HTML, CSS, JS) will make things faster, but for stuff like images, etc, may not work so well... Your Mileage may Vary...

@@ -12,18 +12,16 @@ disqus_identifier: https://www.tiernanotoole.ie/2012/09/24/MicroTik-RouterOS-VPN
---
I have been running a [MikroTik RouterBoard][1] in the house for a couple of months now (the [RB750G][2]) and I am very much loving the thing. But one thing you may need to do is setup VPN connections... Here are some tips on how to create a VPN Server and Client on your RouterBoard.

## Client Setup
##Client Setup

to setup a client, you need to do the following:

{{< gist tiernano 8581643 >}}


What does that all do? the first line creates an l2tp-client interface, pointing at "servername" with the username and password set. encryption, etc is enabled... Line 2 then enables the client. Line 3 sets all traffic comming from networkaddress/24 (for example, 192.168.0.1/24) to be sent though the VPN. any traffic going into networkaddress (same example) is not sent though the VPN. Line 4 creates a gateway, for all addresses (0.0.0.0/0) to use the VPN address. finally, NAT Masquerading is enabled on the VPN interface.

there are more advanced things you can set above... some examples I can think of are as follows:


* There should be no good reason to limit the amount of VPN connections you have... in theory, you could have multiple...
* for the mangle rule, set the src-address to a single machine in your network. that way, it gets VPN only connections. Also, you could set the dst-address to a single address or network to send only traffic going to a given server though the VPN... Example would be Netflix US traffic to a US VPN server, BBC iPlayer traffic to a UK VPN, etc.
* the example above uses L2TP, but PPTP, SSTP and OpenVPN are also available.
@@ -9,7 +9,7 @@ disqus_url: https://www.tiernanotoole.ie/2012/09/25/Raspberry-Pi-Cross-Compiling
disqus_identifier: https://www.tiernanotoole.ie/2012/09/25/Raspberry-Pi-Cross-Compiling.html

---
My main machine at home, known as "The GodBox" is a Dual Processor, [Quad Core Xeon 5520][3] with 60Gb RAM, 2 [300Gb 10,000 RPM Western Digital Velociraptor][4] in RAID 0 for boot, 4X1Tb 7200RPM drives for storage, 2 more 300Gb 10,000 RPM drives for "scratch disk" and a couple high(ish) end graphics cards with 3 monitors plugged in... Hence the name, GodBox!
My main machine at home, known as "The GodBox" is a Dual Processor, [Quad Core Xeon 5520][3] with 60Gb RAM, 2 [300Gb 10,000 RPM Western Digital Velociraptor][4] in RAID 0 for boot, 4X1Tb 7200RPM drives for storage, 2 more 300Gb 10,000 RPM drives for "scratch disk" and a couple high(ish) end graphics cards with 3 monitors plugged in... Hence the name, GodBox!

Anyway, The [Raspberry Pi][2], on the other hand, has a 700Mhz processor, 256Mb RAM and not much else... So, if you need to write code for your Pi, and you don't want to wait a long time to compile, check out this tutorial on [how to build a cross compiler for your raspberry pi][1] which will allow you to build your apps on a different machine... I have a college project which the Raspberry Pi will be used for, and i am thinking this will be how i build code.

@@ -8,7 +8,8 @@ title: Hubic and Duplicity
slug: Duplicity_Hubic
disqus_url: https://www.tiernanotoole.ie/2015/04/01/Duplicity_Hubic.html
disqus_identifier: https://www.tiernanotoole.ie/2015/04/01/Duplicity_Hubic.html

aliases:
- /2015/04/01/Duplicity_Hubic.html
---
I mentioned [HubiC][1] in my [last post][3], and in it i said that you could use [Duplicity][4] for backups. Well, this is how you get it to work...

@@ -37,20 +38,22 @@ So, how do we get it working? Well, givin that i am on Ubuntu, these are the ste
* When i ran that, there where a few extra Python packages to be installed, so i was asked did i want to install them... Say, yes.
* Now, to run a backup we run the following command:

<pre>duplicity ~/ cf+hubic://location</pre>
`duplicity ~/ cf+hubic://location`

* cf+hubic is the backend to use, ~/ is the url to backup (my home directory in this case) and location is where on Hubic we want it stored. If this doesent exist, not a problem... it will create it.
* after we run this we... ahhh... i get an error:
<pre>BackendException: This backend requires the pyrax library available from Rackspace.</pre>

`BackendException: This backend requires the pyrax library available from Rackspace.`

* right... [pyrax library][11] is from Rackspace and is available to download though pip...
* I seem to have python and a few other bits installed on this machine, so running 'sudo pip install pyrax' works... Your millage may vary... [eg, this is out of scope for this tutorial! your on your own!]
* Other problem... I got a load of weird and wondering errors like this:

<pre>AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'SplitResult'</pre>
`AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'SplitResult'`

* I fixed these by running:

<pre> sudo pip install furl --upgrade</pre>
`sudo pip install furl --upgrade`

* FINALLY! ITS ALIVE!!! by default, it asks you for a key for the GnuPG encryption... and its all good! the first backup creates the directories, required files, etc. the next time you run the command, it will only upload changes. it will also ask for your GnuPG code you entered, so remember it!

0 comments on commit 41e62ff

Please sign in to comment.
You can’t perform that action at this time.