Monday, February 1, 2016

Completely Remove Slack App from Mac OSX

Once you have removed the Slack App from the app drawer manually, some slack files will remain. (this may still be true even if you used a third party uninstaller application)

Now, these files arent in the common/usual Mac OSX locations eg ~/Library/Application Support/ etc

Instead they are located at:

~/Library/Containers/com.tinyspeck.slackmacgap/ in the form of a folder.

Using the terminal you can confirm the presence as such:


ls -lrt ~/Library/Containers/com.tinyspeck.slackmacgap/Data/

which will give you a long-form folder listing. Once presence is confirmed you can remove the lot by:


rm -rf ~/Library/Containers/com.tinyspeck.slackmacgap/


Tuesday, January 26, 2016

Working with Apple Script, uncompressed piped binary output, working directories, stdout, and cpio ! Phew!

Recently had to convert a shell script to Apple Script (long story best left alone!! Suffice to say, sometimes the beauty and elegance of shell scripts can be forgotten!!)

Had an issue where I need to convert the following line, which was uncompressing a zipped, cpiod compressed archive to disk - and this seemed the best.only way to get to the compressed archive contents.

cat NT.pkg/Scripts | gunzip -dc | cpio -i --quiet

Usually I would call this in Apple Script as so (simplified without my path vars etc here):

do shell script "cat NT.pkg/Scripts | gunzip -dc | cpio -i --quiet"

simple? No! Why you may ask?

so, the issue was that gunzip was writing to stdout, as denoted by the -c option...okay so thats fine, then cpio takes input from stdin and does what you tell it. In this case there were two probems:

1) the working directory is not guaranteed, but generally defaults to /
2) cpio being called in this way was unable to write to / but also gave no errors, instead it seemed to complete successfully (without any files being written)

the answer was to firstly change working directory when calling out the shell script from the Apple Script (which you have to do each call out), here I change it to the location/folder from where the script is run, (bit of a pain but got there in the end), like so:

tell application "Finder" to get folder of (path to me) as Unicode text
set workingDir to POSIX path of result

to test:

set wd to do shell script "cd " & workingDir & ";" & "echo `pwd`"
display dialog wd

or another way to test:

do shell script "cd " & workingDir & ";" & "echo `pwd` > test.txt"

then the key was really splitting the gunzip and cpio processing into two steps, as having tried quite a while, I couldn't get it to work piping from gunzip to cpio via an AppleScript do shell script call out:

do shell script "cd " & workingDir & ";" & "cat " & quoted form of scriptsFile & " | gunzip -dc > tmpScriptsRaw.bin"

do shell script "cd " & workingDir & ";" & "cpio -i --quiet < tmpScriptsRaw.bin"

and there you have it!

Will also upload to my Github Gist so you will also find it there...

Peace.

Friday, December 11, 2015

Untar Multiple File Archive from Command Line (Linux/OSX)

To untar a multiple file archive eg

archive.tar.gz000
archive.tar.gz001
archive.tar.gz002
archive.tar.gz003

You need to use the cat command (short for concatenate), and then pipe the result through the tar command like so:

cat archive.tar.gz000 archive.tar.gz001 archive.tar.gz002 archive.tar.gz003 | tar -xz
(the above being all in one command)

Cheers

Thursday, December 10, 2015

Soap Nuts : the Eco-Friendly Sustainable Washing Detergent


As participants of the IKEA Live Lagom sustainability consumer research (closed group) project, the family are on a drive to be more sustainable and healthy and reduce our negative environmental impact as well as upping the positive impact of the same both at home and in our community.

As part of this we have been looking at where we can cut down on packaging in favour of reusable/refillable, and on using chemicals in favour of natural.

Browsing on Amazon, I came across a natural sustainable alternative to Clothes' Detergent and Softener (yes, it really claims to function as both!). Excellent reviews on Amazon so went ahead and bought a small pack

These nuts are grown on trees, and can be done so at scale - so pretty sustainable. Natural soapy lather is produced when the nuts mix with water, as well as producing a softening effect on the wash. Can be used in the machine or when conducting a wash by hand.

The product marketing on Amazon says it quite well:

"Soap Nuts are a natural washing detergent that is literally grown on trees. The Soapnut shells contain Saponins which on contact with water release mild suds and can be used as an environmentally friendly alternative to Laundry detergent in washing machines. In India and Nepal the soap nuts have been used as a washing detergent for hundreds of years. Modern day thinking that we should consider the future of the planet we live in have made Soap Nuts popular. Not only are they effective but the Soap Nuts are also relatively cheap compared to supermarket bought washing powder."

Just got our delivery today, so will be trying this out a little later and feedback the results on here...

Working method:

A reusable cloth pouch which is supplied with your purchase, is filled with 4-6 half nut shells (they come de-stoned, so essentially each husk is already split in two). The pouch can be used again on the same day to do one more wash, and then thrown into a composter or garden waste for recycling.

