January 26, 2012

Remote backup using ssh and tar

Filed under: Linux Reference — Paul Vint @ 1:17 pm

To backup a directory on a remote machine to a local machine (or the other way around) in Linux, there are several methods:

1. rsync -avz username@remoteserver.calm:/home/stuffToBackup /opt/backup
This will recursively copy everything from remote to local preserving permissions and ownership
2. scp -r -C username@remoteserver.calm:/home/stuffToBackup /opt/backup
Again, this will copy everything from remote to local, but there is one potential pitfall: It WILL follow symbolic links.
f.e.: If on the remote server there is a public_html directory, and a symlink www pointing to public_html, it will copy both as if they are regular directories.

Solution to the symlink problem? Don’t have rsync available?
Use ssh and tar:
ssh username@remoteserver.calm “tar cjp /home/stuffToBackup” | tar jxvp -C /opt/backup/
This will copy symlinks as-is (ie: create the symlink in the backup directory), using bzip2 compression (tar’s j option), preserving ownership and permissions (tar’s p option), and will extract the data to /opt/backup (tar’s -C option)

January 6, 2012

Applications Menu empty in Gnome Panel

Filed under: Uncategorized — Tags: , , — Paul Vint @ 8:21 pm

Recently, after (painfully) completely removing KDE4 from my Gentoo Linux desktop system, the applications menu in Gnome was empty. I tried all the basic troubleshooting steps (checking for errors on the console, trying as different user, etc) but still no menu. Reinstalled some things, no go.

Today I decided to have a look (mostly I don’t care, I just launch things from a terminal mostly anway), and found the solution in this thread on forums.gentoo.org:

A recommendation was to look for a symlink called applications.menu in /etc/xdg/, and lo, it wasn’t there!

See below, along with fix:

pvint@nautilus /etc/xdg/menus [0]$ ls -l
total 40
drwxr-xr-x 3 root root 4096 Jan 1 18:39 applications-merged
-rw-r--r-- 1 root root 407 Jan 1 18:38 ggz.menu
-rw-r--r-- 1 root root 4634 Jan 1 21:55 gnome-applications.menu
-rw-r--r-- 1 root root 2988 Jan 2 14:09 gnomecc.menu
-rw-r--r-- 1 root root 488 Jan 2 04:39 gnome-screensavers.menu
-rw-r--r-- 1 root root 10795 May 18 2011 kde-4.6-applications.menu
-rw-r--r-- 1 root root 1387 Jan 1 21:55 settings.menu
pvint@nautilus /etc/xdg/menus [0]$ su
Password:
nautilus menus # ln -s gnome-applications.menu applications.menu
nautilus menus #

SHAZAM! the menu works.

Bit of an oddball issue – HTH

December 10, 2011

Thoughts on a homebrew firewood kiln

Filed under: Uncategorized — Paul Vint @ 10:58 pm

Thinking of making a simple manually controlled firewood (or lumber?) dehumidifier.
I’m finding LOTS of free wood – most of it is “almost ready”, but could use a bit of drying. That bit of drying is something like 1-4 months on average (in sheltered, but breathable conditions), and some much more – I want it NOW!
So, I’m thinking of using the heat I produce in my workshop’s stove to dry the wood. The basic idea is to capture the heat from the top of the stove by making a loose enclosure over the pipe coming out with the main orifices being at the bottom sucking in air across the top of the stove, and sucking it through a 4′x3′x3′ box which with the flow directors at either end. This will give me a about 1 cubic metre of volume for wood. A cubic metre is a bit over 1/4 cord (0.276 cubic metres per cord), so I figure with some waste space, I can get 1/4 cord per run.

My guess is that for wood that “has been dried” – as in old but has been out in the weather, I should be able to dry in a few hours while warming myself working on a bike or whatever. The other wood I have that I cut as “downed trees” but aren’t quite ready – I’m guessing that most of that I should be able to dry in a few evenings of “runs”

