Affinity blog postings

Affinity Postings - Page 4

Earliest: March 20, 2009Latest: January 20, 2021Total: 42
December 30, 2015

Getting the Browser Version

Here's another awesome use of AppleScript within TextExpander.

In the past, whenever I create a detail bug report in Jira I would mention the browser that I tested with. So, what I used to do is open up the browser go to the About window and check the version. Then enter in the data in Jira.

The problem is that this is way too time consuming and not something worth doing with every bug report or ticket validation.

Things total changed with TextExpander. Now when I need to include the version of browser I am using, I simple type in chrome.version, safari.version or firefox.version. Having this set up, gives me the ability to add the browser version to every report.

Here's what my chrome.version snippet looks like in TextExpander:

tell application "Google Chrome"
set theVersion to "Chrome:" & version
end tell

Here's a screenshot of all three browser version snippets:

Browser Snippet

You can always modify the text to say "Google Chrome" or just "Chrome." Originally when I set this up I manually typed in the browser name, but I found I was typing the same thing over and over. That's why the name is part of the snippet.

The good thing about this is that I never have to worry about what version I am using, simply by typing in my abbreviation I am guaranteed to always get the latest installed version number. (I don't have to worry about if Chrome did a silent update when I last tracked the browser version.)

This is helpful when doing Google searches too. For example, if I want to know if there's any bugs in my version; I can type in firefox.version and "known bugs" to show me any reported bugs with the version I am using.

Bonus Snippet

What's really cool is that I can combine several of these snippets and get a good browser summary. This is useful for anyone asking what browser version I currently have on my computer. In addition, I can mention in my bug report what browsers I am testing with.

Multiple Browsers

If you use Jira, you can create another snippet so that the text outputs in a Jira table format.

By using today's TextExpander tip it's very easy to display your browser information any place you need it. The good thing too is that you don't need to open up the browser to see the version!

December 23, 2015

Displaying the Browser URL

The ability to run AppleScript from TextExpander is win win situation. Here's another cool snippet using AppleScript that I think you'll enjoy:

Let's say that I find a great article on Boston.com that mentions the company that I use to work at. I decide to share some of the content to a former co-worker. So, I cut and paste the relevant text from the browser and compose a new email message with that text. Now if I want to include the URL, I would have to go back to the browser and copy the URL and then paste it in the email.

With TextExpander and some very basic AppleScript I don't have to go back anymore! I created a snippet to get the URL of the browser. Since I have multiple browsers on my computer I have a couple of snippet setup.

TextExpander URL

Here's a sample code for Chrome, don't forget to set the Content to AppleScript:

tell application "Google Chrome"
 set theURL to URL of active tab of window 1
end tell

The abbreviation that I assigned the task is very easy to remember: chrome.url and safari.url

Now where ever I want to share the URL of the page I am looking at, I just need to remember what browser I used.

What about Firefox?

Apparently Firefox removed the ability to use AppleScript in the latest version due to some technical reasons.

You can read all about the latest Apple/Firefox drama in Bug 516502 "Re-add AppleScript support for getting the current URL" bug report.

December 9, 2015

JavaScript for OS X Automation in TextExpander

JavaScript for OS X Automation

This week's tip is a brief example of how to use JavaScript for OS X Automation in TextExpander. TextExpander started supporting JavaScript for OS X Automation or (JAX) in version 5.0.

JavaScript for OS X Automation is Apple ways of opening up key Applications to create tiny time-saving Applications. You don't need to be a programmer to appreciate the power of this new functionality in OS X Yosemite.

I'll show you how to set up a simple TextExpander Snippet to view a Jira ticket with whatever text is in the clipboard. This is a quick way to view a ticket if you don't have a link to click on.

Create the following JavaScript Snippet in TextExpander:

Browser = Application("Google Chrome");
window = Browser.windows[0];
window.name();
myclipboard = "https://company.atlassian.net/browse/" + "%clipboard";
tab = Browser.Tab({url:myclipboard});
window.tabs.push(tab);

Note: This particular snippet is using Google Chrome, you can change the browser type to 'Safari' or 'FireFox' if you would rather use those browser types.

Change the Atlassian URL to whatever the URL that your company is currently using for their Jira installation.

I assigned '.doit' as the abbreviation, so its unique and simple to remember.

Now when I get an inquiry about an issue via Slack, I just copy the issue number and type in the abbreviation. Google Chrome opens up a new tab and the Jira page is displayed.

This is a very simple implementation, but what's cool is that I can easily modify this to open up multiple tabs to do something else. For example, I can easily open up two tabs to handle the same query. So I could search for something in Jira in one tab and at the same time have another tab search Papertrail for the same clipboard data.

I am excited to see JAX implementation in TextExpander. I believe that there's a lot of opportunities to make me more productive.

November 27, 2015

Black Friday

AmazonFriday.jpg

Today is Black Friday. The day that most retailer hope to make or break there year. At least that what it use to be. That really isn't true any more. Today isn't the busiest shopping day of the year.

According to very useful Infographic on ShopperTrak, the busiest shopping day in 2014 was Super Saturday, which is the Saturday before Christmas. The second busy day was the Day after Christmas, while 'Black Friday' rounds out the top three. According to the report, 7 of the 10 busiest shopping days of 2014 fall in December.

No need to panic if you didn't find your deal today. There's always 'Cyber Monday' which isn't included in the latest ShopperTrak Infographic. It could be bigger numbers than some of the Saturdays in December.

CyberMonday also means unproductive Monday. Try not to schedule any important meeting around lunch time as most people might be using the time to check emails and their Twitter feed for deals. Hey if you did see one, make sure to spread the word!

I would recommend putting interesting things in your shopping cart in Amazon and check often to see if the prices go down over the next few days. I just used Evernote Web Clipper to get a snapshot of my cart. That way I know if I am really getting a good deal.

Another solution is to use Camel Camel Camel and it's Chrome Extension to track pricing trends on various products, such as game consoles, cameras and USB Flash Drives.

September 24, 2015

Google Alerts Thumbnail

I get a Google Alerts every day on different topics that I am interested in, such as '1080p Camera', 'Firefox', 'Chrome' and 'Huntington Ave Boston.' I have the Huntington Ave as an alert because it's the street where I work. I find it useful to know if there's anything interesting around my area.

In the past I learned about when Five Guys got their permit and when someone one famous was signing thier books at the Prudential Center Barnes and Noble.

Today I saw this piece of news with a thumbnail image that doesn't quite fit the story:

BostonGlobeStory

Check out the Google Alerts, and set up a daily notification of something interesting in your neck of the wood.

April 24, 2014

Portal icons

On any given day there are 5 core sites that I frequently visit for business. At any given time, I'll have three different browsers open. I switch between Chrome, Firefox and SeaMonkey.

To make going to my regualar sites super easy, I created a website portal page. On the top of the page are some graphics that have links to the various sites. I configure all my browsers settings so that it always opens to the portal page. Now I don't have to worry about setting up bookmarks, its very easy to add future sites that I may need to use.

PicMonkeyJiraTestlinkBrowserstackPapertrail

PicMonkey is one of the best online photo editing tools. The company was founded in April 2012 by two former Picnik engineers, Brian Terry and Justin Huff. PicMonkey has lots of really cool filters, frames and effects that will make any image stand out.

JIRA is the tracker for teams planning and building successful products. Thousands of teams choose JIRA to capture and organize issues, assign work, and follow team activity. At your desk or on the go with the new mobile interface, JIRA helps your team get the job done.

TestLink is a web-based test management system that facilitates software quality assurance. The platform offers support for test cases, test suites, test plans, test projects and user management, as well as various reports and statistics. This is a perfect solution for companies that can't afford HP Quality Center.

BrowserStack is a powerful platform for testing web sites against the most current and modern browsers. This is a great low cost solution when you need to test websites across multiple browsers and platforms.

Papertrail is a time-saving log tools, flexible system groups, team-wide access, long-term archives, charts and analytics exports, and alert monitoring. Great for when multiple members of an Engineering team needs to access server logs.

Feel free to take any of the above images and use them on your Internet or Intranet sites. If your looking for ideas for additional portal buttons or how to build a personal Intranet site, drop me a note.

April 10, 2014

Macintosh Spyware

Macintosh users should be aware of any file that from gophoto-it. This is a pretty bad hijacking software and will control Chrome, Safari and Firefox on your computer.

If you have been experiencing any strange behavior when your clicking on any websites, such as strange popups saying you should install an update utility software you may have a bad browser extension. You should see if you may have inadvertently installed the gophoto-it software.

Basically what 'GoPhoto.it' does is add an extra bit of code to every webpage you load in your browser and they can manipulate what you do. For example, you may want to go to product page on Amazon.com, but GoPhoto.it will send you to another page or product on Amazon.

Here's a sample of the code in the page: (Click for the full size version.)

Don't be fooled! You don't want to have this software on your computer. This is really bad spyware and should be removed. Here are the simple steps on removing the extension that get's installed:

In Firefox:


In the software installer is a credit.rtf file with the above contents. Satisfied now that this isn't legit software?
  1. Click Shift-Command-A to open Firefox Add-Ons.
  2. Click on the Extensions on the left side
  3. Look for anything that says, GoPhoto.it and then click Remove
  4. Restart Firefox

In Chrome:

  1. Under the Windows menu, select 'Extensions'
  2. Look for anything that says, GoPhoto.it and then click on the trash can
  3. Restart Chrome

In Safari:

  1. Under the Safari menu select Preferences
  2. Click on Extensions on the Top Bar
  3. Look for anything that says, GoPhoto.it and then click on the Uninstall button
  4. Restart Safari


August 20, 2013

PicMonkey

Thanks to the technology changes with HTML 5 and CSS 3, the web browser can do a lot more than just serve up web pages. Developers have been busy making Chrome and Firefox an essential tool for everyday needs, and in some cases replacing desktop applications.

If your doing any photo changes for the web, you should look into PicMonkey. The services is free for basic usage, or you can upgrade and get access to additional components. What makes PicMonkey great is that you can create different types of collages. This is great when you want to show lots of image in a single image.

When you create a collage, you can select the number of images you want and how to display it in the collage. PicMonkey has the ability to edit the image within the collage, you can zoom in or re-touch the photo. Other web editors don't allow you to do.

Once you change and manipulate your image, you should use Yahoo's Smush.it to reduce the image size for emails and websites. Smush.it reduces the size without sacrificing on the quality of the image.

There's lots of Web 2.0 tools out there, you can check out Web 2.0 Tools over at Scoop.it! They have a blog of all sorts of creative tools that you can tap into to make your task much easier.

March 4, 2013

Windows 7 unable to access Facebook

This weekend I was trying to debug a Windows 7computer that was not able to access certain websites, such as facebook.com, nytimes.com and cnn.com. This only happened to the desktop computer and no other computer on the network. When I tried ping nytimes.com on the desktop computer, this is what I got:

Pinging nytimes.com [170.149.168.130] with 32 bytes of data:
Reply from 144.24.124.100: Destination host unreachable.

I searched around online but didn't see anything that would help. I checked the virus status, using SpyBot and Microsoft Malicious Software Removal Tool and they didn't find any issue. The host file, and Firewall connections did have any IP address or websites blocked. Nothing came up as the root of the cause. There's nothing in the Event Logs that would explain why the site was blocked.

I also cleared all the cache files from all the browsers, Firefox, Safari and Chrome and it didn't make any difference.

I even tried resetting the TCP/IP stack, as per suggested by Microsoft:

ipconfig /flushdns
nbtstat -R
nbtstat -RR
netsh int reset all
netsh int ip reset
netsh winsock reset
REBOOT

One thing that I did notice when I used Fiddler2 was that when I would try to access facebook.com, it would hang at fbstatic-a.akamaihd.net. There's no logical reason to why this is happening.

I am still looking into the cause, but one interusting bit is that when the computer was taken to Best Buy's Geek Squad, they had no problems accessing the Facebook sites. Which is weird, because this issue is specific to this computer. No other computers on the network encountered this problem.

The search goes on. One possible solution would be to install Windows 8, but we're not sure if that would really solve the problem.

April 12, 2012

Send to Kindle

Have you ever browse the web and found an article that you would like to read at a later time on your Kindle? For example, let's say you found a great article about Who really found the Titanic? and you wanted to read it offline on your Kindle. There is an easy way to get web content onto your Kindle.

There is app called, 'Send to Kindle' that makes it really easy to send Web content to your Kindle. You can setup this App in Chrome or Firefox very quickly. What's great is that anytime you find an article that you want to read later on your Kindle, you simply click a button. You just have to remember to sync your Kindle before heading out.

I find it great for researching CSS3 topics or when I find a long article and want to read it on the train. Here are some resources where you can find some good content to read:

You can be creative in your Google/Bing search too:

  • Project Blue Book - You heard of it? But have you actually read it?
  • Lincoln Conspiracy
  • JFK Umbrella man
  • Missing Gold of Atlanta
  • Unsolved Mysteries of Boston

As you can see there's a lot of cool content out there, you won't have to worry about buying books on Amazon.com. Try 'Send to Kindle' out and you'll find it to be a great productivity saver.

From the product description page:
Send to Kindle is a Browser extension for Kindle owners who prefer reading web content on their devices. It?s designed to offer a quick way for pushing web content to Kindle, so you can read articles or news later on your device.

You can download the app here:
http://www.klip.me/