Categories
Glass Resources

Beginning Glassblowing

Glass what?!

Melting solid glass into liquid, and balancing it long enough for it to solidify again – maybe puffing in some air to inflate the bubble – this is lampworking.

When you think of glass blowing, you likely think of grand furnaces with workers dipping steel handles into large vats of molten glass before puffing, shaping, and working the molten glob into a form or vessel. That’s called furnace work, or hot shop – as I’m sure you could guess – the environment is very warm!

Categories
Quick Tips Wordpress

Motopress Widget Won’t Insert into Page Content

While working on a recent customer project, I hit a roadblock using the Motopress WordPress plugin. I couldn’t get the widget, Getwid block, or shortcode to dump anything into the content section of my page. The solution was simple, though not obvious without reading their docs.

I tried a few different things, including posting a ticket to Motopress support.

In the end, the solution was simple and two-fold.

A little bit of a suggestion first: use the Gutenberg/Getwid block, as it has a sidebar interface and is simple to use. Otherwise, use the shortcode [mphb_availability_calendar] – though the shortcode requires a few additional parameters to do anything!

See the example below for an example that outputs a 2 month calendar, of availability for the Accommodation Type ID 123:

[mphb_availability_calendar id="123" monthstoshow="2"].

Step 1:

You must include an Accommodation Type ID for the Block to display results.

First: Ensure you are referencing the Accommodation Type ID in the options panel, found in the sidebar. The ID corresponds to one of the accomodation types that you have set up in the Motopress Accomodations settings. You can find the ID by opening the specific Accomodation Type and looking in the URL bar to find the ID.

In my case, the ID is 457 as seen in the URL when I open the Accomodation Type to edit it

You can find the ID of your specific Accommodation Type in the URL found in the address bar of your browser while editing that Accommodation Type i.e. 457 as seen in the URL below:

https://your-website-url.com/wp-admin/post.php?post=457&action=edit

Step 2:

This step may or may not be necessary for you. Due to the simplicity of my customers booking arrangements, we needed to check another setting in the backend in order to show availability on the calendar.

Tick this box to enable availability results without a search

Test

If you have added the Accommodation Type ID, and in some cases ticked the Skip Search Results option on, you should see the calendar of availability output on your page.

Further Troubleshooting

If for some reason, it’s still not working – or your calendar is empty, you may need to generate accommodations or complete other steps of Motopress Setup.

Categories
Hacking Repair Tutorials Video

Repairing a Puffco Peak

Problem: Puffco Peak Does Not Charge via Micro USB Port

Our Puffco came to us defective, from a friend: it wouldn’t charge. My first task was a disassembly, which you can read about here. I determined the charging circuit in my puffco was defective, and set out to solve the problem.

I reached out on Reddit after my teardown video to see if anyone had more information. Reddit user MAXVapor710 posted this:

… The other possible scenario is a bad charge controller, which requires surface mount rework on a very small component. The Charge Controller is a Monolithic Power Systems MP2615 https://www.monolithicpower.com/en/mp2615.html

These usually get very hot when they are not working correctly, easily diagnosed with a thermal cam or a sensitive finger.

We do repair out of warranty Peaks, and offer a battery replacement service, if you have any more questions let me know or email support@maxvapor.com

MAXVapor710 – Reddit – https://www.reddit.com/r/puffco/comments/e5q2y4/opening_up_a_puffco_peak_to_fix_full_teardown/

With that information, I knew I didn’t have the right tools to do a surface mount rework of the chip.

I opted for bypassing the internal charger altogether in favour of an external third party charger. There are a few choices here, and this is one of those times where you get what you pay for.

I learned from MaxVapor that this evaluation board is the correct replacement for this hack. It uses the MP2615 and has large pads to solder to, and charges the Puffco battery the exact same way that the factory circuit that has died used to.

Option 1 (Good) – DC Wall Wart aka Dumb Charger

Do you have a bin of abandoned wall adapters in a closet somewhere? Perhaps under the stairs or in the garage? Go find it and look for an AC to DC converter rated at 7.5 volts and 1 amp. Slightly higher voltage and amperage may work, but I wanted to err on the side of caution.

One of these multi-voltage adapters should work, but again mind the specs – I don’t know what might happen if the rated amperage is too high.

Multi-volt AC-DC adapter from Amazon for around $15

