• Skip to primary navigation
  • Skip to content
Eyks

Eyks

We make things that make a difference

  • About
  • Concern
  • Contact
  • Blog
  • Show Search
Hide Search

Skye Moroney

WebDAV – dock shortcut

August 19, 2014 By Skye Moroney

I wanted to build on the Mac Staff Home- dock shortcut by utilising WebDAV. This version is better because it allows you to use a single dock icon to connect to all your shares at once (as per your WebDAV setup). It also means the shares are available off campus.

You’ll need to change the webdav.eyks.com.au with your own WebDAV link.

# Author: Skye Moroney
# Version: 2.6
# Created: 20150815
# About: Connect app for webdav
# loop trying to connect until the volume is mounted
repeat until (list disks) contains “webdav.eyks.com.au”
    try
        mount volume “https://webdav.eyks.com.au/”
    on error
        # graceful exit if something goes wrong or the connection is canceled
        return
    end try
end repeat
 
# open finder to the base of connected mount and set to column view
tell application “Finder” 
    activate
    # repeat, as script can execute so fast that it starts before mounting
    repeat
        # when mount available, run once – then exit the repeat loop
        if exists disk “webdav.eyks.com.au” then
            # open a Finder window and set to column view at webdav base
            make new Finder window to disk “webdav.eyks.com.au“
            set current view of Finder window 1 to column view
            exit repeat
        end if
    end repeat
end tell

As always: Use at your own risk.

Haven’t setup WebDAV on your servers?

Save yourself a bunch of time and effort and look into HTTP Commander. Despite what their website looks like it’s actually very good stuff. Quite a few Colleges use this, it’s great and the support people are good.

Connecting to WebDAV from iPads?

The standout in the field for a long time now has been Documents by Readdle. Look into it and you’ll quickly see why, the app is well designed and easy to use. Simple to setup with your WebDAV too. The support people here amazing.

 

Creating Mac Printing Packages – lpadmin

January 27, 2014 By Skye Moroney

This is for when you have a print queue and unmanaged macs that you need to create a bundle printer install for. I’ll add the rest of this post later – basically use casper composer or iceberg and add the printer profiles, drivers and icons.

then you’ll need to add a post install script… use this one, but adjust as needed:

#!/bin/sh

## postinstall
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3

## Add as many printers as you need to bundle with this command
lpadmin -E -p Printer_Name_No_Spaces_Allowed -v smb://PrintServer/PrintQueue -P “/Library/Printers/PPDs/Contents/Resources/Printer Model.gz” -L “Location” -o printer-is-shared=false -E

## CUPS needs to be restarted to wake up the printer
/usr/sbin/cupsenable $(lpstat -p | grep -w “printer” | awk ‘{print$2}’)
exit 0 ## Success
exit 1 ## Failure

*** I know this isn’t great code but if you need to get things started this will set you off – as always use at your own risk. Also, as with most of my knowledge this is based off mixing together better peoples ideas – check Tremily and thanks to Walter Meyer for just being awesome and putting this stuff up online. ***

Additions From Rick Goody

So you are missing some parts.

lpadmin -D “User Friendly Name – All Characters allowed”

If you are using SMB printers you should also run

defaults write /Library/Preferences/com.apple.NetworkAuthorization UseShortName -bool YES

Otherwise auth won’t work as smb wants the user short name or SAMid details not full name as apple will try and use

CUPS does not need to be restarted. thats what the -E does

Also another little trick to deploy printer presets to create presets, and deploy to all current users and user template folder. The Preference file is stored “~/Library/Preferences/com.apple.print.custompresets.forprinter.Printer_Name_No_Spaces_Allowed.plist” as per your script as the -p option

Also in mavericks if you are going to deploy or modify presents on the fly you need to run command from terminal “KillAll cfprefsd” before modifying prefs or use defaults write command

also another little tip. if you want to remove a printer

lpadmin -x Printer_Name_No_Spaces_Allowed

 

Please be aware that printer packages from Mavericks- Yosemite – El Capitan are like a yoyo with requirements so check your setup and google, this code is only here for historical reference.

Mac Staff Home – dock shortcut

November 5, 2013 By Skye Moroney

UPDATE – Cam commented on this post last year and I adjusted the code but never posted the update. I’ve posted an update for dock shortcuts using WebDAV but some people might still need to use these ones so I am updating the code to make it a bit better.

