Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Monday, May 01, 2017

[howTo] Improve piaware results

I noticed I've got drastically better results with piaware ( Raspberry Pi + Flight Aware ADS-B ) by enabling SSH, and upgrading the underlying raspbian packages.

Enable ssh on raspbian:

  • Mount the micro-sd on another computer. 
  • Create an empty file called "ssh" 
  • Boot the Pi
  • sudo apt-get update; sudo apt-get upgrade

Alternatively you can go through flightware and issue an "Upgrade all installed Debian Packages" command. 

My results went from: 18k reports to 50k reports (Fri vs Fri comparison). With no change to antenna placement or hardware. 


Dramatic difference. Pretty obvious when the change was made. 


Monday, April 17, 2017

[howTo] Fix DNS on OpenVPN headless install + (Private Internet Access)

Ran into an issue when getting a headless OpenVPN client working with Private Internet Access. After the connection was up, system could not resolve DNS.

Quick and dirty solution is to add a public nameserver to /etc/resolvconf/resolv.conf.d/head

cat /etc/resolvconf/resolv.conf.d/head
nameserver 8.8.8.8

There's probably a better way to have OpenVPN get a DNS from PIA, but I'll have work that out later.
 

Saturday, October 08, 2016

[Kodi] [howto] Enable Chinese Subtitles

Enabling chinese ( or really any non-western character based) subtitles in Kodi should be simple, but requires a few steps that, when not performed perfectly, leads to a frustrating set of garbage characters.


1.) Replace Kodi's default arial.ttf ( or add ) a font that has full unicode support. Most tutorials online use DejaVuSans+DriodSansFallback.ttf. Unfortunately the post I found had a faulty link, but a bit of quick googling showed it was available here:

DejaVu Sans Font Free by DejaVu Fonts | Font Squirrel


2.) Place the .ttf file in Kodi's "Fonts" folder. Depending on your platform this can be in different places. Here are the common ones I've found:

Linux: /usr/share/kodi/media/Fonts/.
OSX: /Users//Library/Application Support/Kodi/kodi/media/Fonts

(For OSX, the Fonts folder wasn't there, so I had to create it).

3.) Choose the font in: Settings>Video>Subtitles>Font for use for Subtitles.

4.) Choose the right character set: Settings>Video>Subtitles>Character Set (for Chinese I used "Chinese Simplified (GBK)". Without this step, you will get garbage output, regardless of the font.

5.) Optional: Add the language you'd like to Download for, if you use the subtitle downloaders, which are quite helpful.

If any options don't appear, make sure you're in the "Expert" mode for the settings.

Troubleshooting:

If you're seeing BOXES for the text, then your font doesn't support the right character set, change your font.

If you're seeing GARBAGE for the test, then you haven't chosen the correct character in the settings. Choose the correct one.

Saturday, June 25, 2016

[howto] [Linux] proxychains + SOCKS5 best practices

Recently was messing around with proxychains in order to allow some commands and programs that don't natively support proxies to be used more securely.

I followed this excellent tutorial:


This worked great, but it requires an SSH tunnel. This is great if you have access to a VPS. But what if you're using some kind of commercial VPN service ( such as PIA ). You need to set up proxychains to use SOCKS5. 

This isn't very difficult. You simply need to add the following line to the [ProxyList] section of your proxychains.conf file:

socks5 IP Port Username Password

I set it up for PIA, so this was my config:

 socks5 109.201.154.239 1080   username ( the one starting with x) password (yes hardcoded, but later on we have a work-around for this glaring security hole).

Unfortunately proxychains seems to not handle DNS names, so I used an IP for PIA's socks proxy ( proxy-nl.privateinternetaccess.com ).

The instructions are available at:

PIA Instructions Page

nslookup proxy-nl.privateinternetaccess.com yielded quite a few IPs:

Name:    proxy-nl.privateinternetaccess.com
Address: 109.201.138.234
Name:    proxy-nl.privateinternetaccess.com
Address: 109.201.154.245
Name:    proxy-nl.privateinternetaccess.com
Address: 109.201.154.165
Name:    proxy-nl.privateinternetaccess.com
Address: 46.166.186.204
Name:    proxy-nl.privateinternetaccess.com
Address: 109.201.138.229

