Guitar Single Coil Hum Cancellation in Reaper DAW

I will updated this post once I try this out. I have some noisy guitar  parts, but they occur while I’m playing, so I need to record just the hum/noise to get a noise profile using the plugin. Very existed about this… if it works.

Thanks to Ralf Simon for the post.

https://www.youtube.com/channel/UC0-ft_XS8CwqXMJeCebWt5A

ReaFir Plugin
Mode: subtract
FFT Size: 128

While the guitar is NOT playing, check the red circled checkbox during that period to automatically record a noise profile.

 

 

 

Posted in Reaper | Tagged , , , , , | Comments Off on Guitar Single Coil Hum Cancellation in Reaper DAW

Online website scanners (malware, virus, etc.)

Not sure if these are all legit, but here’s a few I have used.

https://sitecheck.sucuri.net
https://www.siteguarding.com/
http://scanner.pcrisk.com/
https://www.virustotal.com
https://app.webinspector.com/

I also created a Norton account, and also use their services, which I’m hoping is legit, useful, accurate, etc.

https://safeweb.norton.com

Posted in Web Dev | Tagged , , , , , , | Comments Off on Online website scanners (malware, virus, etc.)

Dynamic Sender Profile

Dynamic Sender Profile

You can use personalization in your Sender Profile. You can’t use AMPscript that is set in your email template because the Sender Profile is read before the email template. You can use a content area, as that is read before the Sender Profile.

Create a dynamic sender profile and use the AMPscript function “ContentAreaByName” to pull in the content.

 %%=ContentAreaByName("my contents\From_Name_TTT")=%%

In the content area, you can use the variable print function to display your AMPscript rendered content.

%%[ 
SET @CLINIC_NAME = LOOKUP("The Name of the data ext","CLINIC_NAME","subscriber key",_subscriberkey)
SET @DOMAIN = '@yomamma.com'
SET @From_Email = Concat(@CLINIC_NAME,@DOMAIN) 
]%% 

%%=v(@From_EMAIL)=%%
Posted in AmpScript, Email Dev, ExactTarget | Comments Off on Dynamic Sender Profile

Great article: I spent 3 months applying to jobs after a coding bootcamp. Here’s what I learned.

Very interesting article…

I spent 3 months applying to jobs after a coding bootcamp. Here’s what I learned.
https://medium.freecodecamp.com/5-key-learnings-from-the-post-bootcamp-job-search-9a07468d2331#.fm5i2ipmu

Also, here’s a great list of interview questions for front-end folks:

https://github.com/h5bp/Front-end-Developer-Interview-Questions

Posted in Web Dev | Comments Off on Great article: I spent 3 months applying to jobs after a coding bootcamp. Here’s what I learned.

WordPress and jQuery AJAX … and some PHP

I had an issue where I created a custom form in WordPress using jQuery, AJAX, and PHP. Here’s a quick rundown of the process.

I created a custom WP template file with form HTML included. I created a JS script in an external file (not sure if that mattered here.). The JS listens for the form submission button click and validates the required form fields, then if it passes, “posts” the form data to a PHP script.

Everthing was working up until the PHP file came into play. The JS was not finding the PHP file, according to the console log. I read a few things about WordPress and AJAX issues, but wasn’t sure it applied. It just wasn’t finding the file.

I do know that you can’t just run a PHP script if it’s in the theme folder. Files in that folder are handled differently than a file in the root of the site. I know this because I tested this all in a root-level directory, and it worked. And, if you place a PHP file in the theme directory and try to directly run it, it will not work.

What ended up working for me was moving my PHP file outside of the WP theme. I’m not 100% sure why this worked. Did it have anything to do with AJAX? I don’t think so.

Posted in AJAX, PHP/MySQL, WordPress | Comments Off on WordPress and jQuery AJAX … and some PHP

Using “jQuery” instead of “$” in WordPress

In jQuery, the dollar sign character ($) is a shortcut used to represent “jQuery”. You can start your expressions like this:

$('.content').css('color','red');

But, other JS libraries and frameworks also use this character, so with WordPress you must use “JQuery” instead of “$”.

jQuery('.content').css('color','red');

There is a workaround where you can wrap the code in an anonymous function and still use “$”.

(function($) {
	
  $('.content').css('color','red');
	
})( jQuery );

read more…

digwp.com/2011/09/using-instead-of-jquery-in-wordpress

Posted in jQuery, WordPress | Tagged , | Comments Off on Using “jQuery” instead of “$” in WordPress

Background images in Outlook. It ain’t pretty, but it works…sort of

Bulletproof background images

Use rock-solid background images in your HTML email with some help from
VML and CSS. Why not do the same with our bulletproof button generator?

 

https://backgrounds.cm/

Posted in Email Dev | Tagged , | Comments Off on Background images in Outlook. It ain’t pretty, but it works…sort of