Now it falls over to enter a different username if the local name is wrong, it also improves the original posted code by ignoring the mounted drive if it’s already mounted and also mounts directly to the user folder instead of also showing the top level Home$ share. Oh yeah it also opens a finder window to the base so you can just click it when ever you want to bring up a finder to the share folder.

So there are a few of these out there and it’s usually a techs first delve into Mac when they get asked to create a short cut to connect to a file share. Simple connections to afp or smb shares are easy but then you hit a wall when you get asked to make it connect to the specific Users folder.

Original Code

set the_user to system attribute “USER”
try
mount volume “smb://” & the_user & “@STAFFHOME/Home$/”
tell application “Finder” to open location “smb://STAFFHOME/Home$/” & the_user & “/”
end try

Improved Code

# Author: Skye Moroney
# Version: 7.3
# Created: 20150819
# About: Connect as local user to an SMB share# get the local username
set the_user to system attribute “USER”repeat until (list disks) contains the_user
    try
        # adjust to match your Staff Share
        mount volume “smb://” & the_user & “@STAFFHOME/Home$/” & the_user & “/”
    onerror
        # @Cam’s improvement
        # if connection fails then prompt for username
        set the_user to display dialog “Please enter your network username:” default answer “” buttons {“Cancel”, “Ok”} default button 2
    end try
end repeat

# open finder to the base of connected mount and set to column view
tell application “Finder”
    activate
    # repeat, as script can execute so fast that it starts before mounting
    repeat
        if exists disk “Home$” then
            # open a Finder window and set to column view
            make new Finder window to the_user
            set current view of Finder window 1 to column view
            exit repeat
        end if
    end repeat
end tell

 

Step by Step

Open AppleScript Editor and paste the above in.

Adjust the name of your share appropriately – this will not work exactly as is unless you work at the same place as me or you happen to have the same setup.

Screen-Shot-2013-11-05-at-6.17.33-pm

Save the script first and then Export it and choose the File Format to be Application

Screen-Shot-2013-11-05-at-6.54.27-pm

Using the Keynote trick you can make a high res icon for it – once upon a time there was a a bunch of effort required to do this but now it’s too damn easy.

Right click the new app and Get Info (command+i), click the icon so it has a blue highlight and then paste your image – icon done.

2minute example –

staff-home

Now to finish off, when you store the new shortcut you’ve made put it in your /Users/Shared folder.

Screen-Shot-2013-11-05-at-6.17.15-pm

Once you’ve installed it there and changed the permissions in the Get Info to be re Read&Write for everyone. It can now be dragged to or MCX’d to anyones dock on that Mac.

As I had pointed out to me;

always a few ways to achieve the same thing

There are a lot of ways to do the connection, this is just the way I have done it and if you like please feel free to add some in the comments =)

The reason for the secondary line in the script is so that when a user clicks the shortcut it will open a finder to the folder rather than just mounting it. I honestly should go and add some error checking and also put in some dialogues for failure to clean it up. I should also do a check to see if the drive is mounted already to skip that step if it isn’t needed, as then it would become the button that a user can click to bring up the share space every time.

Keynote Trick – Make complex images easy

October 29, 2013 By Skye Moroney

I have so many things to write and I thought I should start off with one of my favourite tricks on Mac. This works with any version of Keynote and I’ve even tested it with the new released version 6. You need to have Messages too (previously known as iChat) but you don’t need to be logged in. Well also assume you all know the “command + shift + 4″ to screenshot and that if you do that and before you drag press “spacebar” and you get a camera that screen shots just the window you’re hovering over.

This trick isn’t specifically for websites, it’s for creating images quickly.

Create PNG goodness

I end up having to do a lot of quick mockups and design and Keynote is my 2nd stage, yes I still scribble things with pen and paper to get my initial thoughts down. This leads to an issue where my thoughts look great in my mind and like a horrible mess on paper. Thus Keynote is where I end up skipping a whole bunch of time and professional level skills by using it to be me wire frames and to help create images quickly. Yes I know it’s not meant for that but it is faster and easier than any other editing program I can think of and the interface is something that almost everyone has seen in some form.

The premise – create layers in Keynote – copy all layers – paste into Messages – drag out of Messages – PNG goodness