If either the voltage or amperage is too high, you can damage your device and the batteries – potentially leading to a fire and a new paperweight instead of a fixed Peak. Please be careful, and only proceed if you are confident in your decision.

I only suggest this solution if for some reason you already have a AC-DC adapter of the correct specifications, or cannot acquire a smart charger.

Option 2 (Better)- Smart Charger

With a smart charger, the risk of overcharging or damaging your batteries goes down a lot. These chargers measure the voltage of the battery, adjusting the amount of energy delivered to both maximize the lifetime of the battery and the safety when doing so.

A bit fancier than the other smart charger, this will tell you more about your battery.

I use a fancy charger like the one above, but this one from Amazon should work too. You will need to make an adapter to go from the charger to the barrel connector if the charger doesn’t come with one.

This is different for every charger and whichever connector you choose to add.

Option 3 (Best) – Professional Repair

If you are considering this mod, but you aren’t confident to get it done: Consider reaching out to the folks at MaxVapor for a professional repair or parts. Puffco Parts, Service, Repair, and Upgrades by MaxVapor

A representative of Max vapor is the user who reached out on Reddit with the information about which component failed. I have no other affiliation, or business experience with them – but I recommend MaxVapor based on my limited interactions so far.

The 3D Model

3D Model I created to house the DC power jack

Based on measurements I made, this model was designed over the course of a few days. It can still be improved upon, and I will happily share my working files with anyone who requests. Grab the 3D print files from Thingiverse:

The thingiverse page has two .stl files, the second file being the bottom cap for the base.

There are a few areas that require support for printing, but your printer will be different than mine – so adjust accordingly. I printed using PLA and have not had any issues with my base in the months I’ve used it.

The screw posts in the model ended up weak in my print, and eventually snapped off. This wasn’t an issue, as the tight fit of the base cover plate allows it to snap in place easily.

The Hack

Step 1: Disassembly

You will probably want to watch my first video on how to get into the Puffco body.

Step 2: Add Wires to the Positive & Negative Pads of the Main Board

Once inside your Puffco vape, it’s a simple process of adding a positive and negative wire onto the pads found on the main board. This is done using solder and a soldering iron to make a strong electrical connection.

The red wire, coming from the battery is positive (+) and the black wire is negative (-). It’s important that you lay the wires flat against the circuit board to solder them, otherwise they will be in the way when you attempt to close the case back up.

Showing the solder points
The positive lead is pictured above, on the left by the second F & C of Puffco The negative lead is not visible in this photo

Step 3: Reassemble your Peak with Wires Sticking out the Bottom

With the wires attached to the main board, you can close the plastic back up and route the wires down through the rectangular opening that remains. Do not reinstall the fancy metal plate on the bottom of your Puffco. Store it in a safe place, you don’t need it if you’re using my .stl files for the 3D printed base.

Step 4: Attach the 3D Printed Base Using Double Sided Tape

Using some double sided foam sticky tape, you can affix the 3D printed base to the Puffco and feed the wires into the housing.

Make sure you use double sided tape that has a nice puffy foam core. My .stl files are not tight enough tolerance to get a great stick with thin double sided tape.

With the new base attached, and wires sticking out.

Step 5: Solder the DC Jack to the Wires

Again, we will use solder to connect the new wires we installed to a DC barrel jack. I used this type of low voltage barrel connector from amazon:

The style of DC jack I used from Amazon.ca

Use heat shrink around any soldered connections to prevent dangerous short-circuit conditions.

Step 6: Test Your Fixed Puffco Peak

With the DC jack connected and installed, you can test your work to see if your battery still charges. I tested mine by soldering the pack directly to the board, and plugging it in to charge – only proceeding once I verified the fix would work.

Your Puffco should charge and work again!

Categories
Repair Tutorials Uncategorized Video

What’s Inside of Puffco’s Peak Vaporizer? Fixing a Broken Puffco that Does Not Charge

This faulty Puffco Peak vaporizer came into my possession within the last few weeks, via a friend of mine. I was told, “It doesn’t charge – it’s broken.”

These devices are simple, and with that in mind; there shouldn’t be too many ways for the device to fail. I just needed to get inside and start probing around with my multimeter.

The teardown video is up on Youtube now:

Step by Step Instructions: How to Open a Puffco Peak