ExactTarget AMPscript – data extension stuff

Let’s say we want to read a data extension and get some data from it.

First we use the “LookupRows” function to get some data from the DE. We are going to assign the results to a variable (multiRows).

The first parameter of the LookupRows function is the name of the DE you want to connect to. In this example, “myDataExt”.

The next to parameters are comparing a value to a value in a particular field in the DE. It is looping through the records looking in the ID field for a value equal to “1234”. The value it’s looking for could of course be a variable. In this example, it’s just a string, “1234”.

SET @multiRows = LookupRows("myDataExt","ID","1234")

Now the variable @multiRows holds the records where the ID and “1234” match, if there were any.

You can now loop through those records and get the data in those records.

for @i = 1 to RowCount(@multiRows) do
  Set @row = Row(@multiRows,@i)
  Set @Fname = Field(@row,"Fname")
  Set @Phone = Field(@row,"Phone")
next @i
Posted in AmpScript, ExactTarget | Comments Off on ExactTarget AMPscript – data extension stuff

AMPscript – Count records in data extension, show percentages

I had a project where the client wanted the email recipient to take a simple survey by clicking on a certain link that answers the survey questions. It’s a way to fake a form in a sense.

What is your favorite holiday? (click the appropriate button below)

  • Christmas
  • Thanksgiving
  • Easter

Each button is a link to an ExactTarget hosted landing page. The link passes the users Subscriber Key, email address, and the holiday they chose.

The link would look something like this:

http://landingpageURL?sk=%%=v(@sk)=%%&emailaddr=%%=v(@emailaddr)=%%&occasion=Christmas

The landing page stores this info into a data extension.

SET @sk = QueryParameter(“sk”)
SET @emailaddr = QueryParameter(“emailaddr”)
SET @occasion = QueryParameter(“occasion”)

SET @SurveyTestDataExt = “Survey DE”
SET @message = “Thanks for your response”

SET @multiRows = LookupRows(@SurveyTestDataExt,”Subscriber Key”,@sk)
SET @CountRows = RowCount(@multiRows)

IF @CountRows > 0 THEN /*checks to make sure the Subscriber Key does not already exist in the data extension. */
SET @message = “You have already submitted a response. Thank You.”
ELSE
InsertData(@SurveyTestDataExt,”Subscriber Key”,@sk,”Email Address”,@emailaddr,”Occasion”,@occasion,”CreatedDate”,NOW())
ENDIF

The above code matches the users subscriber key with one (if there is one) in the data ext. If one exists, the page shows a message saying they have already taken the survey. If not, the SubKey, email, and holiday they chose are stored in the data ext.

Next, we look up and count how many rows exist in the DE that are for “Christmas”.

SET @ChristmasRows = LookupRows(@SurveyTestDataExt,”Occasion”,”Christmas”) /* Get Christmas records */
SET @CountChristmasRows = RowCount(@ChristmasRows) /* Get a count (number) of Christmas records */

SET @TotalRows = LookupRows(@SurveyTestDataExt,”isRow”,’True’) /* Get all records by getting all records where the field “isRow” is equal to “True”. By default, every record will have this field true. If for some reason we don’t want to count a record, we can have that record have isRow equal to False. */
SET @CountTotalRows = RowCount(@TotalRows) /* Get a count (number) of all records */

SET @Christmas_perCent = Divide(@CountChristmasRows,@CountTotalRows)
SET @Christmas_perCent = Multiply(@Christmas_perCent,100) /* Get the percentage of records that are Christmas. */
SET @Christmas_perCent = FormatNumber(@Christmas_perCent,”F0″) /* Round the percentage */

Show the results:

<h3>Poll Results:</h3>
%%=v(@Christmas_perCent)=%%% picked Christmas

 

Posted in AmpScript, ExactTarget | Tagged , , , , , | Comments Off on AMPscript – Count records in data extension, show percentages

Add menu to theme in WordPress

“header-menu” is the name of the menu. You can get that name in the Appearance / Menus section, or create a new one, or rename the default menu.

<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
Posted in WordPress | Tagged , | Comments Off on Add menu to theme in WordPress

CSS Font-Size: em vs. px vs. pt vs. percent

And the debate goes on.

 

CSS Font-Size: em vs. px vs. pt vs. percent

 

Posted in Web Dev | Tagged , , , , , | Comments Off on CSS Font-Size: em vs. px vs. pt vs. percent

Get absolute path of website using PHP

<?php
$path = getcwd();
echo "This Is Your Absolute Path: ";
echo $path;
?>
Posted in PHP/MySQL | Tagged , , | Comments Off on Get absolute path of website using PHP

WordPress asking for FTP info when trying to install plugins, themes, updates, etc.