See below for a mockup of the general idea. this is just a simple “off the cuff”plan – so any comments are welcome.

Click the image to enlarge.
Diagram for the conceptual firewood kiln

December 5, 2011

Humidity Calculations

Filed under: Tools — Paul Vint @ 11:34 am

This calculator will help you appreciate why the air in the house dries so much when heating in the winter – particularly when heating with wood or any other method that will draw air in from outside.
Enter the temperature and humidity outside, then the temperature inside, and it will show show the theoretical indoor relative humidity. (Note that general living activities such as cooking, breathing, etc tend to increase humidity, and as such, the actual indoor humidity will almost certainly be much higher)
Outside temperature:
°C
Relative Humidity Outside:
%
Calculated Outside Dewpoint: °C
To calculate what the relative humidity would be at a different temperature, enter the inside Temperature:
°C
Calculated relative humidity inside: - %

TODO: Add a calculation for how much moisture needs to be put into the air to get to a set level based on volume of air in home

November 18, 2011

The Beaufort Scale, with Emotional Impact.

Filed under: Uncategorized — Paul Vint @ 9:15 pm

My version of the Beaufort scale. The real data was ruthlessly stolen from Wikipedia, the last column, “Emotional Impact” I’ve added.


Beaufort number Description Wind speed Wave height Sea conditions Land conditions Sea state photo Emotional Impact When Sailing a Small Vessel
0 Calm < 1 km/h (< 0.3 m/s) 0 m Flat. Calm. Smoke rises vertically. Beaufort scale 0.jpg Relaxation, tinged with boredom.
< 1 mph
< 1 kn 0 ft
< 0.3 m/s
1 Light air 1.1–5.5 km/h (0.3–2 m/s) 0–0.2 m Ripples without crests. Smoke drift indicates wind direction and wind vanes cease moving. Beaufort scale 1.jpg Boredom, with a hint of hope.
1–3 mph
1–2 kn 0–1 ft
0.3–1.5 m/s
2 Light breeze 5.6–11 km/h (2–3 m/s) 0.2–0.5 m Small wavelets. Crests of glassy appearance, not breaking Wind felt on exposed skin. Leaves rustle and wind vanes begin to move. Beaufort scale 2.jpg Sails full, boat moving, albeit slowly. Mild smile forming.
4–7 mph
3–6 kn 1–2 ft
1.6–3.4 m/s
3 Gentle breeze 12–19 km/h (3–5 m/s) 0.5–1 m Large wavelets. Crests begin to break; scattered whitecaps Leaves and small twigs constantly moving, light flags extended. Beaufort scale 3.jpg Boat moves along nicely. Real smile forms.
8–12 mph
7–10 kn 2–3.5 ft
3.4–5.4 m/s
4 Moderate breeze 20–28 km/h (6–8 m/s) 1–2 m Small waves with breaking crests. Fairly frequent whitecaps. Dust and loose paper raised. Small branches begin to move. Beaufort scale 4.jpg Hanging over the side with feet in the hiking straps. Alternating between big grins and serious looks while trying to REALLY get the boat to go.
In The Zone!
13–17 mph
11–15 kn 3.5–6 ft
5.5–7.9 m/s
5 Fresh breeze 29–38 km/h (8.1-10.6 m/s) 2–3 m Moderate waves of some length. Many whitecaps. Small amounts of spray. Branches of a moderate size move. Small trees in leaf begin to sway. Beaufort scale 5.jpg Pure Joy inside. Looks of concern on the outside. Having to start paying attention for when there’s gusts.
18–24 mph
16–20 kn 6–9 ft
8.0–10.7 m/s
6 Strong breeze 39–49 km/h (10.8-13.6 m/s) 3–4 m Long waves begin to form. White foam crests are very frequent. Some airborne spray is present. Large branches in motion. Whistling heard in overhead wires. Umbrella use becomes difficult. Empty plastic garbage cans tip over. Beaufort scale 6.jpg A mixture of “WHEEEEE!!!!!” and “Uh oh”
25–30 mph
21–26 kn 9–13 ft
10.8–13.8 m/s
7 High wind,

