Updates from February, 2013 Toggle Comment Threads | Keyboard Shortcuts

  • Peter Mahoney 7:39 am on February 27, 2013
    Tags: #travel #london #officeanywhere   

    Off to London again This time it’s only… 

    Off to London again! This time it’s only slightly business (well, my old London property is up for auction, so it’s VERY business, but not terribly web related.)

    I’m getting very good at laying everything out on these train journeys though, got my laptop out, mobile tethering on the go, and the tray at the seat next to me works just wonderfully as a mousepad.

    Permalink | Reply
     
  • Peter Mahoney 10:12 am on February 25, 2013  

    Applying a bunch of speed improvements to this blog for the sake of boasting about them later!

    Permalink | Reply
     
  • Peter Mahoney 9:50 am on February 25, 2013
    Tags: , ,   

    Really successful day with the cancer organisation now… 

    Really successful day with the cancer organisation…now to the work! We decided against the wiki system I’d suggested, but rather will look into something pretty neat with live chats with key people leading up to their annual conference.

    Permalink | Reply
     
  • Peter Mahoney 8:01 am on February 22, 2013
    Tags: #trainssuck, , wiki   

    Right now I’m on a train to London to do some research ahead of a website I’ll be making for a national cancer organisation’s conference.

    We’ve worked some interesting features into it too–including a “design your dream conference wiki” that should up their social networking shares substantially.

    Permalink | Reply
     
  • Peter Mahoney 2:37 pm on February 21, 2013
    Tags: , blogs, geekiest,   

    New blog, meet old blog. Play nice now. 

    I’ve been using my main blog, http://petermahoney.net/blog for pretty much everything I’ve wanted to post about (that wasn’t only suited for the bowels of Facebook) and a bunch of quite developer specific posts were appearing.

    I’ve decided to keep that blog for bigger picture stuff that all my clients can benefit from. My coding tips, and the geekiest of my thoughts, live here now.

    Permalink | Reply
     
  • Peter Mahoney 2:34 pm on February 21, 2013
    Tags: , , snippets   

    Displaying code snippets easily 

    With the new site and all I’ve some CSS to get through.

    I wanted to make the “pre” element work as a code snippet display for me, and needed a fix to get it to wrap text (since the “width” attribute has been defunct for some time).

    Here’s the solution!

    pre {
     background-color: #F2F2F2;
     padding: 5px 5px 5px 5px;
     white-space: pre-wrap;       /* css-3 */
     white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
     white-space: -pre-wrap;      /* Opera 4-6 */
     white-space: -o-pre-wrap;    /* Opera 7 */
     word-wrap: break-word;       /* Internet Explorer 5.5+ */
    }
    Permalink | Reply
     
    • Peter Mahoney 12:33 pm on March 1, 2013

      Sadly with WordPress in particular this isn’t much help, because php code still gets executed rather than displayed.

      I do recommend “SyntaxHighlighter Evolved”, a plugin that makes displaying code pretty damn simple.

      Permalink | Reply
  • Peter Mahoney 2:42 pm on February 19, 2013
    Tags: hashtagnerdy, hastags, linking to twitter with hashtags, ,   

    Make a “Share on Twitter” link with URL and Hashtags 

    This is a little coding trick I get asked about quite a bit.

    The link you have to make to share something to Twitter is quite simple:

    http://twitter.com/share?text=text goes here

    But getting a URL and hastag in there is a different matter. To be honest most developers do know how to include the URL, but hashtags have proved more elusive!

    http://twitter.com/share?text=text goes here&url=http://url goes here&hashtags=hashtag1,hashtag2,hashtag3

    Here’s an example to try out:

    http://twitter.com/share?text=Here's an awesome tip!&url=http://petermahoney.net/make-a-share-on-twitter-link-with-url-and-hashtags/&hashtags=peter,is,awesome

    And that’s it!

    Permalink | Reply
     
  • Peter Mahoney 3:00 pm on February 13, 2013
    Tags: #fridayfreebie, , files, , header, html5, , , template, top.php, website template   

    Website code template 

    This is for my fellow developers out there.

    I have a small series of files I copy and paste whenever I’m about to start a new project, they have default templates for various files I use a lot. Like a header, footer, index page, blank stylesheet, and something called “top.php” that I use to open sessions and connect to databases.

    There are also some of my standard folders pre-made too (with the correct server permissions) like “img” (images) and “upl” (uploads).

    This was going to be last week’s #fridayfreebie, but here it is on a Wednesday instead.

    This particular version is the one I use most commonly, and it’s set up for:

    • PHP
    • MySQL
    • HTML5
    • CSS (any version!)
    • and ideally a unix/linux based server, because it references the top level of the site as being “/”.

    I’ve zipped it up to share! Feel free to do whatever you want with it—although there is a lot of Peter Mahoney specific stuff in there, so you might want to take that out. Unless of course you like giving me credit for your work. 🙂

    HTML5 website template (.zip)

    Permalink | Reply
     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel