SuperGeekery: A blog probably of interest only to nerds by John F Morton.

A blog prob­a­bly of inter­est only to nerds by John F Mor­ton.

How to re-add Github key to a server

What Did I Just Do?

Note to self: Don’t erase your knownhosts file. (head­slap!) I pro­vi­sion servers with Lar­avel Forge and messed up my deploy­ment from Github recent­ly. I was mess­ing around in the .ssh fold­er on my serv­er and delet­ed the known_hosts file. The next time I tried to deploy my code base from Github though, I got the fol­low­ing error. Host key verification failed. fatal: Could not read from remote repository. I need­ed to get… + read on

    Craft CMS: A bigger Plain Text” field.

    I inher­it­ed a Craft CMS site that I now main­tain for a new client. When you inher­it oth­er peo­ple’s code, you need to see the project from their POV to get an under­stand­ing of they see things work­ing. Luck­i­ly Craft seems to encour­age log­i­cal struc­tures being built so I’ve not had too much trou­ble get­ting up to speed on this site. One of the prob­lems I did run into was with a sim­ple Plain… + read on

    How to use HandBrake’s queue feature to convert multiple videos.

    You like videos, right? Then you’re prob­a­bly famil­iar with Hand­Brake, the open source video con­ver­sion tool. Encod­ing a sin­gle file is pret­ty straight­for­ward, but the pro­gram has the abil­i­ty to set up a cue and go through a bunch of shows while you are away from your com­put­er. Here’s a quick video walk­through on how to use this fea­ture I put togeth­er for a friend.

      Tutorial: Using Gulp with htmlprocess and concatenate

      I’ve been teach­ing myself Gulp recent­ly. I found the basics easy to pick up. Although I didn’t con­sid­er myself a Grunt expert, I’d taught myself Grunt pre­vi­ous­ly and that helped with me with Gulp. Before we go fur­ther, check out the GitHub repos­i­to­ry that con­tains the fin­ished exam­ple project we’ll go over here: https://​github​.com/​j​o​h​n​f​m​o​r​t​o​n​/​u​s​i​n​g​-​g​u​l​p​-​h​t​m​l​p​r​o​c​e​s​s​-​e​x​ample One thing I have seen in both Grunt and Gulp work­flows I’ve used from their repos­i­to­ries was a script… + read on

      Automate daily database backups with crontab and SFTP and be the master your domain.

      Daily_Backup_Cron_Job_Opt

      I recent­ly worked on a site which saved data in it’s local data­base which need­ed to be col­lect­ed and sent each day to a remote serv­er via SFTP for analy­sis. Need­less to say, I didn’t want to man­u­al­ly do this process every day, but I had nev­er ful­ly explored cron jobs, so I had to teach myself about cron jobs while I fig­ured out the prob­lem at hand. Here’s how I end­ed up automat­ing… + read on

        Google Analytics, Ghostery, and Event Tracking

        At the time I write this post, Google Ana­lyt­ics has a new ver­sion in beta called Uni­ver­sal Ana­lyt­ics”. It’s basi­cal­ly Google Ana­lyt­ics ver­sion 3. This means that code you may have relied on dur­ing the ver­sion 2 of Google ana­lyt­ics may no longer work. Google sug­gests that all new projects moved to ver­sion 3 now. It does offer real time” ana­lyt­ics, so you can see who is on your site at that very moment.… + read on

          Use a cookie to iterate between visits with PHP.

          Here’s a small code snip­pet that I use to incre­ment a val­ue between vis­its using a PHP cook­ie. I use it, for exam­ple, when I have 3 dif­fer­ent images that could go on a page, and I want to serve up the next one in the sequence on sub­se­quent vis­its to the page. I just use the “$num” where appro­pri­ate. You can edit the 2’ in line 14 to change the wrap around val­ue… + read on

            MAMP and Navicat and Character Set Hell.

            I’ve used Nav­i­cat for years. I’ve used MAMP Pro for years. Both tools are must-haves as far as I’m con­cerned, but I had been hav­ing prob­lems with spe­cial char­ac­ters being cor­rupt­ed for near­ly 6 months. Every curly quote, m‑dash or umlaut was tor­tur­ous. Briefly, the prob­lem was that those spe­cial char­ac­ters (like curly quotes) would be changed to ques­tion marks in my data­base after I had migrat­ed it to or from my local devel­op­ment… + read on

            Auto Print an HTML Page

            Burger_Auto_Print_620X208

            I recent­ly worked on a project for a client who want­ed to allow a user to view and print sev­er­al recipes direct­ly from a Flash ban­ner. There were oth­er ways of inter­act­ing with the recipes, like email­ing, shar­ing on Face­book, and shar­ing on Twit­ter. (I don’t go into those oth­er things in this post, but you can find me talk­ing about how to do things like that else­where on SuperGeek­ery.) The client also want­ed… + read on

              Untangling MX: Setting up DNS records for a web site with different mail server.

              Dns_Tangle_640X200

              I recent­ly had to set up an MX record for a client and although I’ve set them up before, it sud­den­ly made sense to me in a way that it hadn’t before. Per­haps my sto­ry will help some­one else have a sim­i­lar epiphany. Basic name serv­er set up. My client had their site and their mail all han­dled by the same serv­ing com­pa­ny. This meant their name serv­er records were basic. There were 3… + read on