Category tutorials
-
upgrading to Jekyll 3 · Apr 10, 2016
I went down a š hole yesterday when I decided I wanted to try a new CSS framework. It started innocently enough, I found Siimple and figured Iād give it a try here. Siimple has SCSS files so I wanted to import them directly rather than used their minified distribution CSS. However, I got an error running Jekyll 2 when importing their SCSS. Though I filed an issue on their repo, I figured maybe it was a problem that would go away if I updated my Jekyll version. I used Chaseās handy gems-cli tool to grab the latest version of Jekyll to put in my Gemfile and, while I was at it, I updated nokogiri, kramdown, coderay, mini_magick, rake, and mechanize, too. I figure if youāre going to upgrade a gem, go big or go home, right?
-
making a Philips Hue home · Feb 14, 2016
Jon has done a great job getting our house wired up with Philips Hue lights. Iāve really enjoyed having them and with the right devices, theyāre very convenient. I love the bits of color and how much control we have over brightness compared with regular bulbs that donāt have dimmer switches. I wouldnāt have known where to get started, so I wanted to write up the products weāve bought and our experience with lights and devices.
-
Arel and tags · Jun 19, 2015
I love working out ActiveRecord and Arel queries in Rails apps. I thought Iād share some of the more fun queries Iāve designed in Arel, spread out over a few blog posts. Weāll start with one for fetching tags separated by account.
-
JavaScript as JSX in Sublime Text per project · Mar 13, 2015
Iām trying to learn ReactJS and it got tiresome for me to change my file type in Sublime Text from regular JavaScript to ReactJS > JavaScript (JSX) every time I opened a .js file. Fortunately, with a couple Sublime Text 3 plugins, I was able to get this happening for me automatically.
-
my collection of OS X Yosemite upgrade fixes · Oct 22, 2014
I upgraded from Mavericks to Yosemite on my MacBook tonight and thought Iād share some of the fixes I had to apply to get my development environment set up again. Iāll continue to update this post as I discover new things that arenāt quite working the same as before.
-
triggering events in an iframe · Aug 9, 2014
Recently, I had need to change the value of a select menu in an iframe from the outer page containing the iframe. There was a
change
event listener that had been added in the iframeās JavaScript: -
updating Jekyll to version 2 · May 13, 2014
I was excited to see the Jekyll turns 2.0.0 blog post announcing built-in support for CoffeeScript and SASS. I updated 3till7 and my portfolio to use the latest Jekyll. This in turn meant I did away with my custom plugins for compiling CoffeeScript and LESS, and moved from LESS to SASS. Here on 3till7, I stopped using the Jekyll Asset Pipeline to compile my assets and produce a combined, minified file. Using imports in my .scss files was sufficient for me CSS-wise, and my one CoffeeScript file is small enough that I donāt care it isnāt minified. I actually havenāt checked, but I wouldnāt be surprised if Jekyll 2 supports JavaScript minification like you can do with your SASS.
-
Switching from WordPress to Jekyll · Jan 21, 2014
Over the course of a little less than a week, I migrated this blog from WordPress 3.8 to Jekyll. I used WordPress for years, probably since 2005 or 2006 when I switched away from Movable Type. I finally decided I wanted something more lightweight than WordPress, and in particular I wanted a blog that would load faster. Jekyll gives me both of those. The part that took the longest to migrate was customizing the new layout, based on Dbyll, and formatting the code examples in my posts.
-
setting up WordPress mail on CentOS · Sep 13, 2012
Today at work I set up a WordPress install on CentOS Linux so that it could send email. Itās pretty useful and almost required to have this working, since if you forget your password, WordPress needs to send you an email to reset it. Thatās how I discovered mail wasnāt set up correctly, actually: a user tried to reset their password and WordPress gave an error about āemail could not be sentā, and no email was received. Fortunately it was pretty easy to fix.
-
simple slider menu with jQuery · Aug 27, 2012
There are possibly a million tutorials out there about jQuery and menus, but there werenāt a million and oneā¦ until now! ;) I recently had cause to make a sliding drop-down menu for a project at work and thought I would write up how I did it. First off, check out the demo. The commented source code is below.
-
custom WordPress Events Manager event tag archive page · Apr 7, 2012
Using the Events Manager WordPress plugin at work, I noticed that the event tag archive pages showed only current and upcoming events with a given tag. I wanted them to show all events, including past events, with the tag. I made a custom loop to accomplish this, within the Genesis framework. Create a file called taxonomy-event-tags.php in your Genesis child theme:
-
creating a custom theme based on the WebSphere Portal 7.0.0.2 theme · Jan 31, 2012
Recently at work I was tasked with creating a customized Portal theme based on the new 7.0.0.2 theme, which uses Dojo 1.6 and thus supports IE9. I followed all of IBMās steps for making a copy of the 7.0.0.2 themeās static files (the non-JSP stuff that you can access via WebDAV), but still my custom 7.0.0.2 wouldnāt load for me. I didnāt modify anything in my copy from the original except the metadata to change the theme name. When I would select my copy as a pageās theme or the Portal default theme, I would just get a white page with a snippet of XML up top, sometimes including an error message. When I checked the Portal logs, I saw error messages pertaining to PageBuilder2āwhat? PageBuilder2 is the old Portal theme, and the new 7.0.0.2 theme didnāt seem to mention PageBuilder2 anywhere. If youāre experiencing this, hereās what I did to fix it.
-
Portal 7 mobile theme installation woes · Nov 3, 2011
I hassled with trying to install the IBM WebSphere Portal Mobile Experience, following the instructions on IBMās web site, but the theme never showed up on my Portal site. Turns out you need to go into your IBM/WebSphere/PortalServer/theme directory and edit components.properties. There should be one line in there:
-
Converting a Word .docx file to a PDF on the iPad · Apr 5, 2011
In case anyone else has the need to do this, Iāll explain how I converted a .docx file to a PDF on my iPad 2. The fact that I feel the need to write a tutorial on how to do this should be a big hint to the folks at Apple that their file management system, or lack thereof, needs work. :/
-
Grub Error 13 and 17 together · Oct 12, 2009
I just encountered Grub Error 13 and Grub Error 17 for seemingly no reason. I fixed the problem and thought I could save others undue headache by explaining my fix here.
-
make your Mac listen up · Feb 4, 2008
Iām so tickled I canāt stand it. All right, so Speech Recognition stuff on a Mac is pretty darn cool by itself, but now Iāve got a nice Apple Script that opens up Safari with various tabs of my favorite sites, and it does this when I tell my Macbook āGet on it.ā Hereās how I did it:
-
Grub Error 17 · Oct 25, 2007
Note: if this tutorial doesnāt help you, possibly because
fdisk
reports your known Linux partition correctly as Linux, you might also try my Grub Error 13 with Grub Error 17 tutorial.I just had an interesting time with trying to boot into Linux on my PC. Last night, I noticed my
/boot/grub/menu.lst
file had gotten overwritten when I performed some Ubuntu updates. This meant I had to add in configuration to allow Windows to boot, and since I didnāt have a backup of my old, working configurationāmistake number 1āI looked online. I found something that looked like it would work, even though it had Grubāshide
andunhide
commands in the configurationāmistake number 2. I rebooted and successfully got into Windows. -
using Javascript and CSS to mark outgoing links · Sep 26, 2007
It may be useful to your visitors to know which links will take them off of your site without having to hover over all of them. It might also be a nice touch to mark links pointing to PDF documents, for example, with a little Adobe PDF logo. With the help of Javascript and CSS, you can do this pretty simply.
-
using AJAX to implement a live search · May 14, 2007
I recently implemented a live search on the quotes page, so I figured Iād give a tutorial on how I did it. A āliveā search is like a regular search feature, but if the user has Javascript enabled, the search will run as they type, instead of waiting for them to hit the āSubmitā button. There are a couple of advantages to this, one being that itās a bit quicker than a traditional search because it starts working immediately; another advantage is that it might help you narrow down your search better (e.g. you initially want to search for āfrogsā, but you get just āfrogā typed in and see results that interest you that wouldnāt have seen with a āfrogsā query). However, I think the main benefit from a live search is that itās cool. :)
-
using AJAX to spiff up a gallery · May 3, 2007
Lightbox is nice and all, but sometimes I find it clunky, particularly in Firefox when I have a lot of other tabs open. However, I donāt want to go the route of having an image load by itself in the browser, because it would be so much nicer to have it integrated into my layout. I could have a whole bunch of separate pages, one for each image, and do a full page load when a thumbnail is clicked, but thatās kind of a hassle. Well, with a simple PHP script and some AJAX calls, I can have my image load within the gallery page without a page reload.
-
how to reformat your pen drive · Apr 19, 2007
USB pen drives are everywhere these days, and for good reason, since theyāre dead useful. I use mine with my Linux box, my Powerbook, and various other systems Iāve had cause to stick it in. After a while, my 1 GB drive was only holding a few hundred MB. When I would do an
ls -a
on it, I would see several hidden directories, such as .Trashes and .Trash-sarah. Trying tosudo rm -rf .Trash\*
would fail out, however, giving complaints of a read-only filesystem. If youāre having such problems, or just really want to make sure your drive is clean, you can reformat it easily in Linux. I reformatted mine using Ubuntu, so the instructions have a slight bias; your mileage may vary. Warning: reformatting your pen drive will delete all its contents. -
using Perl and Apache on OS X · Mar 22, 2007
Iām trying to do some work with a Perl app on my Powerbook but I was unable to get any Perl scripts to execute from my local server. At first, I was getting just the source of the Perl files spit back at me. I followed a few tutorials about getting /etc/httpd/httpd.conf set up, but then I kept getting 403 Forbidden errors when I tried to access .pl or .cgi files in my browser. I checked /var/log/httpd/error_log and saw:
-
simple Rails preference storage · Aug 11, 2006
So youāve got some Rails application and you need to store information from the users across their interactions with the app. Hereās a simple, straightforward way to do that.
-
custom shapes in Photoshop · Aug 3, 2006
Custom shapes can be very useful for making multiple objects that look the same. For example, say you want several photos to all be cut out of the same shape, like this:
-
if succinctly · Jun 7, 2006
In Ruby,
if
is an expression, not a statement, thus it returns a value. This may not seem useful at first glance, but it lends itself to forming neat, concise codeā¦ Like most things in Ruby, actually. -
the power of yield and super · May 28, 2006
The two keywords
yield
andsuper
allow you to pass control back and forth between parent and child methods, to weave power between a more general method (in the parent class) and a more specific method (in the child class) with ease and logic. Usingyield
andsuper
effectively can help you maintain the DRY (Donāt repeat yourself) principle, keeping your code easier to maintain. -
image generation in PHP · Mar 11, 2006
Creating images on-the-fly can be a very useful skill. Using PHPās built-in image generation functions, itās pretty easy, too. This tutorial will detail how to have the titles of blog entries show up as automatically generated images.
-
ad blocking through /etc/hosts · Mar 4, 2006
There are several ad sites that youāll see being used everywhere. They slow down page loading, even on fast connections, because sometimes thereāll be lag and they wonāt load immediately and instead of being able to read that interesting news article, youāre stuck waiting for some Flash animation to show up so you can ignore it. A simple way to make those ads 1) not show up and 2) not cause delays in page loading is to edit /etc/hosts. Check out hostsfile.mine.nu for ways of doing this in Windows and Mac.
-
non-English characters in Linux · Dec 28, 2005
Itās easy to make accented characters (e.g. Ć© and Ć¼) in Linux. Easier than in Windows, actually, because in Windows you have to remember all those crazy Alt codes, and in Linux, itās logical combinations of accents and letters.
-
extracting audio from a DVD · Dec 24, 2005
Itās pretty easy to extract just the audio from a DVD in Linux, using Mplayer, sox, and either Audacity or split.
-
beginning Linux guide · Dec 21, 2005
This was taken from an email I sent to Jem and Trinity about beginning in Ubuntu Linux. It might also be useful to see my dated Beginning Linux Commands guide. Any questions about something I do or donāt have on here, as well as your own Linux tips, can be posted as comments.
-
extensionChanger.pl · Dec 18, 2005
This script will rename all files with one extension to another extension. Example: all files in a given directory that end with .php will be renamed to end with .txt.
-
enqueue and dequeue · Nov 15, 2005
Source for enqueue() and dequeue() functions to add and remove data from a queue in a class.
-
Makefile · Nov 15, 2005
In a Unix environment when working with C++ or C, a Makefile can be a very handy thing. Instead of typing several separate commands each time you update a file and want to recompile, you can just type
make
and the Makefile is executed. -
random quotes with PHP · Jun 8, 2005
So you want to display a randomly selected quote on your page, and you want to use PHP to do it; youāll need PHP support on your server. An easy way to test this is to stick
<?php phpinfo(); ?>
into a .php file, upload that file to your server, and load it in your browser. If you get a huge table with information about your PHP setup, then you know you have PHP support. If you get a blank page, then you donāt have PHP. :( -
more dynamic sites through PHP · Jun 8, 2005
A couple of reasons to use PHP in your site:
- Separation of content from designāwhen you want to change the look of your page, you can update a few files and every page of your content will be updated with those changes.
- You have more power than if you used some language such as JavaScript, because it doesnāt matter what the visitor has enabled in his browser.
-
Beginning Linux commands · Jul 5, 2004
A table of commands that were useful to me when I first began using Linux. Note that all of these may not apply to your particular distribution, configuration, etc.