Camera With Pincers http://blog.benlk.com cat /dev/urandom Tue, 20 Aug 2013 01:29:16 +0000 en-US hourly 1 http://wordpress.org/?v=3.6 Setting up a Raspberry Pi without a monitor http://blog.benlk.com/2013/08/20/setting-up-a-raspberry-pi-without-a-monitor/ http://blog.benlk.com/2013/08/20/setting-up-a-raspberry-pi-without-a-monitor/#comments Tue, 20 Aug 2013 01:29:16 +0000 admin http://blog.benlk.com/?p=149 This tutorial presupposes that you’re using Raspbian Wheezy.

  1. Install Raspbian Wheezy on your SD card by following these instructions.
  2. Open the SD card’s root partition, the one not namedboot.
  3. Open /etc/networking/interfaces in a text editor.Find this line:iface eth0 inet dhcp

    Replace it with this:

    iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0

    This sets your static IP address to 192.168.1.100. Change that if you want. Don’t mess with the netmask.

  4. Open /etc/resolv.conf.Find this line:nameserver 192.168.1.1

    Replace it with this:

    nameserver 8.8.8.8

    This sets your DNS nameserver to Google Public DNS. There are other nameservers out there, but Google is robust.

  5. Eject your card and put it in your Raspberry Pi. Connect it to the same network as the computer you want to ssh into it from and power it on.
  6. ssh pi@192.168.1.100 or the appropriate IP address. Success!
  7. Do whatever else you want to do to your Pi.
]]>
http://blog.benlk.com/2013/08/20/setting-up-a-raspberry-pi-without-a-monitor/feed/ 0
Gannett: Week 9 http://blog.benlk.com/2013/08/09/gannett-week-9/ http://blog.benlk.com/2013/08/09/gannett-week-9/#comments Fri, 09 Aug 2013 20:13:14 +0000 admin http://blog.benlk.com/?p=144 This summer’s internship is over, but the project isn’t finished. They’re close. The only obstacle preventing launching the new website Monday is transferring the domain name, which requires OSU to review some paperwork.

The current estimate of The Lantern’s launch is August 30, during the first football game.

This week:

  • added categories for photos and Buckeye TV
  • uploaded the classified section
  • uploaded the interactives directory, including timeline stories made by Liz Young and myself.
  • wrote documentation for editors on:
    • posting new stories
    • uploading images
    • creating users
  • transferred some old stories from the old website to the new
  • handed the rest of the transfers off to Jay
  • set up email blast signup and un-signup forms
  • gave OCIO the email blast template for testing; received praise from our OCIO contact about the email template tool I wrote.
  • posted the Involvement Fair ad
  • various small CSS tweaks for readability and style
  • fixed the search bar’s placeholder text not actually being a placeholder

I’ve turned in documentation and the list of outstanding issues, and will be gathering my work into a portfolio.

This internship has been a tremendous learning experience. I’ve picked up some PHP and Js, have expanded my knowledge of CSS, adopted Bootstrap, learned some of the ins and outs of WordPress, and gained new appreciation of the planning fallacy.

Outside of this project, I’ve been putting CSS skills to work on creating (as-yet-unpublished) themes for the Dropplets blogging platform. I also have some projects planned that would use my new PHP knowledge. And once Bootstrap 3 settles into a release format, I plan on creating some themes for that.

 

]]>
http://blog.benlk.com/2013/08/09/gannett-week-9/feed/ 0
Gannett Week 8 http://blog.benlk.com/2013/08/02/gannett-week-8/ http://blog.benlk.com/2013/08/02/gannett-week-8/#comments Fri, 02 Aug 2013 18:48:31 +0000 admin http://blog.benlk.com/?p=142 Next week is the last week of internship work before I leave town for a week. The site will need to be ready by then.

What I did this week:

  • Solicited feedback from design editors on the site design. 
  • Created a webpage comparing various site design tweaks.
  • Solicited feedback from design editors on the YouTube sidebar plugin, and chose one.
  • Fixed theme so older posts would pull and embed images from the correct folder.
  • Enabled Akismet comment spam filtering, which required talking to corporate to get external API queries enabled. (This also affected the YouTube and Twitter plugins.)
  • Featured posts are now documented.
  • Miscellaneous CSS tweaks.
]]>
http://blog.benlk.com/2013/08/02/gannett-week-8/feed/ 0
Gannett: Week 7 http://blog.benlk.com/2013/07/26/gannett-week-7/ http://blog.benlk.com/2013/07/26/gannett-week-7/#comments Fri, 26 Jul 2013 20:54:13 +0000 admin http://blog.benlk.com/?p=140 The general layout of the new thelantern.com is done! I finished adding the required pages and creating the menus on Monday, and on Tuesday added the coloration CSS rules for the top navigation.