I was having this issue with a site and the fix was to add the FTP info to the wp-config.php file. Keep in mind that I had FTP info that worked using an FTP client, but that same info did not work in WordPress when trying to install a plugin, theme, updates, etc.

The info on this page fixed it for me:

https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants

I tried first to just add the host, un, and pw info, but that didn’t work.

define( ‘FTP_USER’, ‘myun’ );
define( ‘FTP_PASS’, ‘mypw’ );
define( ‘FTP_HOST’, ‘ftp.mysite.com’ );

I then tried adding a bunch of other stuff:

define( ‘FS_METHOD’, ‘ftpext’ );
define( ‘FTP_BASE’, ‘/var/www/html/’ );
define( ‘FTP_CONTENT_DIR’, ‘/var/www/html/wp-content/’ );
define( ‘FTP_PLUGIN_DIR ‘, ‘/var/www/html/wp-content/plugins/’ );

This didn’t work either. It wasn’t until I changed the host to “localhost” that it worked.

 

 

 

Posted in WordPress | Tagged , | Comments Off on WordPress asking for FTP info when trying to install plugins, themes, updates, etc.

Does image file size in emails effect deliverability?

In trying to find info on image file size best practices, I found a few things.
ExactTarget will not host an image file over 200KB. That’s not an issue for us as we use a CDN, but something to keep in mind.

Campaign Monitor recommends a 1MB max.

Email on Acid says that in their test they found that “..image file size did not have any impact on deliverability”, but they tested a max size of only 696KB.

MailChimp recommends keeping file sizes less than 1MB. Larger files load slowly in your subscribers’ inboxes.

I heard of a study done that found that 1.2MB was the cutoff, as any larger resulted in complaints, which in turn resulted in deliverability issues. Of course there are other issues with large images when it comes to load time, but I wanted to know if that could result in deliverability issues, and apparently it can.

Campaign Monitor
https://www.campaignmonitor.com/blog/email-marketing/2016/06/creating-optimizing-animated-gifs-email/

Email on Acid
https://www.emailonacid.com/blog/article/email-development/how_does_email_file_size_affect_deliverability

Litmus
https://litmus.com/blog/a-guide-to-animated-gifs-in-email

MailChimp
http://kb.mailchimp.com/campaigns/images-videos-files/image-requirements-for-templates

Posted in Email Dev, ExactTarget | Tagged , , , , , , , , , | Comments Off on Does image file size in emails effect deliverability?

Quick Start: GSAP and Adobe Animate CC

 

Quick Start: GSAP and Adobe Animate CC

http://greensock.com/animatecc-quickstart

Posted in HTML5 Banner Ads | Tagged , , , | Comments Off on Quick Start: GSAP and Adobe Animate CC

HTML5 banners ad examples – Rising Stars

From Flite.com

Easily and quickly create IAB Rising Star units with Flite’s ready-to-use Rising Star HTML5 templates for both mobile and display. These innovative formats consistently outperform, with 2.5x the interaction rate and 2x more interaction time than traditional ad layouts.

http://flite.com/rising-stars/

Posted in HTML5 Banner Ads | Tagged , , , | Comments Off on HTML5 banners ad examples – Rising Stars

HTML5 for Digital Advertising – IAB

Guidance for Ad Designers and Creative Technologists

http://www.iab.com/guidelines/html5-for-digital-advertising-guidance-for-ad-designers-creative-technologists/

Guide:
http://www.iab.com/wp-content/uploads/2016/04/HTML5forDigitalAdvertising2.0.pdf

 

 

Posted in HTML5 Banner Ads | Tagged , , | Comments Off on HTML5 for Digital Advertising – IAB

HTML5 banners – Google Doubleclick – DCM

I am working on a banner project and just learning about this stuff. I did not create the banners, but I prepared them to be uploaded to DCM.

Here’s a tool to validate them – https://h5validator.appspot.com/dcm.

That is specifically for HTML5 banners.

There were a few issues starting out. First, the HTML files would not render running locally. This was not an issue when they were hosted on a server, or even a simple file server like Amazon’s S3. When run locally, there was a security issue with the JS that was creating the sprites. The banners were created using Adobe Animate, and the default setting is to use sprites to handle all the images. By turning this feature off, the files ran fine locally in most browsers. This was really just an issue for approval purposes. The client was not able to view them locally, so it was perceived as something was broken. The make that process smoother, I got rid of the sprites.

By removing the sprite functionality, it left behind the actual sprite image, which caused in issue when uploading to DCM, as it found a file that was not being used in the banner, and it didn’t like that. So, I went back and cleaned up the zip files, removing any unused files, which included files like thumbs.db, .DS_Store, etc.

the bigger problem was that the HTML had no clickTag functionality. It didn’t have any links to click on, and DCM requires the  use of a JS var (clickTag) to dynamically create the URL, which it later swaps out for the real URL.

