Monthly Archives: December 2013

WordPress SEO Variables

A simple list of all the WordPress SEO replacement variables for creating dynamic titles / tags – updated as of Joost / Yoast’s SEO plugin version 1.4.23: %%sep%% %%sitename%% %%sitedesc%% %%currenttime%% %%currentdate%% %%currentday%% %%currentmonth%% %%currentyear%% %%date%% %%searchphrase%% %%page%% %%pagetotal%% %%pagenumber%% %%term404%% %%caption%% %%category%% %%excerpt%% %%excerpt_only%% %%focuskw%% %%id%% %%modified%% %%name%% %%tag%% %%title%% %%userid%% %%category_description%% %%tag_description%% %%term_description%% %%term_title%% %%pt_single%% %%pt_plural%% %%category%% %%tag%%

Posted in Tech Tips | Tagged | Leave a comment

How to add Google Chat SRV records on Digital Ocean

If you want to set up Google Chat, Jabber, or another XMPP client to work with Google Apps – such as Olark you will need to add some SRV records to your DNS entries. If you are using Digital Ocean it might be a bit confusing to figure out what goes where. The Google help page for documenting how to Enable chat outside Google Apps gives you a little bit of information, and olark also has a help page with details about which records to add – but there don’t seem to be enough boxes on Digital Ocean to input all of this information: _xmpp-server._tcp.YOURSITE.COM. IN SRV 5 0 5269 xmpp-server.l.google.com. _xmpp-server._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt1.xmpp-server.l.google.com. _xmpp-server._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt2.xmpp-server.l.google.com. _xmpp-server._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt3.xmpp-server.l.google.com. _xmpp-server._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt4.xmpp-server.l.google.com. – _jabber._tcp.YOURSITE.COM. IN SRV 5 0 5269 xmpp-server.l.google.com. _jabber._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt1.xmpp-server.l.google.com. _jabber._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt2.xmpp-server.l.google.com. _jabber._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt3.xmpp-server.l.google.com. _jabber._tcp.YOURSITE.COM. IN SRV 20 0 5269 alt4.xmpp-server.l.google.com. – _xmpp-client._tcp.YOURSITE.COM. IN SRV 5 0 5222 xmpp.l.google.com. _xmpp-client._tcp.YOURSITE.COM. IN SRV 20 0 5222 alt1.xmpp.l.google.com. _xmpp-client._tcp.YOURSITE.COM. IN SRV 20 0 5222 alt2.xmpp.l.google.com. _xmpp-client._tcp.YOURSITE.COM. IN SRV 20 0 5222 alt3.xmpp.l.google.com. _xmpp-client._tcp.YOURSITE.COM. IN SRV 20 0 5222 alt4.xmpp.l.google.com. Here is an example of what adding a record correctly should look like. See below for more details. So here is the trick – from that set of DNS records (above and from Olark) take the first column and … Continue reading

Posted in Uncategorized | Leave a comment

chef client linode node.cloud ipaddress workaround

The current version of the opscode chef-server and chef-client have some issues with cloud data with linode based hosts. It basically comes down to having a lot of nil values for the node attributes even though node.cloud is not nil or null This causes issues with many cookbooks which depend on these attributes being set – like nagios and mysql. the node.cloud attribute will return something like this: => {“public_ips”=>[“1.2.3.4”], “private_ips”=>[nil], “public_ipv4″=>nil, “public_hostname”=>nil, “local_ipv4″=>nil, “local_hostname”=>nil, “provider”=>”linode”} The linode ruby gem is what is not setting these attributes correctly. The error may look like: Compiled Resource: —————— # Declared in /var/chef/cache/cookbooks/nagios/definitions/nagios_conf.rb:29:in `block in from_file’ Or mysql may not start The simplest workaround that I found was to look for the linode.rb file, which on Ubuntu is located somewhere like: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.20.0/lib/ohai/plugins/linode.rb Next I commented out the functions to return if this is a linode node or not and instead added the false value: # Identifies the linode cloud by preferring the hint, then # # Returns true or false def looks_like_linode? #hint?(‘linode’) || has_linode_kernel? false end It is a one line change and can be removed later and/or will be removed by reinstalling the chef omnibus package again – hopefully by then this linode issue will be fixed. Why this works: A lot of recipes try to be smart and if a node is on a cloud platform they will try to use the internal network address instead of the external address and fancy things like that. This change tells it “hey … Continue reading

Posted in Tech Tips | Tagged | Leave a comment

WordPress 3.8 Released

