*italic* **bold**
_italic_ __bold__
Inline:
#!/usr/bin/env ruby -wKU | |
require 'resolv' | |
while line = gets | |
ip = line.chomp | |
begin | |
host_name = Resolv.getname(ip) | |
rescue Resolv::ResolvError => error | |
host_name = "noname" |
FLD = { "c-ip" => 0, "cs-username" => 1, "c-agent" => 2, "sc-authenticated" => 3, "date" => 4, "time" => 5, "s-svcname" => 6, | |
"s-computername" => 7, "cs-referred" => 8, "r-host" => 9, "r-ip" => 10, | |
"r-port" => 11, "time-taken" => 12, "sc-bytes" => 13, "cs-bytes" => 14, | |
"cs-protocol" => 15, "cs-transport" => 16, "s-operation" => 17, | |
"cs-uri" => 18, "cs-mime-type" => 19, "s-object-source" => 20, | |
"sc-status" => 21, "s-cache-info" => 22, "rule" => 23, | |
"FilterInfo" => 24, "cs-Network" => 25, "sc-Network" => 26, | |
"error-info" => 27, "action" => 28, "GmtLogTime" => 29, | |
"AuthenticationServer" => 30 } |
| | Grouping ||
First Header | Second Header | Third Header |
---|---|---|
Content | Long Cell | |
Content | Cell | Cell |
New section | More | Data | And more | And more | [Prototype table]
#! /usr/bin/env ruby | |
require 'tmpdir' | |
def fixed?(fn) fn =~ /\.searchable\.pdf/; end | |
def searchable_fn(fn) | |
return fn if fixed?(fn) | |
"#{File.dirname(fn)}/#{File.basename(fn, File.extname(fn))}.searchable.pdf" | |
end |
/* | |
* zendesk-marked.css - CSS to preview ZenDesk comments in Marked | |
* Copyright (C) 2016 Bill Smargiassi bill@smargiassi.us | |
*/ | |
body { | |
font-family: proxima-nova, sans-serif; | |
font-size: 14px; | |
font-style: normal; | |
font-weight: normal; |
#! /bin/bash | |
echo Creating Combined console.log | |
for I in *-riak-debug; do NODE=${I//-riak-debug/}; echo " Processing ${NODE}..."; for J in $I/logs/platform_log_dir/console.lo*; do sed -n -e '/^2015/!{H;d;};/^2015/{x;s/\n/ /g;p;};${x;s/\n/ /g;p;}' $J | awk '!/^$/{print $1"T"$2,"'${NODE}'",$0}' | sed 's/\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) \(.*\)/\1 \2 \5/' >> temp.log ; done; done; sort temp.log > combined_console.log;rm temp.log; | |
echo Creating Combined error.log | |
for I in *-riak-debug; do NODE=${I//-riak-debug/}; echo " Processing ${NODE}..."; for J in $I/logs/platform_log_dir/error.lo*; do sed -n -e '/^2015/!{H;d;};/^2015/{x;s/\n/ /g;p;};${x;s/\n/ /g;p;}' $J | awk '!/^$/{print $1"T"$2,"'${NODE}'",$0}' | sed 's/\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) \(.*\)/\1 \2 \5/' >> temp.log ; done; done; sort temp.log > combined_error.log;rm temp.log; | |
echo Checking for LevelDB Compaction Errors | |
find . -name "LOG" -exec grep -l 'Compaction error' {} \; |
-module(one_24). | |
-export([bits/1, enclose/1, perimeter/1, tail_bits/1]). | |
%% perimeter/1 - calculate the perimeter of common shapes | |
%% circle - πD, unrelated to coordinates | |
perimeter({circle, {_X,_Y}, Radius}) -> | |
Radius * 2 * math:pi(); | |
%% rectangle - assumes coordinate 1 is lower left, coordinate 2 is upper | |
%% right, clauses with guards could be used to ensure it | |
perimeter({rectangle, {X1,Y1}, {X2,Y2}}) -> |
-module(w2a1). | |
-export([maximum/1, | |
product/1, | |
tail_maximum/1, | |
tail_product/1]). | |
product([]) -> 1; | |
product([Num|Nums]) -> Num * product(Nums). | |
tail_product(Nums) -> tail_product(Nums, 1). |
-module(w2a2). | |
-export([double/1, evens/1]). | |
double([]) -> []; | |
double([X|Xs]) -> | |
[2 * X|double(Xs)]. | |
evens([]) -> []; | |
evens([X|Xs]) -> | |
case X rem 2 of |