I wrapped the <canvas> tag with an <a> tag like so:

<a href="#" onclick="window.open(window.clickTag);">
  <canvas id="canvas" width="160" height="600"></canvas>
</a>

I added the clickTag variable:

var clickTag = "https://www.google.com";

I was a little unsure about the wrapping a <canvas> tag with an <a>, but it worked in all modern browsers, and it validated using the validator.

 

Posted in HTML5 Banner Ads | Tagged , , | Comments Off on HTML5 banners – Google Doubleclick – DCM

HTML5 DCM (DoubleClick) banners

I had my first taste of HTML5 banners recently. These were specifically going to DCM (DoubleClick), and here is some info and resources for building and submitting banners to DCM.

  • Each creative must be a zip
  • No zips inside zips
  • The backup static must be outside the zip and sent at same time
  • There can’t be a “Thumbs.db” or “notes” files in the zip otherwise it won’t upload into DCM
  • If there are URLs in the .html file they must all be secure (https)
  • Zip must have 100 asset files or less
  • Only these types are allowed as anything else such as font files will result in not letting you upload – HTML, HTM, JS, CSS, JPG, JPEG, GIF, PNG, JSON, XML, and SVG
  • DCM ClickTag must be functional – see attached doc
  • **IMPORTANT** Before you send to _____, please test your creatives by unzipping the HTML5 creative and opening the .html in ALL main browsers (Firefox, IE, Chrome) – Please QA for loops, mouse-over, clicktag etc

 

Below are additional links for reading on HTML5 and HTML5 in DCM.

Google DCM Validator
https://h5validator.appspot.com/dcm

IAB -HTML5

http://www.iab.net/html5

 

DCM -About HTML5

https://support.google.com/dcm/answer/6176683?hl=en&ref_topic=3142581http://doubleclickadvertisers.blogspot.com/2015/07/making-it-easier-to-run-mobile-friendly.html

 

DCM -HTML5 Build Guide

https://support.google.com/richmedia/answer/2672545?hl=en&ref_topic=2672541&rd=1

 

DCM -Prepare non-rich HTML5 assets for DCM

https://support.google.com/richmedia/answer/6279525

 

HTML5 Click Tag implementation

https://support.google.com/dcm/answer/3145300?hl=en#13

Posted in HTML5 Banner Ads | Tagged , , , , | Comments Off on HTML5 DCM (DoubleClick) banners

Is object in viewport?

I can’t remember if I posted this before, so I am posting again.

This fun little script checks to see if a particular object is in the viewport.

http://codepen.io/TroyThib/pen/PPOzyv

Posted in JavsScript, jQuery | Tagged , , | Comments Off on Is object in viewport?

How To Start Your Own PHP MVC Framework In 4 Steps?

http://phpocean.com/tutorials/back-end/how-to-start-your-own-php-mvc-framework-in-4-steps/28

Posted in PHP/MySQL | Tagged , , | Comments Off on How To Start Your Own PHP MVC Framework In 4 Steps?

ExactTarget – Send Classifications

https://help.marketingcloud.com/en/documentation/exacttarget/admin/send_classifications/

Posted in AmpScript, Email Dev, ExactTarget | Tagged , | Comments Off on ExactTarget – Send Classifications

Why I DON’T hate Dreamweaver

For the most part, I don’t use Dreamweaver as a code generator or design tool. I used it to write and edit code.

