This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Nanoc::Filters | |
class Compact < Nanoc::Filter | |
identifier :compact | |
def run(content, params={}) | |
count_pre = 0 | |
content.split("\n").each do |line| | |
line << "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Nanoc::Filters | |
class StripBlankLines < Nanoc::Filter | |
identifier :strip_blank_lines | |
def run(content, params={}) | |
count_pre = 0 | |
content.split("\n").each do |line| | |
line << "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my %exercise = (); | |
my %food = (); | |
my $lines = 0; | |
foreach my $line (<>) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my %options = (); | |
my $lines = 0; | |
foreach my $line (<>) { | |
if ($line =~ m/^(\d+)$/) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my %exercise = (); | |
my %food = (); | |
my $lines = 0; | |
# read food and exercise options into separate lists based on positive or negative calories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 | |
6281bcff234f72bb2bf8ebb0575bd0fc 869 | |
787ae8bec3e969890c6ab9a2061e946d 368 | |
63ab56237cf06355a97a5c140f98513b 381 | |
5d8e0fee7e629219b7bacec3ea23e47f 394 | |
768057f7fa934c62b95bb6a54f43086f -407 | |
ecfa420b7732dfe6b0a260b5230efa83 -906 | |
d5ff040a4be1853067ff6691f18d2c74 -919 | |
572b27bc3adbf698c92d5598b0a2e15f -932 | |
a75d5a4a253a379eb738e3656c3a5970 945 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Nanoc3::Filters | |
class ObfuscateMail < Nanoc3::Filter | |
identifier :obfuscate_mail | |
require 'digest/sha1' | |
def run(content, params={}) | |
link_count=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Cwd; | |
use Getopt::Long; | |
my ($human, $help, $sum); | |
my $result = GetOptions( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def output_parent(page) | |
nil == page and return nil | |
page[:x_parent] and return page[:x_parent] | |
(page.identifier == '/' or page.binary? or page[:is_hidden]) and return page[:x_parent] = nil | |
path = page.path.gsub(/[^\/]*$/,'') | |
@items.sort_by{ |i| i.path.count('/') }.reverse.each do |i| | |
(i == page or i.binary? or i[:is_hidden]) and next | |
if path =~ /^#{i.path.gsub(/[^\/]+$/,'')}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Nanoc3::Helpers | |
module Relationships | |
extend Nanoc3::Memoization | |
def output_parent(page) | |
nil == page and return nil | |
(page.identifier == '/' or page.binary? or page[:is_hidden]) and return nil | |
OlderNewer