Skip to content

Instantly share code, notes, and snippets.

View aereal's full-sized avatar

aereal aereal

View GitHub Profile
div {
width: 3px;
}
@media (min-width: 1px + 2px) { // !!!
body {
background-color: red;
}
}
#!/usr/bin/env perl
use strict;
use warnings;
if ($ENV{HARNESS_ACTIVE}) {
t::script->runtests;
} else {
script->new_from_args(@ARGV)->run;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
margin: 0;
}
</style>
var ta2 = document.querySelector('.ta2');
var rowsWithHeader = Array.from(ta2.querySelectorAll('tr'));
var header = rowsWithHeader[0];
var rows = rowsWithHeader.slice(1);
addHeadingCellTo(header);
rows.forEach(function (row, idx) {
var tmid = tmidFromIndex(idx);
installLabel(row, tmid);
addCheckboxCell(row, tmid);
@aereal
aereal / ansible-module.js
Created October 20, 2015 04:16
Ansible Module indexer for Chemrtorn
indexer = {
id: 'ansible-module',
name: 'Ansible Modules',
index: function (ctx) {
return ctx.fetchDocument('http://docs.ansible.com/ansible/list_of_all_modules.html').then(function (document) {
var links = document.querySelectorAll('.toctree-wrapper li a[href]');
var hrefs = [];
for (var i = 0, it; (it = links[i]); i++) {
ctx.pushIndex(it.textContent, it.href);
hrefs.push(it.href);
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long qw(:config posix_default no_ignore_case bundling);
use Pod::Usage qw(pod2usage);
sub capture {
my ($cmd) = @_;
my $out = `$cmd`;
package URI::Template::Adaptor::Router::Simple;
use strict;
use warnings;
use URI::Template;
sub translate {
my ($class, $router_simple_rule) = @_;
my $pattern = $router_simple_rule.q();
class HubNoverify < Formula
desc "Add GitHub support to git on the command-line"
homepage "https://hub.github.com/"
url "https://github.com/github/hub/archive/v2.2.2.tar.gz"
sha256 "610572ee903aea1fa8622c16ab7ddef2bd1bfec9f4854447ab8e0fbdbe6a0cae"
head "https://github.com/github/hub.git"
option "without-completions", "Disable bash/zsh completions"
depends_on "go" => :build
✘╹◡╹✘ < perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for darwin-2level
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2011, 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.
@aereal
aereal / 00_compile.t
Created May 22, 2015 03:55
Manage Perl modules with NPM
use strict;
use warnings;
use Test::More;
use lib glob 'node_modules/*';
require_ok 'Dep1';
require_ok 'Dep2';
done_testing;