Posts for: #Info

Quick and Dirty Mass Highlight for irssi

This is the defacto mass highlight I use to annoy the fuck out of people when on IRC with irssi. It’s good stuff. Modify it to say something incredibly offensive and use it yourself.

use strict;
use Irssi;

sub cmd_hilight {
        my ($data, $server, $win) = @_;
        my $channel = Irssi::active_win()->get_active_name();
        my $foo = "\cBHey,\cB ";
        foreach ($win->nicks())
        {      
                next if ($_->{'nick'} eq $server->{nick});
                $foo .= "\cB\c_$_->{'nick'}\cB\c_ ";
        }
        $server->command("MSG $channel $foo");
}

Irssi::command_bind('mh', 'cmd_hilight');
[]

Getting @font-face to Work on all Browsers

I’ve tried probably about ten suggestions found all over the web, and this is the only method I’ve found to function universally, across every browser I’ve tested it with.

@font-face {
    font-family: 'NameOfFontFamily';
    src: url('/font/file.eot?') format('eot'),
    url('/font/file.woff') format('woff'),
    url('/font/file.ttf') format('truetype');
}

You can use online font converters to convert an OpenType or TrueType font to *.eot and *.woff as needed. For whatever reason, the “?” appears to be important as well. Not sure about that, I’ll have to look into it further.

[]

Jekyll and Youtube Embedding

When I first began using Jekyll, I noticed that throwing in a Youtube embedded video made it go apeshit. I Googled for a bit to discover that Maruku wasn’t happy with HTML, and was taking any and all HTML and interpreting it to XHTML. Youtube doesn’t provide “Embed” data in XHTML format. Here is an example of a typical Youtube embed:

<iframe width="420" height="315" src="http://www.youtube.com/embed/dQw4w9WgXcQ" 
        frameborder="0" allowfullscreen></iframe>

That’s taken verbatim from Youtube. There are two problems here. First, XHTML doesn’t like lone attributes. The allowfullscreen attribute has to be changed to allowfullscreen="allowfullscreen" to be usable. If you even use it. I’ve heard reports of people embedding videos without it at all. Second, Jekyll devs openly admit Jekyll swallows empty end tags. Thankfully, their admission gleans a helpful hint in fixing it. Simply insert a space between <iframe> and </iframe>. The end result is as such:

[]

Jekyll (Bootstrap) is for Everyone

If you’ve seen a good number of Jekyll blogs and find yourself pretty jealous, there really aren’t any excuses anymore. Jekyll Bootstrap literally removes all difficulty from using Jekyll. It’s basically a layer over Jekyll that has built in support for theming, post creation, and more. With Jekyll Bootstrap, you really need to know very little of the command line. If you have a favorite theme that’s Jekyll based, chances are that user has made it available on the internet via Github. Hurry up and check it out.

[]

Blogging Simplified

Jekyll is an excellent “simple, blog aware, static site generator”. It allows you to use special shorthand syntax like Textile, Maruku, or other markup syntaxes to quickly and easily generate static blog content. The resources available on the internet for using Jekyll to blog are downright plentiful, and the tool itself is incredibly flexible.

The first thing you’ll have to do is grab a Jekyll layout from a current Jekyll blog. They’re all over the place, and nearly every one I’ve seen has been excellent. Choose what looks good to you. The markup supported is so easy that you can manually edit each layout easily to make it suit your own requirements. You’ll also find a plethora of information on how to include Disqus and other features you may require for your blog. Make it as complex or simple as you please. The nice thing is that you’re less likely to experience server-side scripting problems, since the platform generates static HTML. No SQL or PHP locking down required. Just generate your content and you’re good to go.

[]