Let’s assume you don’t need a hand in figuring out how to remove the glass from your puffco. We’re starting off with a standard Puffco Peak base – glass removed.

Step 1: Remove the Atomizer & Surrounding Components

Begin the disassembly process by removing the atomizer, bucket, and surrounding components. This can be removed as one whole piece, or disassembled and removed piece by piece. If you have done this before it makes sense, otherwise: read on.

  1. The first piece to be removed is a silicone and ceramic ring. It will lift off, and may require a twisting motion or a small amount of heat if it feels stuck.
  2. Next is the bucket. It should lift right out. If it feels stuck, apply a small amount of heat and try again. Do not force this out. The bucket rests directly atop the heating element – extract can glue it in place – and tugging on the element can damage it’s fragile connecting wires.
  3. Unscrew the metal housing for the heater by turning it counter clockwise several times to disengage the threads. Lift the entire component out of the silicone well.

Step 2: Pry the Shiny Metal Piece Upwards

Place your fingers above the USB port where the shiny material and silicone meet and pry upwards on the shiny metal/plastic piece that surrounds the Puffco Peak. This piece is glued in place, and requires a small amount of force to lift. Be careful and go slow. You may use a guitar pick or some other soft plastic prying tool to start the job if your fingers can’t get in there.

Step 3: Remove the Silicone Boot

Using your thumbs, press outwards from the center on the base of the Puffco Peak. The silicone will lift out from under the shiny metal base of the Puffco. Work your way around, breaking the seal and releasing the silicone from the bottom of the Puffco. Once the silicone boot is loose the the bottom, pry upwards from below the USB port and remove the silicone sort of like a sock, where the atomizer connection is the toe.

This is the most confusing part of this disassembly, and I suggest you watch the video starting from about the 1:00 minute mark for a video example.

Step 4: Pry the Metal Base Off

Note: In my video, I perform step 5 before step 4 – and it really doesn’t matter in the end, but I feel it’s easier in this order.

Use your fingers or a pry tool to peel the metal disc off of the bottom of the plastic Puffco Peak base. It may help to warm this area with a hair dryer or gently using a heat gun. The adhesive is fairly strong, and so some force is required to remove this piece.

Step 5: Unscrew 3 Security Screws

Use a screwdriver set like this one from Amazon to remove the three screws holding the plastic assembly together. One of these screws is below a security sticker, revealing silver ‘VOID’ markings when removed. Remove all three screws, and your Puffco will almost fall apart in your hands.

Step 6: Open and Inspect

That’s it, your Puffco Peak is open before you. In my case – I did some poking around with a multimeter and determined that my battery was not putting out a high enough voltage. I still have some detective work to do to determine why my Puffco Peak doesn’t charge.

What’s Wrong with My Puffco Peak?

The Puffco lights up, and indicates it’s taking a charge when plugged in to USB. When removed however, the battery is completely dead and the Puffco shows no signs of life. Checking the voltage supplied to the battery while plugged into USB showed only 4.5v – too low to charge a 7.4v battery pack – unless there were a buck converter somewhere on the battery pack I have yet to find.

I suspect that there is an onboard boost converter that steps USB voltage up to above 7v, and it is defective. I assume that this is the case, because when I apply 7.5v to the battery connection leads – the battery charges and holds its charge. It’s only on USB power that the device fails to charge.

Next steps are to poke around a bit more, and see if rescuing this battery back above it’s rated voltage is enough to keep it working. If that isn’t the case, I’ll be adding an external battery pack to make up for the lack of internal charge circuit.

Ideally, finding out which component has failed; and swapping it for a working one is best – but my electronics skills are limited. If anyone has input, questions or ideas – I would love to hear them in the comments below or on the Youtube video linked above.

Categories
Design Offtopic

MAD MAX: Fury Road – Art, The Dust Gun, and Preparations

While it may be old news, late is better than never. Prior to the release of the new Mad Max: Fury Road release, my sister – Elysse Melo – and I were tasked with transforming cars off the streets of Toronto into Mad Max inspired dusty works of art.

I designed and made the graphics for set decor, installing and accenting the set with custom crafted props.  The whole day would have been a flop had it not been for a few clever decisions in our planning stages.

The intent originally was to fill squirt bottles with vegetable oil, and lightly coat vehicles so that SFX dust could be sprinkled onto the vehicles. We settled on pressurized cans of canola oil cooking spray. Pre-filled and consistent, the cooking spray cans were ideal for fast and controlled application.