There was an interesting bug where individual story contents would not show in the individual-post pages. It turned out that the function do_sociable() wasn’t defined, and so the page was failing and aborting at that point. Because of this, sidebar and footer weren’t being sent to the browser. I fixed this by removing references to that plugin in the template.

Instead of Sociable, I’ve installed 2-Click Social Media Buttons, which protect reder privacy while still allowing sharing. I may change the plugin, though, because that plugin does not perform well when called twice on the same page. Chris Schwartz, who developed the WordPress theme for The Lantern, said that research shows that many people share the story before even finishing reading it, meaning that it’s good to have sharing buttons near the top.

I don’t like how the theme has a grey background and small text for the story, so next week, once I get the widget situation figured out, I’ll ask Dan and the design editor about making the story background white and the font bigger.

]]>
http://blog.benlk.com/2013/07/26/gannett-week-7/feed/ 0
Gannett: Week 6 http://blog.benlk.com/2013/07/19/gannett-week-6/ http://blog.benlk.com/2013/07/19/gannett-week-6/#comments Fri, 19 Jul 2013 20:50:47 +0000 admin http://blog.benlk.com/?p=138 The WordPress database for the new site has been imported. At this point, the site could go live tomorrow if it really needed to.

However, there’s still a lot of work to do before it’s truly ready. I’ve only just started copying the settings over from Jay’s development site. Settings configuration was disrupted Thursday by a sudden 500 error, which appeared to be a plugin misconfiguration or a .htaccess problem. I had asked for FTP access to the server on Wednesday, and received it Friday. Turns out that the problem was a bad .htaccess – the site had been set up and configured in /wordpress/, but someone moved it to /, resulting in WordPress not being able to find any of its parts. One .htaccess edit later, and the site was back.

Next week entails getting all the settings done and convincing someone to regex the MySQL database to fix the links to the photos.

]]>
http://blog.benlk.com/2013/07/19/gannett-week-6/feed/ 0
Gannett: Week 5 http://blog.benlk.com/2013/07/12/gannett-week-5/ http://blog.benlk.com/2013/07/12/gannett-week-5/#comments Fri, 12 Jul 2013 21:59:07 +0000 admin http://blog.benlk.com/?p=136 I finally have server access!

Things were getting a little tense this week as some promised dates were set and fell with no progress, but Wednesday brought the server’s IP address and some modifications to my /etc/hosts file.

The IT folks with Gannett got the server set up this week, and are in the process of migrating our database into the WordPress install. (They need to modify PHPMyAdmin’s config so it will accept file uploads of up to 512 MB. Our database contains more than 10 years of posts.)

Once the import is done, I’ll get to work on the site’s theme, and then The Lantern will have its new website.

 

]]>
http://blog.benlk.com/2013/07/12/gannett-week-5/feed/ 0
Gannett: Week 4 http://blog.benlk.com/2013/07/05/gannett-week-4/ http://blog.benlk.com/2013/07/05/gannett-week-4/#comments Fri, 05 Jul 2013 20:54:44 +0000 admin http://blog.benlk.com/?p=132 The email template tool has progressed satisfactorily from last week. I haven’t shown it to the editors yet, but Dan Caterinicchia (The Lantern’s faculty advisor) and Jay Smith (The Lantern’s production manager and webmaster) have seen it and approve.

I’ve posted the email template tool to f.benlk.com, and If you’re interested, click there to view it. You can also check out a sample of all the current layout options.

The next milestone for the template tool will be adding an option to remove the bottom sidebar ad if none has been bought, allowing for full-width posts on the bottom.

Still no access to the server for the new website.

]]>
http://blog.benlk.com/2013/07/05/gannett-week-4/feed/ 0
Gannett: Week 3 http://blog.benlk.com/2013/06/28/gannett-week-3/ http://blog.benlk.com/2013/06/28/gannett-week-3/#comments Fri, 28 Jun 2013 20:52:51 +0000 admin http://blog.benlk.com/?p=129 Still no server access, but the email blast and its authoring tool are coming along well. I’ve spent less time on Codecademy this week than I’d've liked, but that’s because the authoring tool was completed this week. I haven’t put it online yet, but it allows the Lantern’s editors to choose between a few different formats for the top story of the page.

