Uninstalling all ruby gems
If ever things go south and you get entangled in a mess of conflicting gem dependencies, or if it's just time for a spring cleaning and removing a swarm of outdated gems, you can uninstall all gems from your system by running:
gem list --no-version | xargs gem uninstall -aIx
As seen on McGrath's Pleasure Book for Hackers
Rails Installer major update
With the recent release of Ruby 2.0 I took on the long-overdue task of updating my Rails Installer shell script.
This update includes:
- easier install flow
- shorter install links
- leftover garbage removal
- updated Ubuntu package dependencies
- tested for compatibility with Ubuntu 12.10 and Mint 14
- choice of Ruby version to install (1.9.3 or 2.0.0)
Triggering the installer is now easier than ever:
With curl
curl -LO https://github.com/tarakanbg/railsinstaller/raw/master/ruby.sh && bash ruby.sh
With wget
wget --no-check-certificate https://github.com/tarakanbg/railsinstaller/raw/master/ruby.sh && bash ruby.sh
Gems updated for Ruby 2.0 - Part 2
Following the first batch of updates here is the second one.
The following gems have been updated for compatibility with Ruby 2.0:
These gems still support the Ruby 1.9.3 + versions, however the support for the 1.8.x branch has been dropped with this latest update.
Gems updated for Ruby 2.0 - Part 1
In the wake of the recent Ruby 2.0 release over the last few days I've updated some of my gems for 2.0 compatibility.
This batch includes all of my aviation & vatsim related libraries, except for airdata, which as a rails engine will be updated/tested for compatibility with the Rails 4 / Ruby 2 combo when its time comes.
This being a maintenance release, some minor refactoring changes and dependency updates were also implemented where applicable.
The list of updated gems:
All listed gems still support the Ruby 1.9.3 + versions, however the support for the 1.8.x branch has been dropped with this latest update.
vACC Malta Website
I'm happy to announce the launch of yet another Rails project: the website of vACC Malta.
Under the hood it features a customized Refinery CMS integration, multiple aviation and vatsim related Ruby libraries, developed by me previously.
On the frontend it's Twitter bootstrap, HTML5/CSS3 compliant, with a nice red/white color scheme (the colors of the Maltese flag).
I wish my friends in Malta good luck with their new vACC and blue skies!
AIRAC 1302 LQSB changes
AIRAC 1302 brought some changes to LQSB FIR and LQSA procedures in particular, introducing STARs, 2 new waypoints, other waypoint changes, 4 new IAFs and a new ILS procedure, transitioning from the new IAFs.
vACCBiH sector files have been updated to reflect those changes and here's the changelog:
v. 1302
Global changes
- Changed coordinates for waypoints TIMID and NORPI in accordance with AIRAC 1302 and NOTAMs A2668/12 and A0085/13
- Slightly adjusted coordinates for KEB, KIS VORs to match published navdata
- Added waypoints: ADNAN, EMKES. Remember to display them via your clients "Display Settings"
LQSA changes
- All newly published LQSA star diagrams can now be displayed on radar for reference. Tracks are combined where applicable to mimize screen clutter. Check your Display Settings > Stars to enable disable the STAR tracks. Please note that the approach tracks are also depicted as STARS, as the sct file format does not separately support approaches.
- Added the new ILS S approach and its transitions as a radar diagram (under the STARS section). Please study the chart carefully, as this is perhaps the most important addition of this update, contaning the transitions from the new IAF fixes ADNAN, EMKES, NORPI and TIMID where the new STARs terminate to the localizer 12.
- All LQSA STAR tracks can now be assigned to pilots via dropdown menu. Interim waypoints in STARs can now be displayed along the route of tagged a/c and used for time prediction, coordination and directs.
- List of the new LQSA STARs as implemented in the new sector file: BOSN1N, NORP1L, SARA1L, KEB1P, VRAN1M, GILU1P, GILU1L, MOST1L, MOST1P. Easy mnemonics for the new STARs: all "L" STARS terminate at TIMID, all "P" STARs terminate at ADNAN, all "N" STARs terminate at NORPI, all "M" STARs terminate at EMKES
Download
Sector files for Euroscope: github link
Sector files for VRC: github link
BiH VFR Scenery for FSX
This one is for flight simmers :)
I'm happy to announce the release of the BiH VFR package for FSX. This is the first native rendition of Bosnia and Herzegovina airports for FSX / P3D.
Features
- Accurate rendition of the 3 biggest BiH airports: Sarajevo (LQSA), Mostar (LQMO), Banja Luka (LQBK)
- Up-to-date ground layouts, navigation aids, custom modelled airport buildings
- Accurate hand-placed landclass and autogen around the airports and neighbouring cities
- Accurate mesh covering all Bosnia- Herzegovina
- Native FSX 3D models and textures
- Native FSX ground polygons; sloped polygons around the airports
- All airport service links and surrounding road infrastructure are built with FSX vector objects for better fidelity and faster rendering
- Improved night textures and realistic night lighting for all included airports
- 60 custom 3D landmark objects in and around the city of Sarajevo
Download
You can download the package here
The User Guide is available separately for familiarization and inspiration here
Screenshots
Attributer - Ruby gem for adding width and height attributes to image tags
A new Ruby gem release for adding width and height attributes to image tags within HTML blocks.
This library will parse a piece of HTML, find all the image tags inside it, obtain the width and height of these images and insert them as attributes to the img
tag. It will then return the entire HTML with the image attributes properly in place.
Useful for example as a callback with WYSIWYG editors that don't automatically add width
and height
attributes to images or for instantly optimizing all your old blog or CMS posts with img tag attributes for speed and standards compliance.
Usage
This library augments the default Ruby String
class with 1 public method: .image_attributes
. You can attach this method to a string variable containing a piece of HTML of any length or complexity. This method takes one of 2 mandatory arguments: (:domain => "http://my-domain.com")
or (:path => /my/local/filesystem/path)
.
It will raise an ArgumentError
exception if neither argument is passed.
These arguments are only used to locate the images referenced in your HTML and poll their width and height; they are not written in the resulting HTML: the src
attribute of the img
tag remains unchanged. Either a full local path or a URL prefix is needed.
For discovery purposes these arguments are concatenated to the src
attribute of the image tag, i.e. if your images are accessible via http://my-domain.com/assets/test.jpg
and you already have src="/assets/test.jpg"
in your image tag, then you only need to use
(:domain => "http://my-domain.com")
as an argument.
Likewise if your images are locally accessible via /home/www/site/assets/test.jpg
and you already have src="/assets/test.jpg"
in your image tag, then you only need to use
(:path => "/home/www/site")
as an argument.
The .image_attributes
method will return a string of the entire HTML block with the image attributes properly in place.
Examples
html = '<img alt="test" class="gallery" src="/assets/test.jpg">'
html.image_attributes(:domain => "http://my-domain.com")
# => '<img alt="test" class="gallery" src="/assets/test.jpg" width="200" height="266">'
html = '<img alt="test2" class="fuzzy" src="/images/test2.jpg">'
html.image_attributes(:path => "/home/www/site")
# => '<img alt="test2" class="fuzzy" src="/images/test2.jpg" width="340" height="155">'
html = Post.find(20).body # =>
# <div id='gallery'>
# <img alt="1" class="gallery" src="/assets/1.jpg" />
# <img alt="2" class="gallery" src="/assets/2.jpg" />
# <img alt="3" class="gallery" src="/assets/3.jpg" />
# <img alt="4" class="gallery" src="/assets/4.jpg" />
# <img alt="5" class="gallery" src="/assets/5.jpg" />
# <img alt="6" class="gallery" src="/assets/6.jpg" />
# <img alt="7" class="gallery" src="/assets/7.jpg" />
# <img alt="8" class="gallery" src="/assets/8.jpg" />
# <img alt="9" class="gallery" src="/assets/9.jpg" />
# <img alt="10" class="gallery" src="/assets/10.jpg" />
# <img alt="11" class="gallery" src="/assets/11.jpg" />
# <img alt="12" class="gallery" src="/assets/12.jpg" />
# <img alt="13" class="gallery" src="/assets/13.jpg" />
# <img alt="14" class="gallery" src="/assets/14.jpg" />
# <img alt="15" class="gallery" src="/assets/15.jpg" />
# <img alt="16" class="gallery" src="/assets/16.jpg" />
# <img alt="17" class="gallery" src="/assets/17.jpg" />
# <img alt="18" class="gallery" src="/assets/18.jpg" />
# <img alt="19" class="gallery" src="/assets/19.jpg" />
# <img alt="20" class="gallery" src="/assets/20.jpg" />
# </div>
html.image_attributes(:domain => "http://my-domain.com") # =>
# <div id='gallery'>
# <img alt="1" class="gallery" src="/assets/1.jpg" width="200" height="266">
# <img alt="2" class="gallery" src="/assets/2.jpg" width="200" height="266">
# <img alt="3" class="gallery" src="/assets/3.jpg" width="200" height="266">
# <img alt="4" class="gallery" src="/assets/4.jpg" width="200" height="266">
# <img alt="5" class="gallery" src="/assets/5.jpg" width="200" height="266">
# <img alt="6" class="gallery" src="/assets/6.jpg" width="200" height="266">
# <img alt="7" class="gallery" src="/assets/7.jpg" width="200" height="266">
# <img alt="8" class="gallery" src="/assets/8.jpg" width="200" height="266">
# <img alt="9" class="gallery" src="/assets/9.jpg" width="200" height="266">
# <img alt="10" class="gallery" src="/assets/10.jpg" width="200" height="266">
# <img alt="11" class="gallery" src="/assets/11.jpg" width="200" height="266">
# <img alt="12" class="gallery" src="/assets/12.jpg" width="200" height="266">
# <img alt="13" class="gallery" src="/assets/13.jpg" width="200" height="266">
# <img alt="14" class="gallery" src="/assets/14.jpg" width="200" height="266">
# <img alt="15" class="gallery" src="/assets/15.jpg" width="200" height="266">
# <img alt="16" class="gallery" src="/assets/16.jpg" width="200" height="266">
# <img alt="17" class="gallery" src="/assets/17.jpg" width="200" height="266">
# <img alt="18" class="gallery" src="/assets/18.jpg" width="200" height="266">
# <img alt="19" class="gallery" src="/assets/19.jpg" width="200" height="266">
# <img alt="20" class="gallery" src="/assets/20.jpg" width="200" height="266">
# </div>
As usual the packaged gem is available on rubygems and the source and docs are on github.