Sprinkling the dust was wasteful and left an uneven layer which was difficult to work with. Throwing the paper-dust at the oil-covered car worked better still, and so an idea was born.

Drawing from my knowledge and background working with air brushes, I designed and built a custom dust cannon. Our first prototype was a simple water bottle with a dip straw and air inlet in it’s side. Slow to fill, and easily jammed – it proved the concept, paving the way for version two.

The new dust cannon was not only a huge improvement in speed, but also efficiency as well. With a multi-valve setup and shop compressor – my tool was ready to make mini dust storms on queue. It looks pretty cool too.

Here’s the SFX dust cannon, made of ABS and copper:

Finished product.

To further speed the project along, I partnered with DWS Creative Imaging to craft a set of stencils and other tools to speed up the dust-painting process. With my direction, we were able to exceed all expectations – decoration far more cars than previously thought possible.

Categories
Quick Tips Resources

Gmail Alias Emails for Sorting and Filtering Before Your Inbox

“I use gmail for Enterprise, and I have the option to create quick e-mail aliases in my admin account. I love this feature, and was curious about it’s availability in standard, tradition gmail accounts. Turns out, you don’t actually have to create or setup anything for an alias. Just enter an email address in this format:
gmailusername+Notes@gmail.com

Any e-mail sent to gmailusername+Notes@gmail.com is actually being sent to gmailusername@gmail.com.

This becomes super-useful when you then create a simple filter in your gMail inbox to move any message sent to gmailusername+Notes@gmail.com to a specific folder, likely called Notes. Or just apply a specific label to these messages, whatever you prefer.

Here is the official Google article – https://support.google.com/mail/answer/12096?hl=en

Hope some of you find this useful & effective.”

Source – _aP

Categories
CSS Design HTML Javascript jQuery Open Source Resources

Sweetdeez!

Sweetdeez Image SearchJust a quick entry until I get the chance to do a full writeup – this is the tool I’m building. Basically a search engine that uses a popular social media website to get the most relevant fresh content. In conjunction with another API we gather and serve images all in an infinite scrolling gallery. This is all custom tailored through an intuitive user interface.

This project is still in development.

www.sweetdeez.com

Categories
HTML Javascript jQuery PHP Tutorials

My Calendar – WordPress Plugin Javascript Dates Issues in List View

After contacting the developer of the plugin, the whitespace issue must have occurred during file transfer or during some other mysterious occurrence. The whitespace is not in the original development code, and so not only are my line numbers all wrong, but this shouldn’t be an issue for anyone else.

While working with the plugin My Calendar by Joe Dolson I encountered a small issue. Whenever I tried to view my calendar as a list, the event list would become hidden on page load.

I had to identify the offending script that was hiding my events on me. Using Chrome’s debugger I was able to identify the offending script as “../wp-content/plugins/my-calendar/js/mc-list.js” which included:

(function ($) {
    'use strict';
    $(function () {
        $("li.mc-events").children().not(".event-date").hide();
        $("li.current-day").children().show();
        $(document).on("click", ".event-date",
            function (e) {
                e.preventDefault();
                $(this).parent().children().not(".event-date").toggle().attr("tabindex", "-1").focus();
                var visible = $(this).parent().find(".vevent").is(":visible");
                if (visible) {
                    $(this).parent().find(".vevent").attr("aria-expanded", "true");
                } else {
                    $(this).parent().find(".vevent").attr("aria-expanded", "false");
                }
            });
    });
}(jQuery));

We are interested in this line in particular:

$("li.mc-events").children().not(".event-date").hide();

Which directs all children that aren’t the date to be hidden. The issue arises when WPautoP does it’s thing and wraps the date in a <p> paragraph tag. While the .event-date will remain visible, it’s parent <p>  becomes hidden and in turn hides .event-date.

The solution is to modify “../wp-content/plugins/my-calendar/my-calendar-output.php” at line 2563 to remove the unnecessary line breaks.

I’m going to get in contact with the dev as this is the second time I’ve run into issues because of whitespace in the source code.

 

Categories
Javascript jQuery Quick Tips Resources

Track Outbound Links – Google Analytics

Goal: Use JS to automatically track outbound links that do not have a target=”_blank” attribute – in a dynamic and informative way.