The only thing missing is the fragrance element of the wash, for this it is recommended you add a couple of drops of essential oils to the wash - we already use at home for various purposes (- another post coming soon on this!)

Pros:

- will reduce packaging consumption,
- and chemicals consumption and chemical waste into the waterways,
- eco-friendly - kinder to our skin and the environment as its chemical free,
- kinder on the pocket too!
- supporting local economies in developing countries - Cultivated through sustainable agriculture
- allergy-free, good for your skin,
- ecological and economical compared to other brands of detergent
- around 1 Kg of soap nuts can be used for more than 100 loads of laundry,
- used for all fabrics and with all temperatures,
- can also be used as an all-purpose cleaner in the house

Cons:

- cloth pouch in every purchased pack, so some wastage, but can be re/up-cycled, and is biodegradable,
- produced in India/AsiaPac region so ups the carbon footprint in terms of transport etc,
- initially higher outlay to purchase a larger quantity to make more economical

Costs comparison:

From a quick Googling, consensus on washing powder marketing is 16 washes from 1kg of powder in the wash. Now cost will depend on wether you go supermarket at £1-00 or premium brand which are around £5-00 for 1.4kg

Soap nuts on the other hand generally claim 330 washes per kg!! which roughly come in generally at about £12-00 per kg delivered (on Amazon Prime at least).

Ive done a quick table for comparison of available options below to establish cost vs other factors:
(sorry had to screen shot it straight out of numbers as no time to make a nice HTML table in blogger by hand!)




Soap nuts then, seem to not only be the cheapest option, coming in at 14% pf the price per wash of the nearest Eco washing powder. Also, being nice to marine life is a big plus on its own.

Peace.

Wednesday, December 9, 2015

Up-Cycling your Old Glass Bottles

Hot on the heals of my last post, I thought Id share the method I used last year to up-cycle an old olive oil bottle into a nice slim tall vase for the kitchen window (pic to follow).

You can use this technique to make cool drinking glasses, vases, storage containers, pencil holders, etc Some pretty cool looking pieces could be had with a little bit of elbow grease.

An awful lot of resource goes into making a glass bottle, and then transporting it to point of sale. Thats the explicit resource, then there is the implicit resource cost, that is to say, all the people and energy that were involved in ancillary processes e.g. marketing effort to advertise the product to get you to buy it. Collectively on a big picture level, every product has a huge amount of resource ploughed into it. So I think its important we choose to re-use wherever we can, so that overall cost is not repeated again. Consideration of Recycling or Up-Cycling shouldn't just be about the raw material element.

But, I digress, you want to the goods on how to make it happen..!

'Instructables' on how to cut glass bottles is here.

Below are two Youtube vids which describe different techniques to achieve the desired results:





In my instance the bottle was square, so I simply drew a line with marker on the bottle and placed it on a workbench whilst I scored it with a hand held glass cutter. I then used my multi-tool with sanding attachment to get a smooth finish on the edge, however, thinking about it maybe should have done it by hand to be more environmentally friendly?!

Please remember to wrap the discarded part of the bottle in newspaper or similar to protect from the sharp edges before putting it out for recycling.

Peace to all.

Up-Cycling Old Glass Incandescent Light Bulbs

10 Brilliant Ways to Upcycle Your Light Bulbs

Having recently been privileged to be chosen to take part in the IKEA Live LAGOM research project, one of the obvious ways to lower one's environmental impact footprint is to swap out existing incandescent and fluorescent bulbs for the IKEA LED variety on offer.

Since this project is geared towards being more responsible in all aspects, I did a quick search to see if the bulbs were recyclable. To my surprise... fluorescent bulbs ARE recyclable, however the standard or halogen incandescent bulbs are NOT recyclable!


They wont be accepted by the usual recycling services i.e. local council or roadside recycling bins etc, reason being they are indeed glass, but contain lots of metal in the construction.

I was a little bit surprised at this, considering the push in the past away from incandescent, now accelerated vastly by the drive towards LED globally.

Incidentally, the three scientists who bought forward the LED revolution we are now rejoicing in were awarded the 2014 Nobel Prize for Physics. Profound stuff then.

Almost everyone I had spoken to or read of on the Live Lagom Facebook group was looking to upgrade to LED bulbs, and would possibly end up throwing their old incandescents into landfill waste - which makes me sad :(

Acknowledging that incandescents may not be mainstream recyclable was a stop-gap, as I refused to waste something that had taken so much resource to create and still likely would be working. Surely someone out there must have up-cycled bulbs out there... and surely they had! :)

Picture speaks a thousand words etc, so here are some great Youtube videos of up-cycling light bulbs.




Those give you the method, and I really like some of those, but loving what has been done here!

Enjoy and please share your up-cycles on the Live LAGOM Facebook group!

Monday, December 9, 2013

How to install an APK from your Android phone's sdcard

You dont need any special installer apps!

Simply open your browser and type:

file:///sdcard/your.apk

Where 'your.apk' is the filename of your apk, (in this example your.apk in the sdcard root '/' directory).

Voila!