Newton’s Reference

Webby and git might be a match made in heaven!

Code Ray

  module Flip; $KCODE = "u"
     FLIP_MAP = Hash.new{|h,k| k}
 
     { 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz' =>
        '∀ᗺↃᗡƎℲ⅁HIᒋʞ⅂ƜNOdԾᖈS⊥ႶΛMX⅄Zɐqɔpǝɟɓɥᴉʞ│ɯuodbɹsʇnʌʍxʎz',
        '123456890~!@$%^&*()_+{}:|<>?"#`[],./-=\\' =>
        '|ᘔᗴhᔕ9860~¡Ꭷ$%⋁⅋*)(‾+}{:|><¿„#ˎ][‘˙/-=\\'
     }.each {|from,to| from.split(//).zip(to.split(//)).each {|f,t| FLIP_MAP[f]=t }}
     FLIP_MAP.merge!("'"=>',', '7'=>'', 'j'=>'⌠̣', ';'=>'')
 
     def flip
        FLIP_MAP.values_at(* split(//)).join
     end
  end
 
 
  class String
    include Flip
  end
 
 
  ':)'.flip # ":("

Ultraviolet

  module Flip; $KCODE = "u"
     FLIP_MAP = Hash.new{|h,k| k}
 
     { 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz' =>
        '∀ᗺↃᗡƎℲ⅁HIᒋʞ⅂ƜNOdԾᖈS⊥ႶΛMX⅄Zɐqɔpǝɟɓɥᴉʞ│ɯuodbɹsʇnʌʍxʎz',
        '123456890~!@$%^&*()_+{}:|<>?"#`[],./-=\\' =>
        '|ᘔᗴhᔕ9860~¡Ꭷ$%⋁⅋*)(‾+}{:|><¿„#ˎ][‘˙/-=\\'
     }.each {|from,to| from.split(//).zip(to.split(//)).each {|f,t| FLIP_MAP[f]=t }}
     FLIP_MAP.merge!("'"=>',', '7'=>'', 'j'=>'⌠̣', ';'=>'')
 
     def flip
        FLIP_MAP.values_at(* split(//)).join
     end
  end
 
 
  class String
    include Flips
  end
 
 
  ':)'.flip # ":("

Graphviz

Directed Graphs

code:

  digraph abc {
    a -> b -> c
    a -> c
  }

code:

  digraph G { 
    compound=true; 
    subgraph cluster0 { 
      a -> b; 
      a -> c; 
      b -> d; 
      c -> d; 
    } 
    subgraph cluster1 { 
      e -> g; 
      e -> f; 
    } 
    b -> f [lhead=cluster1]; 
    d -> e; 
    c -> g [ltail=cluster0, 
    lhead=cluster1]; 
    c -> e [ltail=cluster0]; 
    d -> h; 
}

Struct

code:

  digraph structs { 
    node [shape=record]; 
    struct1 [shape=record,label="<f0> left|<f1> middle|<f2> right"]; 
    struct2 [shape=record,label="<f0> one|<f1> two"]; 
    struct3 [shape=record,label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"]; 
    struct1:f1 -> struct2:f0; 
    struct1:f2 -> struct3:here; 
  }

Entity-Relation Map

code:

  graph ER {
  	node [shape=box]; course; institute; student;
  	node [shape=ellipse]; {node [label="name"] name0; name1; name2;}
  		code; grade; number;
  	node [shape=diamond,style=filled,color=lightgrey]; "C-I"; "S-C"; "S-I";

  	name0 -- course;
  	code -- course;
  	course -- "C-I" [label="n",len=1.00];
  	"C-I" -- institute [label="1",len=1.00];
  	institute -- name1;
  	institute -- "S-I" [label="1",len=1.00];
  	"S-I" -- student [label="n",len=1.00];
  	student -- grade;
  	student -- name2;
  	student -- number;
  	student -- "S-C" [label="m",len=1.00];
  	"S-C" -- course [label="n",len=1.00];

  	label = "Entity Relation Diagram";
  	fontsize=20;
  }

Source