Earlier in the week I was tasked with implementing Google’s Analytics system onto a fleet of websites that have different hostnames. This created many outbound links that weren’t tracked because they lacked a target=”_blank” attribute. This is a solution for websites using tools such as WordPress – and a plugin will be available eventually.  I’ve created a small snippet of Javascript/JQuery to run through a page, checking for external links – and modifying them to be tracked by Google’s servers with an onClick event. In using jQuery to solve this problem, you need to ensure you load jQuery into your page before running any of my script.

Step 1: Google’s Launch Pad – trackOutboundLink

Google has provided a function for converting a given URL into an event name for use in Analytics found here : https://support.google.com/analytics/answer/1136920?hl=en. This is standard Javascript and does not need to live within a jQuery wrapper. This function needs to be placed in the head of the document and not restricted in it’s runtime by a jQuery document.load() call.

Step 2: Checking URL Against the Hostname

Below we create a new function for comparing if a hostname is within a URL. The function takes ‘a’ and ‘b’ as variables, if unset return false, otherwise return the index position of our ‘b’ variable and check if it’s greater than or equal to index position 0. Greater than 0 means the string was found in our tested URL and will return true. Returning true implies the URL is internal, and can be left as is.

	function urlInternal(a, b) {
			if (!a || !b) {
				return false;
			} else {
			    return a.indexOf(b)>= 0;
			};
	};

Step 3: Checking and Appending Anchors

For each anchor tag on the page, we get the href attribute and run it through our urlInternal function. Note the ! before my function call, if this weren’t here we would be evaluating all of the true statements where we want false (URL is NOT internal) results only. If the URL is external, using Google’s function and some concatenation – we write the new onclick attribute.

	var $hostBaseUrl = window.location.hostname;

	jQuery('a').each(function() {
			var $this = jQuery(this);
			var $url = $this.attr('href'); 

			//console.log($url,$hostBaseUrl,$linkBaseUrl);

			if(!urlInternal($url,$hostBaseUrl)){
				var $linkBaseUrl = $this.prop('hostname');
				var	$linkBaseLocation = "trackOutboundLink('http://" + $linkBaseUrl + "'); return false;";
				$this.attr('onclick',$linkBaseLocation);
				return;
			}
		});

Summary

Somewhere in the head of your page (that you want to change the link onClick of) include this function that we can call each time we find an external link.

	/**
	* Function that tracks a click on an outbound link in Google Analytics.
	* This function takes a valid URL string as an argument, and uses that URL string
	* as the event label.
	*/

	var trackOutboundLink = function(url) {
	   ga('send', 'event', 'outbound', 'click', url, {'hitCallback':
	     function () {
	     document.location = url;
	     }
	   });
	}

Run this script before the function and you should be good to go.

jQuery(document).ready(function(){

	/**$hostBaseUrl saves the current URL's hostname for later use. Eg: on google.ca/happy/two.pdf -> google.ca is our hostname **/
	var $hostBaseUrl = window.location.hostname;

	/**Check if a, b are set variables and then check if b occurs in a - returns true or false because of >= 0**/
	function urlInternal(a, b) {

			if (!a || !b) {
				return false;
			} else {
			    return a.indexOf(b) >= 0;
			};

	};

	/**Scan through all anchor tags on the page and get their href attribute**/
	jQuery('a').each(function() {
			var $this = jQuery(this);
			var $url = $this.attr('href'); 

			/**If the link is NOT internal, get it's hostname and call Google's function to write the onclick attribute**/
			if(!urlInternal($url,$hostBaseUrl)){
				var $linkBaseUrl = $this.prop('hostname');
				var $linkBaseLocation = "trackOutboundLink('http://" + $linkBaseUrl + "'); return false;";
				$this.attr('onclick',$linkBaseLocation);
				return;
			}
	});
});
Categories
Constant Contact Marketing Quick Tips

Constant Contact – “parsererror: SyntaxError: Unexpected token <"

parsererror: SyntaxError: Unexpected token <

I ran into this error earlier today while working with a marketing client and was frustrated for a few minutes before discovering a simple solution.

The error is called when more than one tab of Constant Contact is open in your browser.

The simple solution is to close any other open Constant Contact tabs leaving a single instance running in your browser. A refresh of the page may be necessary to remedy the issue.