.
.
.
.






You can pick any one to use. Though, I imagine they are used in round-robbin to share the load of the users. So if your proxy stops working all of a sudden, try changing to another IP.

Also the default setting:

# socks4  127.0.0.1 9050

Should be disabled, if you are using strict_chain, since it will error at not being able to contact the DNS through the (non-existant) TOR tunnel.

Test the connection:

proxychains wget www.google.com

Last of all, is the security concern about having to hard-code your password in a .conf file. My workaround has been to use a local, user-only file. Instead of using the above in /etc/proxychains.conf, create the same file in:

~/.proxychains/proxychains.conf

Create the directory if its not already there. Then ensure that only your user may read the file:


chmod go-rwx ~/.proxychains/proxychains.conf

A hash or shadow file would be better, but I haven't quite figured out how to have proxychains use something like that unfortunately.

Hope this is helpful!
 


Sunday, September 11, 2011

HowTo: Repair an Outrigger Canoe Paddle. Part 2 Whole paddle repair

This part will be similar to Part 1, but this time with a more involved repair. This paddle is owned by the club, and was not in great shape. It had the usual scratches and dings like Enzo, but it also had significant water damage on both the handle and the two sides of the face. With the extent of the damage involved, I decided that spot-treatment would be ineffective, and the whole paddle must be redone.
Side View: The edges are scraped up badly.
Wood has started to rot.


As can be seen, there is enough damage to the handle that visible splitting of the wood can be seen. Also, the edges of the face are starting to fray. In some of the problem areas it you can even see some red paint from the canoes. The rest of the gallery can be seen here.

Step 1: Identify Problem Areas

2/3 of each side of the handle are worn. There moderate water damage on each side. Both sides are deep enough to observe wood splitting and a crack running down the paddle. The face has similar damage on each side, with fraying towards the bottom. The face itself is in relatively good condition, but could use a new coat of varnish. The handle has quite a bit of water damage and what I guess to be mold. Must be sanded down. A worrying area is the right side of the face, where a visible crack seems to be running down the side.

Each of those areas will have to be sanded down. Remove as much of the rotting wood as possible. Try to sand down into the cracks/splits to avoid sharp edges. Remove varnish from the entire paddle and revarnish.

Step 2: Sand

I sanded the problem areas first. Again used 220 grit sandpaper. I could have used a courser grit, especially considering how much material I ended up removing anyway, but the 220 ensured that I didn't take off too much material at once. This was done all hand sanding. On the damage to the handle I sanded off all the red paint, as well as evening out the cracks.
Majority of the fraying has been sanded down.
Varnish will give it some strength.
On the face, I sanded the outsides until the I got through the fraying wood. I tried to smooth over the crack as best I could. I got down to the point where the crack was small. I could have gone all the way down, but that might have changed the shape of the face or made it uneven from one side to the other. I also could have Epoxied the crack together, but at this point I wasn't ready to start working with Epoxy yet.

After the problem areas were sufficiently sanded, I went about sanding the rest of the paddle. I decided to just remove as much of the varnish as I could from the whole paddle, and redo it. This would let me experiment with how best to varnish ( more on that later) and give me experience on sanding.

Note: do this in a well ventilated area. I did it in my garage, with the door down and no airflow. Not a smart idea.

Step 3: Varnish

Because I decided to redo the entire paddle, I got the liquid version of the same spar varnish. I initially tried using a normal bristle brush, and a more expensive natural fiber brush. Both worked well... for the first coat. But I was not able to clean them thoroughly well enough, and the next time I tried to use them, they were much too hard. Finally a friend told me to try the opposite, the super cheap foam brushes. Use them for one session, then simply throw them away. This worked much much better.

Also I experimented with different techniques for brushing on the varnish. I've found that super thin coats work the best. It drastically reduces the likely hood of runs and pooling. I would start at the "shoulders" of the paddle ( as it hangs face down from some dental floss). I would "paint" from beyond the shoulder, then brush all the way down past the end of the paddle. Again this is to avoid runs and pooling for when you change direction.

If you decide to do many coats of thin varnish this is even less of a problem, as you simply keep brushing until the coat evens out. Be careful as the foam brush tends to simply suck in the varnish, I found myself almost squeezing the brush along the dry areas of the paddle to create a small pool then spreading it with the brush. Experiment to see how it works best for you.