Basic how to

  1. create a new Keynote 
  2. create a shape and style it how you want
  3. create a text box, edit and style it how you want
  4. position text box in place over shape
  5. select both text box and shape
  6. copy – “command + c“
  7. open Messages
  8. create a new Message – “command + n“
  9. paste – “command + v“
  10. drag image from Messages to Desktop

You now have a png with transparent background if you need to adjust any wording, font or reuse it you can save the Keynote and copy paste when ever you need.

 

Create shapes and layers

Firstly you have to know what type of image you want to create, remember me mentioning the scribble… yeah do that bit first. We’ll use 3 scenarios to demonstrate how this trick will help you and tonight we’ve run out of time so I’ll add the video and screenshot later this week =)

Scenario 1

You want a banner image saying “only 3 spots left!” (initially it had multiple !!! but that looked a bit crazy/desperate) and it needs to be sent to someone and put onto the flyer they’ve made. They want it so it doesn’t have that silly white rectangle around it cause it makes their flyer look cheap (like excessive !!! do).

What you normally have happen next to what you want:

what happens

So it’s something really simple and they could use Alpha to get rid of it but lets pretend they’re on a Windows machine using Word and then we’re in trouble. Normally at this stage you’ll be ready to give up cause it’s too hard. Learning Photoshop is beyond the time you’re willing to invest and there’s a person you know who can make graphics and they’ll be able to open it in photoshop and fix it.

I’ll add screenshots and a video coming soon and you will see the simplicity of the workflow and then realise how quickly and easily you could make incredible stuff.

 

Scenario 2

So lets pretend that a friend has asked me to create a new look for his Jump Page, and he wants his hover buttons to have rounded corners and writing on them with some type of simple icon as well.

video coming soon

 

Scenario 3

You have an idea and just want to test out how it will look before you open up Adobe Illustrator and start creating your vector image using the pen tool. Most likely not you reading this but it might be. So you don”t have to invest the hour or so tweaking and punching meshing and joining pathways you can knock out a quick mockup in Keynote.

You want to take a few free vector images and layer them to crete a new stylistic logo for lets say…  a student run help desk called Gravity.

Same as before only this time go to town with the layers: video coming soon

 

Additional tips

You can tweak and adjust as needed, remember if you start out creating the Keynote in a large format (1920×1080) and use the whole space up – your image might end up a high enough resolution for most purposes.

If you need specific size then just go for an upscaled ratio in the Keynote, create an empty box and enclose the shape or area you need. Once you have the oversized but in ratio PNG on your desktop, open Preview go to Tools and select Adjust Size and set it to what you need.

Sometimes you might want to create a PNG to use as a layer – creating a PNG makes it an image which means it can be resized, you’ll discover how useful this can be when you start making more complex images.

Use screenshots and Alpha a lot as they can grab the bits you want and when using them together there is an incredible range you can achieve without professional image editing tools. here are very few thing

You can just send them in Messages too, I had to mock up some ID cards and had the client on the end of a Messages conversation. I only needed to tweak on the Keynote and then paste into the message and he got each version as an image in full resolution. I ended up with a Keynote full of different options to build on if I have to do a similar project and he got instant mockups of the ideas.

If you’re using Keynote 6 and consider yourself proficient then check out the new Draw with Pen tool under the shape option. I’t so good I’ll make a post and video just for the potential it has. Combined with this and … just wow!

Accessing iBooks from online

September 12, 2013 By Skye Moroney

Just a proof of concept that uploading an iBook for parents at schools can happen as easily as a Parent iBook proof of concept download link.

How to get it working in WP

So you’re going to need to add a MIME type to your WordPress if you want to download iBooks from it =)

Go find a plugin

I’m not going to tell you to jump in and modify your function or phpconfigs – go find a plugin. I use Manage Upload Types v1.2  by Jeremy Madea you can get it by visiting the Manage Upload Type plugin site.

Once you have a MIME type configuration tool you will need to add the following type:

ibooks        application/x-ibooks+zip

It only took a little googling to find This solved my question Re: Ibooks – download website link not working on the Apple Support forums. So full kudos to v76yo who already did the hard work for us.

  • « Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Next Page »

Concern.net.au

Eyks

Copyright © 2021 Eyks 2019