WordPress 3.8 is here (ok, almost!) but you can get it now to see some of the cool stuff. After upgrading you’ll get: Welcome to WordPress 3.8 – Thank you for updating to WordPress 3.8, the most beautiful WordPress yet. Features include: Introducing a modern new design Modern aesthetic – The new WordPress dashboard has a fresh, uncluttered design that embraces clarity and simplicity. Clean typography – The Open Sans typeface provides simple, friendly text that is optimized for both desktop and mobile viewing. It’s even open source, just like WordPress. Refined contrast – We think beautiful design should never sacrifice legibility. With superior contrast and large, comfortable type, the new design is easy to read and a pleasure to navigate. WordPress on every device – We all access the internet in different ways. Smartphone, tablet, notebook, desktop — no matter what you use, WordPress will adapt and you’ll feel right at home. High definition at high speed – WordPress is sharper than ever with new vector-based icons that scale to your screen. By ditching pixels, pages load significantly faster, too. Refined theme management The new themes screen lets you survey your themes at a glance. Or want more information? Click to discover more. Then sit back and use your keyboard’s navigation arrows to flip through every theme you’ve got. Smoother widget experience Drag-drag-drag. Scroll-scroll-scroll. Widget management can be complicated. With the new design, we’ve worked to streamline the widgets screen. Have a large monitor? Multiple widget areas stack side-by-side to … Continue reading

Posted in Design, Software | Tagged | Leave a comment

How to Enable Auto Sweep with Paypal

What is Auto Sweep / Auto Withdrawl? PayPal’s Auto Sweep is a Premier and Business Account feature that electronically transfers your PayPal balance into your bank account every night via the Automated Clearing House system. It takes 3 to 4 business days for the money to post to your bank account. It’s like the PayPal Auto Withdrawl / Transfer API – except you don’t have to write any code. You can automatically transfer your PayPal balance to a bank account by signing up for Auto Sweep. It is free. Auto Sweep transfers money to your bank account every night. What do you need to use AutoSweep? To use Auto Sweep: You must have a Premier account or Business PayPal account, have a bank account linked to your PayPal account and not have a withdrawal limit. You may need to verify your account before your withdrawl limits are lifted. Important – One Caveat If you do not see the Auto Sweep option when following the next steps, you will need to contact paypal to enable it. The easiest way to do that is to login into your PayPal account and click the Contact Us link – call the 800 number, and enter the PIN number you see on the screen. How to Enable Auto Sweep Here’s how to use Auto Sweep Go to www.paypal.com and log in to your account Click ‘Profile’ near the top of the page click “My money” Hover over “More” near “PayPal balance” Click “Auto Sweep” Click … Continue reading

Posted in Tech Tips | Tagged | Leave a comment

SSH Autocompletion – Disable using /etc/hosts – brew

I use the bash-completion keg from homebrew to get better bash-completion on Mac OS X. You can install it with brew install bash-completion You can also get some information about it using: brew info bash-completion It will tell you something like: bash-completion: stable 1.3 http://bash-completion.alioth.debian.org/ /usr/local/Cellar/bash-completion/1.3 (187 files, 1.1M) * From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/bash-completion.rb ==> Caveats Add the following lines to your ~/.bash_profile: if [ -f $(brew –prefix)/etc/bash_completion ]; then . $(brew –prefix)/etc/bash_completion fi Homebrew’s own bash completion script has been installed to /usr/local/etc/bash_completion.d Bash completion has been installed to: /usr/local/etc/bash_completion.d To find out where the file that does all the work is stored, run: echo $(brew –prefix)/etc/bash_completion It will probably tell you something like: /usr/local/etc/bash_completion That file has a lot of comments in it, one of the gems being: _known_hosts_real() # Helper function for completing _known_hosts. # This function performs host completion based on ssh’s config and known_hosts # files, as well as hostnames reported by avahi-browse if # COMP_KNOWN_HOSTS_WITH_AVAHI is set to a non-empty value. Also hosts from # HOSTFILE (compgen -A hostname) are added, unless # COMP_KNOWN_HOSTS_WITH_HOSTFILE is set to an empty value. # Usage: _known_hosts_real [OPTIONS] CWORD # Options: -a Use aliases # -c Use `:’ suffix # -F configfile Use `configfile’ for configuration settings # -p PREFIX Use PREFIX # Return: Completions, starting with CWORD, are added to COMPREPLY[] The short story is that if you set up something in your ~/.bash_profile file like this: export COMP_KNOWN_HOSTS_WITH_HOSTFILE=”” #don’t use /etc/hosts for ssh autocomplete Then your ssh autocomplete … Continue reading

Posted in Tech Tips | Tagged , , | Leave a comment