Moderate gale,
Near gale

50–61 km/h (13.9-16.9 m/s) 4–5.5 m Sea heaps up. Some foam from breaking waves is blown into streaks along wind direction. Moderate amounts of airborne spray. Whole trees in motion. Effort needed to walk against the wind. Beaufort scale 7.jpg The “Uh oh” is much stronger now. Tinges of real concern. Also wishing that we had donned life jackets before now.
31–38 mph
27–33 kn 13–19 ft
13.9–17.1 m/s
8 Gale,
Fresh gale
62–74 km/h (17.2-20.6 m/s) 5.5–7.5 m Moderately high waves with breaking crests forming spindrift. Well-marked streaks of foam are blown along wind direction. Considerable airborne spray. Some twigs broken from trees. Cars veer on road. Progress on foot is seriously impeded. Beaufort scale 8.jpg Alright, this is just plain scary. Not worrying about passengers seeing the concern – there’s no time for that.
39–46 mph
34–40 kn 18–25 ft
17.2–20.7 m/s
9 Strong gale 75–88 km/h (20.8-24.4 m/s) 7–10 m High waves whose crests sometimes roll over. Dense foam is blown along wind direction. Large amounts of airborne spray may begin to reduce visibility. Some branches break off trees, and some small trees blow over. Construction/temporary signs and barricades blow over. Beaufort scale 9.jpg No time to think about how frightening this is now.
47–54 mph
41–47 kn 23–32 ft
20.8–24.4 m/s
10 Storm,[6]
Whole gale
89–102 km/h (24.7-28.3 m/s) 9–12.5 m Very high waves with overhanging crests. Large patches of foam from wave crests give the sea a white appearance. Considerable tumbling of waves with heavy impact. Large amounts of airborne spray reduce visibility. Trees are broken off or uprooted, saplings bent and deformed. Poorly attached asphalt shingles and shingles in poor condition peel off roofs. Beaufort scale 10.jpg Wondering Why on Earth we are out here. Only briefly wondering that though, due to the complete panic situation.
55–63 mph
48–55 kn 29–41 ft
24.5–28.4 m/s
11 Violent storm 103–117 km/h (28.6-32.5 m/s) 11.5–16 m Exceptionally high waves. Very large patches of foam, driven before the wind, cover much of the sea surface. Very large amounts of airborne spray severely reduce visibility. Widespread damage to vegetation. Many roofing surfaces are damaged; asphalt tiles that have curled up and/or fractured due to age may break away completely. Beaufort scale 11.jpg Dear God.
64–72 mph
56–63 kn 37–52 ft
28.5–32.6 m/s
12 Hurricane Force[6] ≥ 118 km/h (≥ 32.8 m/s) ≥ 14 m Huge waves. Sea is completely white with foam and spray. Air is filled with driving spray, greatly reducing visibility. Very widespread damage to vegetation. Some windows may break; mobile homes and poorly constructed sheds and barns are damaged. Debris may be hurled about. Beaufort scale 12.jpg The sails are blown off and we’re hitting record speed!
Or maybe we’re dead. Tough to tell right now.
≥ 73 mph
≥ 64 kn ≥ 46 ft
≥ 32.7 m/s

November 11, 2011

Launched new website – GITIKI.com

Filed under: Uncategorized — Paul Vint @ 7:08 pm

Launched a new website today – GITIKI.com

GITIKI is a Wiki style site dedicated to hosting guitar tablature and chords.

July 27, 2011

Notes on creating routes for an Explorist GPS

Filed under: Geo,GIS — Paul Vint @ 10:29 pm

- there appears to be a maximum of about 50 points (workaround if you are using POIs?)
- the horribly big crosshair icon can be changed to a dot by changing the a to a t in the appropriate lines for the points in the .rte file (house is c, sailboat is i, anchor is w)
- if the point names are just numbers labels are not shown