I did one side completely, then the other. After doing the other side, check the reverse( original) side again for any runs that you may have caused. Usually I'll find a few big ones and brush those away. If you do it quick enough the other side will still be wet enough to allow you to brush. If the varnish has gone tacky, don't brush or you'll only end up leaving brush strokes in the varnish.

Step 4: Scuff/Finish Sand

As before, you have to create and abrasive surface between coats. You can use the same scrubbing pad. But I chose to use the 220-grit for the first few coats. The first few coats had quite a few imperfections and drips, so the extra abrasiveness helped me get rid of them. If all else fails, simply keep sanding until you sand away the imperfection and get back to the bare wood.

I must have added about 10 coats of varnish and sanded away at least half of them.

Step 5: Finish Coat

Keep repeating as in Part 1. A change I did do is that towards the end, I switched from liquid to spray varnish. This ensured that the last few coats would be easier to apply and get perfect. This was especially useful on the face, where imperfections were easy to see.

In hindsight I probably could have kept using the liquid varnish, but my skill was not up to it, and neither was my patience.

The results seem to work out fine. There's a visible difference between the handle and face ( the handle I kept using liquid varnish). I was originally planning on doing a final coat on both parts, but by then the paddle was needed and I figured it was "good enough". When the season ends I'll probably try again to perfect the technique.


Notes

The hardest part of this kind of repair was the face. You can see a lot of drips on the face, and its especially easy to see imperfections in the face of the shaft.

Friday, December 03, 2010

[WoW] How To: Cross the Greate Divide

Crossing the Great Divide

If anyone is still wondering how to cross the Great Divide between Northern and Southern Barrens, this is how I did it (assumming you can't fly accross because you have no FPs down there). As Horde, I rode down from Durotar to Ratchet. In Ratchet, I went southwest, around the coast. You'll have to got through some Alliance controlled encapments, but they're pretty easy if your level 30+. If you're less than 30 then its probably not a good idea to be heading down to Southern Barrens as a Horde. I followed this route until I crossed the divide and then high tailed it to the nearest Horde FP, so as to never have to do it again.

Thursday, June 10, 2010

Ubuntu 10.04 64-bit + Adobe Air + Tweetdeck

To install Tweetdeck ( or any Adobe Air app) onto Ubuntu is pretty simple, thought of course it requires a few more steps than in Windows or OSX.

Install Adobe Air

1. Get the BINARY (.bin) file for Adobe Air. You can get it from:

http://www.adobe.com/products/air/

Make sure you get the .bin, as the .deb is built for 32-bit (i386) architecture.

2. Find where you downloaded the .bin, and give it execution permission:

chmod +x AdobeAIRInstaller.bin


3. Run the .bin

./AdobeAIRInstaller.bin


It will ask you a few setup questions, nothing too difficult. The defaults seem to work well for me.

Install Tweetdeck

1. Go to www.tweetdeck.com

2. Click on the "Download/Install" now. If everything went well during the AIR installation then it should magically all work.

Tuesday, March 10, 2009

Howto: Fix a 2 drive failure in a RAID 5 mdadm array

Problem:

Somehow 2 of your drives have been marked as "faulty" by mdadm at the same time. This happened to me because the SATA controller card they were both hooked up to got confused and stuttered. Output should look something like this:

$ sudo mdadm --detail /dev/sda1

Update Time : Fri Feb 6 08:28:55 2009
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 2
Spare Devices : 0
Checksum : 50c18fe4 - correct
Events : 0.487370

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 0 8 1 0 active sync /dev/sda1

0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 0 0 2 faulty removed
3 3 0 0 3 faulty removed


As you can the server thinks that raid device 2 and 3 were faulty and thus removed from the array. Since this is a RAID5, 2 faults is 1 fault too many and your data is in jeopardy.

At this point you need to be relatively sure that these at least one ( preferably both ) drives still have the valid data on it. If this is true then go ahead and issue this command:

sudo mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Note that the order of the drives must be exactly the same as they were when you first created the array. This information is available by issuing the command used to get the previous output.

Thats the best case scenario.