The worst bug I encountered this week was a lone, unclosed [

Brains aside, I wonder how many poorly-written xkcd.com-parsing scripts will break on this title (or ;;

The authoring tool is set up to take the email blast template, but I'm waiting for final approval from the Lantern's editors, my supervisors, and myself before I throw the email template's HTML into the variables of the JavaScript powering the authoring tool. Right now, all it does is generate test code:

From: "The Lantern" 
To: <%to%>
Subject: 
X-BulkMail-Envelope-From:  
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_foo"

This is a multi-part message in MIME format.


--Boundary_foo
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT





open table for ad
	Image = http://f.benlk.com/edu/Lantern/email-files/ad-728.jpg
	Link = http://www.thelantern.com/advertise-with-the-lantern
close table for ad

email table top
	button bar tr
	lantern header tr
	topstory tr opening HTML
	Text-only top story:
		Headline: 
		Link: 
		Blurb: undefined

	topstory tr closing HTML
	Middle ad
		Image = http://f.benlk.com/edu/Lantern/email-files/ad-468.jpg
		Link = http://www.thelantern.com/advertise-with-the-lantern
	Bottom table top
		Bottom table left column top
		#2-title,#2-url,#2-blurb
			Story 2 title: “”
			Story 2 url: 
			Story 2 blurb: 
		Bottom table left column bottom
		Bottom table right column top
			Bottom table right sidebar ad
				Image = undefined
				Link = undefined
		Bottom table right column bottom
	Bottom table bottom
Footer, including links to Lantern contacts and advertising



–Boundary_foo–

]]>
http://blog.benlk.com/2013/06/28/gannett-week-3/feed/ 0
Gannett: Week 2 http://blog.benlk.com/2013/06/21/gannett-week-2/ http://blog.benlk.com/2013/06/21/gannett-week-2/#comments Fri, 21 Jun 2013 20:56:54 +0000 admin http://blog.benlk.com/?p=124 The server for the new Lantern website is not yet ready, so I’ve been working on other things, specifically the template for the email news blast, and a tool to help editors author it.

Along the way, I’ve brushed up on my CSS and HTML, and have picked up a bit of PHP and jQuery from Codecademy. My progress can be seen on my Codecademy profile.

The tool I’m working on for authoring the email blast has form and some functions. It has the option to create an arbitrary number of stories, and then use those to generate the HTML of an email to be fed into OCIO’s Bulkmail system.

So far, the generation is the problem. I’m getting better at JavaScript and jQuery, but I suspect that I shall end up taking the Codecademy JavaScript course.

I’ve also learned about and made use of the Twitter Bootstrap CSS library in my email template tool.

]]>
http://blog.benlk.com/2013/06/21/gannett-week-2/feed/ 0
Gannett Internship http://blog.benlk.com/2013/05/21/gannett-internship/ http://blog.benlk.com/2013/05/21/gannett-internship/#comments Tue, 21 May 2013 22:10:22 +0000 admin http://blog.benlk.com/?p=120 This summer, I’m going to be working an internship for my home paper The Lantern and their parent company, Gannett, on porting thelantern.com to WordPress. A short but reasonably detailed list of what needs to be done this summer:

Main theme setup:

At the start of the internship, I will be given access to a Gannett-hosted server with the database filled with stories, but no theme.

  1. Add the wp-davinci theme from 140.254.50.136/thelantern and put on the new server.
  2. Configure wp-davinci using settings from 140.254.50.136/wordpress
  3. Add the requisite code (from Jay’s email) to the theme so that images show up.
  4. Colorize the top menu, using the CSS hacks from 140.254.50.136/wordpress

Mobile theme configuration or setup

Depending on what Gannett wants done:

  • Edit the new wp-davinci theme for better readability and functionality on mobile devices, and decrease the number of articles on the front page of thelantern.com, or
  • Install and configure a mobile theme plugin.

This is to address Gannett’s concerns about the length of the front page on mobile devices.

Email blasts

This part of the internship will require the most time and learning on my part. Email blasts are weekly (and arbitrary) emails sent to The Lantern’s subscriber list. Roughly 30,000 people receive these emails, which are currently composed in College Publisher Pro.

I’ll create an email-blast-composition workflow, which will require much research into the viability of WordPress plugins, HTML templates, and possibly creating a tool from scratch.

Permalinks

When I moved benlk.com from WordPress to Pelican, I had to address the issue of broken links. I solved this by using htaccess and mod-rewrite, but that manual conversion process took an hour for only ~30 pages. The Lantern has thousands of pages, and I’m not sure what options are available. More research.

Teaching editors the new site

Towards the end of the summer, I’ll begin teaching editors the new website and the new work flows. This will take time, but they all took Nicole Kraft’s journalism courses, which covered the basics of WordPress. This will only build on that.

SEO and Google Analytics stuff

Just need to make sure that the Google Analytics and other SEO code snippets migrate to the new site.

]]>
http://blog.benlk.com/2013/05/21/gannett-internship/feed/ 0