Skip to content

Instantly share code, notes, and snippets.

View petdance's full-sized avatar

Andy Lester petdance

View GitHub Profile
@petdance
petdance / gist:5147279
Last active December 14, 2015 20:58
Start of an article on the state of Perl 6. At the top are questions that I think should be answered in the body of the article, because they're the questions that most readers are going to want to know. Maybe not all of 'em, but most. The real thing everyone wants to know is "When will it be done", but we can't answer "When will it be done" bec…
# Questions to answer
* What do I need to have to install Rakudo Star today? JVM? Mono?
Either?
* If I download and install Rakudo Star today, what installs? What
do I get with that? Modules? Debugger? Toolchain? I get that
with Perl 5 now.
* What's the state of the toolchain? Can I build and install Perl
@petdance
petdance / gist:5468866
Created April 26, 2013 17:25
Latest timings
./dev/timings.pl
| 1.96 | 2.02 | 2.0301 | 2.0302 | 2.0303 | HEAD
------------------------------------------------------------------------------------------
ack foo /home/andy/parrot | 1.43 | 14.20 | 11.62 | 2.51 | 2.61 | 2.55
ack foo --cc /home/andy/parrot | 0.45 | 4.19 | 3.50 | 0.94 | 1.05 | 1.11
ack foo --rust /home/andy/parrot | x_x | 1.16 | 1.15 | 0.55 | 0.65 | 0.66
ack foo --known /home/andy/parrot | 1.47 | 16.94 | 14.50 | 3.11 | 3.19 | 3.17
ack -f /home/andy/parrot | 0.24 | 1.33 | 1.34 | 0.68 | 0.76 | 0.77
ack -f --cc /home/andy/parrot | 0.24 | 1.17 | 1.18 | 0.56 | 0.66 | 0.65
ack -f --rust /home/andy/parrot | x_x | 1.15 | 1.16 | 0.56 | 0.64 | 0.70
@petdance
petdance / gist:15cb96eeb8fcb2a88638
Created August 4, 2014 18:59
Why is my autocomplete not populating the box I want?
<div class="dropdown-container right" id="ccsstag_search_div">
<span class="quiet strong">Find Tags by keyword: </span>
<input class="input-medium round" id="ccsstag_search" name="search-within" type="text"
style="background: url(/graphics/css/icon-lg-search.png) 6px 50% no-repeat; padding-left: 30px; margin-top: -9px;">
<div class="dropdown-menu right inverse" style="margin-top: 2px; padding-top: 9px; padding-bottom: 6px;" />
<div class="caret"><!-- --></div>
<div class="dropdown-content" style="width: 268px;" id="ccsstag_search_content"><!-- --></div>
</div>
</div>
close: function( event ) {
clearTimeout( this.closing );
if ( this.menu.element.is(":visible") ) {
this.menu.element.hide();
this.menu.deactivate();
this._trigger( "close", event );
}
},
_suggest: function( items ) {
require(['jquery-ui-1.8.21.custom/js/jquery-ui-1.8.21.custom.min-65153'], function () {
"use strict";
var availableTags = [
"1 to 3 Words per Page",
"Action & Adventure",
// ....
"Writing Process",
"Writing Traits" ];
var rlistid_lookup = {
"1 to 3 Words per Page": 160227,
#!/usr/bin/perl
use warnings;
use strict;
use 5.010;
# State variable is declared inside the loop, instantiated once, and counts correctly.
# Prints clicker values of 1, 2, 3, 4, 5
for my $i ( 1..5 ) {
Some of these words *are emphasized*.
Some of these words _are emphasized also_.
Use two asterisks for **strong emphasis**.
Or, if you prefer, __use two underscores instead__.
@petdance
petdance / gist:e0557bc9b0a8ea16feef
Last active March 23, 2016 14:43
Incorrect uninitialized value messages in sprintf
$ perl -v
This is perl, v5.10.1 (*) built for x86_64-linux
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
package TW::WebService::Solr::Query;
use Moose;
extends 'WebService::Solr::Query';
has localparams => ( is => 'ro', isa => 'Str', default => sub { '' } );
$ cat foo.t
#!/var/perl/bin/perl
use strict;
use warnings;
use 5.010;
use Test::Tester;
use Test::More tests => 15;