July 5, 2011

Making Magellan Explorist Detail Maps from Canvec Topo Data

Filed under: Geo,GIS — Paul Vint @ 5:45 pm

QUICK summary of making a topographic detail map from CanVec Shapefile data

  1. Get the desired .zip file from ftp://ftp2.cits.rncan.gc.ca/pub/canvec/50k_shp/
  2. unzip it somewhere
  3. Run MobileMapperOffice
  4. Go to Detail maps and add the following layers (file names end as follows):
    • TO_1580009_0.shp
    • TR_1760009_1.shp
    • TR_1020009_1.shp
    • HD_1470009_1.shp
    • FO_1030009_1.shp
    • VE_1240009_2.shp
    • HD_1480009_2.shp
  5. Set the colours and Display Attributes as follows:

    MMO CanVec Map Layers
  6. Save the background map, create map, and exit the map editor
  7. Select File->Upload to GPS, then select “save to Hard Drive” and save it
  8. Run MMOconverter.exe to convert he imi to the correct imi format
  9. copy the resulting file (in Exports/Images) to the "Detail Maps" directory on your GPS
  10. Enjoy Topo Map Goodness

June 12, 2011

Importing Geospatial vector data into a MySQL database

Filed under: Geo,MySQL Tips — Paul Vint @ 8:54 am