These are the things I like about it. If another IDE does all this better, then I am open for changing. I have tried notepad++, sublime text, brackets, etc. and haven’t seen one that has all of these features.

  • When opening a file, it also opens all included/linked files in tabs. (CSS, JS, etc.)
  • It will render PHP includes in the code view. This is helpful when working locally with static files (not on a server).
  • color coded code
  • predictive text
  • insert HTML (table, img, etc.), PHP (includes, form variables, special characters (reg, copy, etc)
  • design view. Select element in design view and it shows DOM hierarchy, and you can go to code view and selection stays.
  • built in validator
  • find-replace
  • warns of unclosed tags
  • built in FTP
  • great built-in templates
  • works with SASS

These are some of the “cons”, and reasons people say they hate Dreamweaver:

“DW sucks big time. Sublime Text is much better.”
There’s a lot of these type of comments out there. No specifics, just “it sucks”, and what they are using is better. DW is for beginners, and REAL devs use blah, blah.

“Notepadd+ is much faster (is free) and don’t eat a lot of resources.”
This might be true, as Notepad++ is a small program and uses less RAM and other computing resources. But, it does much less too, so if a lot of the features I listed do not apply to you, then why use DW. I get that.

Dreamweaver is expensive compared to other IDEs. That is true. But that’s not what I care about, as DW is part of the Adobe suite, and I have it, and every place I’ve ever worked has it.

“Dreamweaver generates terrible code”
I don’t use it to generate code, for the most part. When I do use the tools to generate code, it is completely compliant clean code. I don’t know why people keep saying this. Many years ago I use to use DW to create JS for rollovers and other functions, so maybe for stuff like that the code is terrible, but I use it to help me write and organize code faster and easier than it would be for me to write it in a simple text editor. For that purpose, it works great. See my list above.

Posted in Web Dev | Tagged , , , , , , , | Comments Off on Why I DON’T hate Dreamweaver

Introduction to Angular.js in 50 Examples

Introduction to Angular.js in 50 Examples (part 1)

https://www.youtube.com/watch?v=TRrL5j3MIvo

Posted in Angular | Comments Off on Introduction to Angular.js in 50 Examples

HTML5 Canvas for Absolute Beginners

 

 

HTML5 Canvas For Absolute Beginners – Part 1

Posted in HTML5 Canvas | Comments Off on HTML5 Canvas for Absolute Beginners

HTML5 Banner Ads – Greensock.com

Solutions for banner ads

http://greensock.com/html5-banners

 

Posted in HTML5 Banner Ads | Comments Off on HTML5 Banner Ads – Greensock.com

Reaper :: create a MIDI track

MIDI track

Go to: Track / Insert virtual instrument on new track

Insert / New MIDI item

Double-click on new MIDI item to bring up “Piano Roll”.

You can select the MIDI itme and click “e” to bring up the MIDI editor within the timeline, as oppsed to double-clicking to bring up the isolated MIDI editor.

Posted in Reaper | Tagged , , | Comments Off on Reaper :: create a MIDI track

Pulling data from a data extension like a Relational table

Pulling data from a data extension:

Pulling data from a data extension outside of the recipient list DE.

Let’s say I have a DE that is my list of email recipeints and there is another DE with a list of data about these recipients.

In this example, there is a list of animal shelters that will receive a list of animals that came from their shelters with info about each animal.

The Shelters list has a field called SHELTER_ID which is the primary key (unique).

The Anmials list also has a field called SHELTER_ID. The field is not unique, as more than one animal can have the same SHELTER_ID.

I will relate the two lists with this field. I will get records from the Animals list where SHELTER_ID is equal to SHELTER_ID in the Shelters list.

Data Extension Names:
Animals
Shelters

First I need to initialze all the variables I will need. I need variables to hold the results of the row lookup function (@multiRows), the individual row items as I loop through the rows(@row), the loop counter(@i), and the animal name and animal breed fields (@AnimalName, and @AnimalBreed).

VAR @multiRows, @row, @i, @AnimalName, @AnimalBreed

Then, I need to query the DE to get all the rows I’m looking for.

SET @multiRows = LookupRows(“Animals”,”SHELTER_ID”,[SHELTER_ID])

The code above is looking up rows in the Animals DE where “SHELTER_ID” field is equal to the “SHELTER_ID” field in the Shelters DE. And it assigns the results to the @multiRows variable.

Next, we will loop through the rows of data held in the @multiRows varible. During each iteration of the loop we will asign the data in the fields to the variables we created (@AnimalName, and @AnimalBreed).

%%[ for @i = 1 to RowCount(@multiRows) do Set @row = Row(@multiRows,@i) Set @AnimalName = Field(@row,”AnimalName”) Set @AnimalBreed = Field(@row,”AnimalBreed”) ]%%

While the loop is still open, we will render the data to the page (email)

%%[ Output(v(@CLINIC_NAME)) ]%%
%%[ Output(v(@CLINIC_EXT_ID)) ]%%

Then we close the loop.

%%[ next @i ]%%
Posted in AmpScript, Email Dev, ExactTarget | Tagged , , | Comments Off on Pulling data from a data extension like a Relational table

Import data into a data extension using FTP

FTP data file into “import” folder

In ET, go to “Interactions / Import” and click “Create”

Name: Your choice
File Naming Pattern: This is the name of the file you uploaded using FTP. Make sure to include file extension (.csv).
Destination Type: If you are uploading data to a data extension, make sure and choose “Data Extensions”.
In the box below, select the data extension you want to import data to.

Update Type: Select

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , | Comments Off on Import data into a data extension using FTP

Adding possessive apostrophe to names – AMPscript

So we have some personalization in an email where we want to greet the recipient using their first name. In the example the first name was a pet name and the email was alerting the recipient that it was time for their pet’s shots, checkup, etc.

It’s time for Sparky’s checkup.

The works fine, but if the pet name ends in “s”, we want to just add the apostrophe and not the apostrophe and the “s”.

Let’s say your dog’s name is “Spots”.

So, we want to check and see if the pet name ends in “s”.

First I’ll make sure the pet name is in the case I want it in (upper, lower, proper).

Set @PET_NAME = ProperCase(@PET_NAME)

Then I’ll get the length of the name.

Set @PET_NAME_LENGTH = Length(@PET_NAME)

Now, let’s check to see if “s” is the last character. If it is, we’ll set a variable to hold just the apostrophe (‘). If the last character is not an “s”, we’ll set the variable to apostrophe + “s” (‘s).

IF Substring(@PATIENT_NAME,@PATIENT_NAME_LENGTH,1) == "s" THEN 
Set @PATIENT_NAME_Apostrophe = "'"
ELSE
Set @PATIENT_NAME_Apostrophe = "'s"
ENDIF

Substring(S1, I1, I2)
Returns the portion of the specified string starting with the specified character position and no longer than the specified length. If the specified character position is greater than the length of the specified string, an empty string is returned.

Arguments

S1 The string from which to return a portion
I1 The character position at which to begin the substring
I2 Maximum length of the substring

Example

%%=Substring(“abcdef”,2,2)=%%

System returns:bc

https://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ampscript_syntax_guide/utilities_ampscript_functions/

Posted in AmpScript, Email Dev, ExactTarget | Tagged , , , , , | Comments Off on Adding possessive apostrophe to names – AMPscript

Send Email Using SMTP And PHP Mailer

Nice tut:

Send Email Using SMTP And PHP Mailer

http://talkerscode.com/webtricks/send-email-using-smtp-and-php-mailer.php

Posted in PHP/MySQL | Tagged , , , , | Comments Off on Send Email Using SMTP And PHP Mailer

Email subject lines – how many characters are viewable

I did a quick test to see how many characters show in a subject line. With desktop apps and web-based email clients, it’s not too big of a deal, and the old standard of a 50 character max seems to hold true. That is for multiple reasons, but as far as the space, 50 is fine.

For mobile it’s a different story. This is not scientific, but for the Gmail app on a Samsung Galaxy S4 (Android Kit Kat) the subject line max was 27 characters with the font size set to “Normal”. Of course that changes if the font size is changed. Setting it to “Large” takes it down to 20 characters, for example.

I check it out on a friend’s iPhone 6S and that displayed about 40 characters. That was in the Gmail app also. I am not sure about the OS or the font size setting, but it looked to be the default setting.

Posted in Email Dev | Tagged , , | Comments Off on Email subject lines – how many characters are viewable

Default Track FX

Default Track FX

Click on the FX of any track. In the FX window, go to the FX tab. Choose “Save chain as default for new tracks”.

Posted in Reaper | Tagged , , , , | Comments Off on Default Track FX

Item Notes

Item Notes

You can add notes to an item by right-clicking on an item and choosing “Item settings / Item notes”.

Posted in Reaper | Tagged , , , | Comments Off on Item Notes

Reaper – Envelopes

Envelopes

You can add an envelope to a track where you will see a horizontal line that represents the volume level. You can move the line up and down to increase and decrease the volume.

Right-click on the track and choose “Toggle volume visible”. You will see what looks like a new track with the volume envelope inserted. You can hit the “V” key to toggle its visibility.

You can also move the volume line into the track itself by choosing “Move to medial Lane”.

You can also add edit points to the line by right-clicking on the line and choosing “Create new point”. You can then drag the points around to adjust the volume of different sections of the track.

Posted in Reaper | Tagged , , , | Comments Off on Reaper – Envelopes

Getting started with Reaper audio

Getting Started

Download and install Reaper

FYI – Keyboard shortcuts, file structure, etc. references are from a Windows perspective. You Mac folks are smart and will figure out how to apply it to your system.

First things first, go get Reaper from their website.

reaper.fm/download.php

Install it.

Create a new project

By default, project files are saved to Documents\REAPER Media, so if you just start recording without specifying a location for the project, the audio files will be saved there.

I would definitely create a new project first, and create a project folder in the Documents\REAPER Media folder so all your files will be organized and in one place. You can do this easily when you create your new project.

Here’s what I would do.

After you open Reaper, go to File / New Project to create a new project.

Then, go to File / Save Project As to name and save your new project.

Take note of where you are saving this project. It will remember where you last saved a file to, so you don’t want to accidentally save a new project inside another project, in in some other strange place that you will have trouble finding.

When you go to save, the “Save Project” popup will have a checkbox at the bottom that says, “Create subdirectory for project”. Check this, so it will create a folder where all of your files will be stored. Your project file and project folder will be named the same.

Set up Audio Device

Next we need to route your sounds going into and out of Reaper. You need to make sure Reaper is using the right audio device. By defaul, it will probably have the standard Windows audio devices set, so if you are using an audio interface you need to tell Reaper to use it.

Go to Options / Preferences and then select “Device” in the left column menu.

Use the drop-down menus for “Audio System” and the “Input” and “Output” devices to choose the audio device you want to use. I don’t know a whole lot about this part of Reaper, but you should see your device in the drop down list. If it’s set to “Microsoft Sound Mapper” then it will use the stock audio device that came with your computer.

Next we will create a track see if audio is getting into Reaper.

Create an Audio Track

To create a track, you can use one of three methods:

Track / Insert New Track
or
Right-click and choose “Insert New Track”
or
Ctr+T

If you name the track before you record to it, your files will have that name, and that could be helpful down the road.

Arm the track by clicking the red button at the top right of the track. Once the track is armed, if your audio device is set up properly and you have audio source going in to the device, you should see the volume meeters moving, confirming you are getting audio into Reaper.

If you are not seeing any meeters moving, there are quite a few things that could be going wrong. Check the device in prefernces again. Check that the mic/guitar/keyboard is actually plugged into your audio interface and if it has a volume control, make sure it’s turned up.

My audio device is a Delta 44 and it has a control panel that has settings for routing the audio in and out, and level settings for all, so if your device has something like that, check all the settings there.

If you’re getting into Reaper then we need to next route the audio going in and out of the track.

Most audio devices are at least stereo going in and out, so that’s left/right in and left/right out. You can choose to record a mono or stereo track, and you can decide which channel on your audio interface you want the input to come from, or output to go to.

For example, my Delta 44 has 4 ins and 4 outs, so I need to tell the track where the sound is coming from (Input 1) and where it’s going to (Output 1 and 2).

Posted in Reaper | Tagged , | Comments Off on Getting started with Reaper audio

JQuery Ajax method: POST not working Windows servers

I was trying to debug a fellow programmers code that was not working. It looked like it was not loading include files that were trying to load using jQuery’s Ajax function. I was only seeing the problem on Windows servers for some reason. I used a very small sample group, but it worked on two different Apache servers and did not work on two different Windows servers.

Specifically, the windows servers were throwing a “405 Method Not Allowed” error when trying to load the include files.

For the Ajax function, the method was set to “POST”. The fix was switching that to “GET”. I’m not sure why that worked, and not sure of the ramifications of using GET over POST, but the in this case none of the data is sensitive, so I don’t think it matters, but I will test more.

$.ajax({
method:"GET",
url:"inc/"+__W+__G+"_header.html",
success:function(dataIn){$("#headerContent").html(dataIn);
$.checkPagesToLoad("header");
}});

Posted in AJAX, jQuery, JSON | Comments Off on JQuery Ajax method: POST not working Windows servers

Adding (subject line) actions to Gmail using Schemas

You ever see those buttons in Google email subject lines? I see them mostly on Amazon.com orders where there is a tracking button right in the subject line.

Here’s how it’s done, or at least a way to test it.

Keep in mind that this won’t work until you register the domain that the email is coming from.

Google tutorial –
https://developers.google.com/gmail/markup/apps-script-tutorial

You can go to
https://script.google.com and test it.

Code.gs

function testSchemas() {
  var htmlBody = HtmlService.createHtmlOutputFromFile('mail_template').getContent();

MailApp.sendEmail({
  to: Session.getActiveUser().getEmail(),
  subject: 'Testing Gmail action Schemas :',
  htmlBody: htmlBody,
});
}

mail_template.html

<html>
<head>
<script type="application/ld+json">
{
 "@context": "http://schema.org",
 "@type": "EmailMessage",
 "description": "Check this out",
 "action": {
   "@type": "ViewAction",
   "url": "http://google.com"
  }
}
</script>
</head>
<body>
<p>This a test for a Go-to action in Gmail.</p>
</body>
</html>

Here is another Google resource for testing scripts. http://gmail-actions.appspot.com/

Posted in Email Dev | Tagged , , , , , , | Comments Off on Adding (subject line) actions to Gmail using Schemas

Change URL hash with JavaScript using location.hash

This fun little function will change the hash (#) in the URL.

In this example, I have an input element and it’s contents will populate the hash.

On the “keyup” event the “location.hash” function creates or changes the hash to the value that is typed into the text box.

<input id="hash_link_input" type="text" />

$("#hash_link_input").keyup(function(){
location.hash = $(this).val();
})

This could be helpful if you have a long page and you have anchor links associated with sections of the page, and you want the hash to change depending on what section of the page you’ve scrolled to.

Posted in JavsScript, jQuery | Tagged , , , , | Comments Off on Change URL hash with JavaScript using location.hash

Javascript Query Strings – get URL variables

Nice sweet and clean function for grabbing URL variable from CSS-Tricks.com.

Get URL Variables

Posted in JavsScript | Tagged , , , | Comments Off on Javascript Query Strings – get URL variables

Email Dev: Outlook 2007 and padding

Outlook 2007, and possible other email clients, do allow padding styles to be applied to a table cell (TD), but if you add padding one cell in a multi-cell row, the padding will affect all the cells in that row.

 

Posted in Email Dev | Tagged , , , | Comments Off on Email Dev: Outlook 2007 and padding

9 Problems With WordPress You Didn’t Know About (And How to Fix Them)

Great post from themetrust.com about WordPress security and performance.

 

themetrust.com/9-problems-with-wordpress-you-didnt-know-about-and-how-to-fix-them

Posted in WordPress | Tagged , | Comments Off on 9 Problems With WordPress You Didn’t Know About (And How to Fix Them)

How to view your server PHP settings – phpinfo()

<? phpinfo(); ?>

Posted in PHP/MySQL | Tagged , , | Comments Off on How to view your server PHP settings – phpinfo()

Sending mixed-type messages with PEAR::Mail_Mime

setTXTBody($text);
    $message->setHTMLBody($html);
    $body = $message->get();
    $extraheaders = array("From"=>"me@example.com", "Subject"=>"My Subject 7");
    $headers = $message->headers($extraheaders);

    $mail = Mail::factory("mail");
    $mail->send("best@friend.com", $headers, $body);
?>

Sending mixed-type messages with PEAR::Mail_Mime

Posted in PHP/MySQL | Tagged , , , , | Comments Off on Sending mixed-type messages with PEAR::Mail_Mime

A Complete Guide to Flexbox

A great Flexbox tutorial from css-tricks.com.

https://css-tricks.com/snippets/css/a-guide-to-flexbox/

Posted in HTML/CSS | Tagged , , | Comments Off on A Complete Guide to Flexbox

PHP – read text file and get contents

<?php

$myfile = fopen("file-to-read.txt", "r") or die("Unable to open file!");
// Output one line until end-of-file
while(!feof($myfile))
  {
    echo fgets($myfile) . "<br>";
  }
fclose($myfile);

?>
Posted in PHP/MySQL | Tagged , | Comments Off on PHP – read text file and get contents

PHP – Connect to database

Connect to database

$host_name = “dbhost.com”;
$database = “dbname”;
$user_name = “dbusername”;
$password = “dbpassword”;

$connect = mysqli_connect($host_name, $user_name, $password, $database);
if (mysqli_connect_errno())
{
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}
else echo ‘You are connected to the <strong> ‘.$database.'</strong> database<br /><br />’

Posted in PHP/MySQL | Comments Off on PHP – Connect to database

Create a JavaScript array and loop through it

Create a JavaScript array and loop through it:

var theBeatles = [
"John Lennon",
"Paul McCartney",
"George Harrison",
"Ringo Starr"
];

for (i = 0; i < theBeatles.length; i++) {
$('#myDiv').append(theBeatles[i]+'
');
}
Posted in JavsScript, jQuery | Tagged , , , , | Comments Off on Create a JavaScript array and loop through it

Scroll to ID – JavaScript and jQuery

When you have internal page links (anchor links) and you want a nice scroll effect instead the harshness of just the immediate jump-to that internal links give you, use some fun jQuery to get er done.

// scroll to ID

$(“a”).click(function() {
var URL = $(this).attr(“href”); // get the URL of the a tag you clicked on
if (URL.substring(0, 1) == ‘#’) // check for the hash # character at the beginning of the URL
{        URL = URL.substring(1); // get the URL without the hash #
if(URL == ‘top’){$(‘html,body’).animate({scrollTop: 0},’slow’);} // scrolls to the top if the URL is ‘top’
else
{
var aTag = $(“span[id='”+ URL +”‘]”);
// this matches the URL with a span tag ID. You can of course change SPAN to DIV, P, etc.
$(‘html,body’).animate({scrollTop: aTag.offset().top},’slow’);
}
}
else return;
return false;
});
Posted in JavsScript, jQuery | Tagged , , , | Comments Off on Scroll to ID – JavaScript and jQuery

Web fonts not showing up on your WordPress site?

Don’t you hate it when you spend 30 minutes on an issue, and when you finally find the answer, you go… oh yea, now I remember?

I had some custom fonts on my site that I was loading using @font-face. I had them hosted on the same server as the site, and those same fonts were working on another WordPress that was coded the exact same way (I thought).

What’s up?

I checked and double checked the code, the file paths, the server files, etc. etc. and then went to stackoverflow.com and of course the answer was there. The “doah!” moment was went deja vu started to hit and I realized that I had gone through this fun little exercise, and I had already had this issue, and already found the answer.

I just had to add this to the .htacess file:

# Apache config
<FilesMatch “.(eot|ttf|otf|woff)”>
Header set Access-Control-Allow-Origin “*”
</FilesMatch>
Posted in htaccess, Web Fonts | Tagged , , , , | Comments Off on Web fonts not showing up on your WordPress site?