Some notes on importing vector data into a MySql Database:

  1. Create a database, in my case I called it "spatialData"
  2. Import vector data from a file:
    ogr2ogr -f MySQL MySQL:spatialData,user=pvint,password=mypassword March25.kml -update -overwrite
  3. Test it to verify that it stored:
    ogrinfo MySQL:spatialData,user=pvint,password=mypassword

    This should yield output similar to the following:

    INFO: Open of `MySQL:spatialData,user=pvint,password=mypassword'
          using driver `MySQL' successful.
    1: march25
    2: points (3D Point)

    To get more detailed information:

    ogrinfo MySQL:spatialData,user=pvint,password=mypassword march25

    Should yield results like:

    INFO: Open of `MySQL:spatialData,user=pvint,password=mypassword'
          using driver `MySQL' successful.
    
    Layer name: march25
    Geometry: Unknown (any)
    Feature Count: 1
    Extent: (-77.595817, 43.988083) - (-77.145567, 44.885050)
    Layer SRS WKT:
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9108"]],
        AUTHORITY["EPSG","4326"]]
    FID Column = OGR_FID
    Geometry Column = SHAPE
    name: String (0.0)
    description: String (0.0)
    OGRFeature(march25):1
      name (String) = Path
      description (String) =
      LINESTRING (-77.559267 43.9919,-77.5591 43.992433,-77.558833 43.992767,-77.558667 43.993117,-77.558517 43.993333,-77.55795 43.9938,-77.557917 43.994083,-77.55795 43.994617,-77.558 43.995117,-77.558133 43.995917,-77.558183 43.997433,-77.557933 43.998083,-77.557917 43.99825,-77.557667 43.998617,-77.5574 43.998983,-77.557367 43.999283,-77.557617 44.000683,-77.5581 44.001783,-77.558067 44.00245,-77.5581 44.0026,-77.55995 44.002133,-77.560517 44.00195,-77.560967 44.001867,-77.562333 44.001433,-77.56345 44.000933,-77.564133 44.000583,-77.564517 44.000333,-77.565333 43.99995,-77.5661 43.999733,-77.569883 43.9989,-77.571017 43.99875,-77.571683 43.9986,-77.572783 43.998433,-77.574733 43.9979,-77.576233 43.997933,-77.57755 43.997933,-77.579 43.997833,-77.58405 43.9974,-77.58465 43.997283,-77.585 43.997217,-77.585833 43.997033,-77.586067 43.996833,-77.586183 43.9966,-77.5863 43.996467,-77.586583 43.996283,-77.587133 43.996183,-77.587483 43.9961,-77.588 43.996183,-77.58825 43.996233,-77.588517 43.996217,-77.588717 43.996317,-77.588917 43.996467,-77.589317 43.996583,-77.5896 43.996667,-77.589883 43.996717,-77.5901 43.9968,-77.5903 43.9967,-77.590933 43.9964,-77.59075 43.996233,-77.585467 43.999167,-77.584983 43.99935,-77.584467 43.999333,-77.583817 43.999133,-77.583367 43.998933,-77.5827 43.998567,-77.582067 43.998367,-77.580917 43.9979,-77.580583 43.997717,-77.579983 43.99735,-77.579283 43.997083,-77.578867 43.996867,-77.576983 43.995967,-77.576433 43.99575,-77.575583 43.995367,-77.574417 43.994867,-77.573983 43.994667,-77.5736 43.994467,-77.573 43.994133,-77.572383 43.99385,-77.571917 43.993633,-77.570983 43.993167,-77.570617 43.99305,-77.57015 43.9929,-77.568317 43.992667,-77.56735 43.992417,-77.564883 43.9918,-77.564067 43.991467,-77.5635 43.991133,-77.56325 43.990917,-77.563017 43.99075,-77.562717 43.9905,-77.56245 43.99015,-77.561933 43.989467,-77.561783 43.989267,-77.56165 43.989117,-77.561433 43.9889,-77.5614 43.988767,-77.561333 43.98855,-77.561317 43.9883,-77.561367 43.98815,-77.56155 43.988083,-77.595817 44.060583,-77.387567 44.137433,-77.38665 44.137933,-77.48625 44.1042,-77.4912 44.100133,-77.492217 44.099483,-77.355133 44.167617,-77.355233 44.16755,-77.14565 44.884567,-77.145567 44.884433,-77.145783 44.8845,-77.146033 44.88455,-77.145867 44.884733,-77.146333 44.884633,-77.147867 44.884483,-77.148233 44.8844,-77.14845 44.8841,-77.148317 44.884317,-77.1481 44.884433,-77.147633 44.884467,-77.14715 44.8845,-77.146817 44.884467,-77.146583 44.884433,-77.1462 44.884533,-77.145833 44.884783,-77.145617 44.884917,-77.145767 44.88505,-77.145683 44.8845,-77.59375 44.053867,-77.581417 44.048267,-77.580683 44.04825,-77.579733 44.04795,-77.578317 44.049233,-77.570233 44.054,-77.5594 44.063483,-77.546383 44.0698,-77.543833 44.072433,-77.5324 44.078233,-77.53085 44.0785,-77.529317 44.07865,-77.509817 44.08895,-77.4974 44.097283,-77.491917 44.099683,-77.4802 44.107633,-77.474233 44.109867,-77.463933 44.111533,-77.459467 44.111883,-77.453983 44.11325,-77.445183 44.114917,-77.404633 44.127533,-77.390033 44.135967,-77.3876 44.137517,-77.386367 44.138167,-77.385683 44.14165,-77.385383 44.141983,-77.385067 44.1421,-77.389267 44.1553,-77.39015 44.155917,-77.391183 44.156317,-77.388667 44.1591,-77.3878 44.159683,-77.377717 44.1619,-77.366317 44.16335,-77.354833 44.166967,-77.3548 44.167267,-77.354967 44.16765,-77.355317 44.167583,-77.355733 44.168133,-77.35625 44.168533,-77.35735 44.169633,-77.35715 44.16945,-77.355 44.16735,-77.3552 44.16755)

    The import should work with any vector data formats that ogr2ogr accepts (see http://www.gdal.org/ogr/ogr_formats.html

June 1, 2011

Check for open TCP port

Filed under: Networking Tools,Tools — Paul Vint @ 9:50 am

This tool is temporarily offline – sorry

Test for an open port on your machine/IP

Enter a TCP port below to do a quick test to see if that port is open:


Enter TCP Port #:



Results:
 


1 person likes this post.
Older Posts »

Powered by WordPress