cinlloc 2015-09-22 21:54:54 +00:00
commit 36bae5dae1
24 changed files with 3350 additions and 92 deletions

View File

@ -37,18 +37,18 @@ my %dates = share('preprocessed_dates.txt')->slurp(iomode => '<:encoding(UTF-8)'
sub parse_other_date_formats {
# Quick fix for the date formats not supported by parse_datestring_to_date.
# If parse_datestring_to_date will be improved, you can remove some of the following code.
# US date format ("month/day")
if (/^([0-1]?[0-9])\s?\/\s?([0-3]?[0-9])$/) {
# Suppress errors for invalid dates with eval
return eval { new DateTime(year => 2000, day => $2, month => $1) };
}
# Polish date format ("day.month")
if (/^([0-3]?[0-9])\s?\.\s?([0-1]?[0-9])$/) {
return eval { new DateTime(year => 2000, day => $1, month => $2) };
}
# Polish month names
s/\b(styczeń|stycznia)\b/Jan/i;
s/\b(luty|lutego)\b/Feb/i;
@ -62,7 +62,7 @@ sub parse_other_date_formats {
s/\b(październik|października)\b/Oct/i;
s/\b(listopad|listopada)\b/Nov/i;
s/\b(grudzień|grudnia)\b/Dec/i;
# Czech month names
s/\b(leden|ledna)\b/Jan/i;
s/\b(únor|února)\b/Feb/i;
@ -76,13 +76,13 @@ sub parse_other_date_formats {
s/\b(říjen|října)\b/Oct/i;
s/\b(listopad|listopadu)\b/Nov/i;
s/\b(prosinec|prosince)\b/Dec/i;
# Parse_datestring_to_date uses the current year if the year is not specified, so
# it will not parse "29 Feb" in a non-leap year. Fix this problem here.
if (/^29\s?(?:th)?\s*(Feb|February)/ || /(Feb|February)\s*29\s?(?:th)?$/) {
return new DateTime(year => 2000, day => 29, month => 2);
}
return parse_datestring_to_date($_);
}
@ -97,7 +97,7 @@ handle remainder => sub {
my $html;
my $query;
my $header;
if (exists $dates{lc($_)}) {
# Search by name first
$query = ucfirst($_);
@ -115,7 +115,7 @@ handle remainder => sub {
# Any leap year here, because the array includes February, 29
$day->set_year(2000);
my $suffix = 'th';
my $daynum = $day->day();
$suffix = 'st' if $daynum == 1 || $daynum == 21 || $daynum == 31;
@ -123,22 +123,23 @@ handle remainder => sub {
$suffix = 'rd' if $daynum == 3 || $daynum == 23;
$query = $day->month_name() . " $daynum$suffix";
$text = $names[$day->day_of_year() - 1];
# Convert to HTML
$html = $text;
$html =~ s/(\d{1,2}) (\w{1,3})/$1&nbsp;$2/g;
$html =~ s@(.*?): (.*?)(?:$|; )@'<tr><td class="name-days-country">' . get_flag($1) .
' <span class="name-days-country-name">' . $1 . '</span>' .
'</td><td class="name-days-dates">' . $2 . '</td></tr>'@ge;
$header = 'Name days on <b>' . html_enc($query) . '</b>';
}
# Add the header
$html = '<span>' . $header . '</span>' .
$html = '<div class="zci--name_days">' .
'<span>' . $header . '</span>' .
'<div class="zci__content"><table>' .
$html . '</table></div>';
$html . '</table></div></div>';
return $text, html => $html;
};

View File

@ -1,7 +1,7 @@
{
"id": "github_atom_cheat_sheet",
"name": "GitHub Atom",
"description": "An open source text editor, made by GitHub Inc.",
"description": "Open source text editor, made by GitHub Inc.",
"metadata":{
"sourceName": "Bugsnag",
"sourceUrl": "https://bugsnag.com/blog/atom-editor-cheat-sheet"

View File

@ -0,0 +1,80 @@
{
"id": "chess_cheat_sheet",
"name": "Chess",
"description": "Strategy Board Game",
"metadata": {
"sourceName": "Wikipedia",
"sourceUrl": "https://en.wikipedia.org/wiki/Chess"
},
"aliases": [
"chess pieces",
"chess gameplay",
"chess movement"
],
"template_type": "reference",
"section_order": ["Pieces", "Gameplay", "Special Movement"],
"sections": {
"Pieces": [
{
"key": "Pawn",
"val": "In its first move, a pawn can move forward one or two spaces; thereafter, it moves one space forward at a time. Captures pieces 1 square forward diagonally"
},
{
"key": "Knight",
"val": "Moves and captures in an L shape: two spaces in any direction and one space out at a 90 degree angle. Can jump over other pieces"
},
{
"key": "Bishop",
"val": "Moves and captures diagonally as far as it would like in an unobstructed single direction"
},
{
"key": "Rook",
"val": "Moves and captures along non-diagonal straight lines as far as it would like in an unobstructed single direction"
},
{
"key": "Queen",
"val": "Moves and captures along any straight lines (diagonal or non-diagonal) as far as it would like in an unobstructed single direction. A combination of a bishop and a rook"
},
{
"key": "King",
"val": "Moves and captures one space in any direction, as long as the king won't be in \"check\" in the new square"
}
],
"Gameplay": [
{
"key": "Basic play",
"val": "The player using the white pieces goes first, and players alternate turns until the end of the game"
},
{
"key": "Check",
"val": "When a king is under immediate attack by an enemy piece, it is in \"check.\" The player must move so that the king is out of check. If they cannot, it is checkmate"
},
{
"key": "Checkmate",
"val": "If a player's king is under immediate attack (in check) by an enemy's piece and player cannot get their king out of check (by moving the king, capturing the attacking piece, or blocking the attack), they are checkmated and have lost"
},
{
"key": "Stalemate",
"val": "If a player's king is not under immediate attack but the player has no other legal moves, it is a stalemate and the game is a draw"
},
{
"key": "Threefold repetition",
"val": "If the same position is repeated three times (does not have to be in succession), either play can claim a draw"
}
],
"Special Movement": [
{
"key": "Castling",
"val": "If a king and one of its rooks haven't moved yet in the game and there are no pieces between them, they can \"castle.\" With either the king-side or the queen-side rook, the king moves two squares towards the rook and the rook moves to the other side of the king, right next to it. A player cannot castle if the king is in check or would pass through (or into) spaces that are under attack"
},
{
"key": "En passant",
"val": "Immediately after a pawn moves two squares forward with its first move, an enemy pawn that could have captured it if the pawn had moved one square is able to do so as if the pawn had only moved forward one square"
},
{
"key": "Promotion",
"val": "If a pawn reaches the last row on the board, it can be promoted to be any other piece that the player desires"
}
]
}
}

View File

@ -62,7 +62,7 @@
},
{
"val" : "Politie (po-lee-tsee)",
"key" : "Repeat, please."
"key" : "Police"
},
{
"val" : "Brandweer (brant-wayr)",
@ -95,7 +95,7 @@
"key" : "I'm fine thanks!"
},
{
"val" : "Hoe gaat het met jouw?",
"val" : "Hoe gaat het met jou?",
"key" : "How are you?"
},
{

View File

@ -14,26 +14,26 @@
"Getting Help",
"Travelling",
"Etiquette",
"Dinner on the Town"
"Going out for dinner"
],
"description" : "Basic German words and phrases",
"sections" : {
"Etiquette" : [
{
"val" : "Guten Nacht",
"key" : "Good Night"
},
{
"val" : "Guten Mittag",
"key" : "Good Afternoon"
"val" : "Guten Morgen",
"key" : "Good morning"
},
{
"val" : "Guten Abend",
"key" : "Good Evening"
"key" : "Good evening"
},
{
"val" : "Es tut mir leid",
"key" : "I'm sorry"
"val" : "Gute Nacht",
"key" : "Good night"
},
{
"val" : "Es tut mir leid.",
"key" : "I'm sorry."
},
{
"val" : "Danke",
@ -47,10 +47,6 @@
"val" : "Vielen Dank!",
"key" : "Thank you very much!"
},
{
"val" : "Guten Morgen",
"key" : "Good Morning"
},
{
"val" : "Bitteschön",
"key" : "You're welcome"
@ -58,20 +54,20 @@
],
"Getting Help" : [
{
"val" : "Ruf die Polizei (an)!",
"key" : "Call the Police!"
"val" : "Rufen Sie die Polizei!",
"key" : "Call the police!"
},
{
"val" : "Können Sie bitte langsamer sprechen!",
"key" : "Please speak more slowly!"
"val" : "Können Sie bitte langsamer sprechen?",
"key" : "Can you speak more slowly, please?"
},
{
"val" : "Ich bin allergisch.",
"key" : "I am allergic."
},
{
"val" : "Bitte wiederholen.",
"key" : "Repeat, please."
"val" : "Können Sie das bitte wiederholen?",
"key" : "Can you repeat, please?"
},
{
"val" : "Wie sagt man \"X\" auf Deutsch?",
@ -95,7 +91,7 @@
},
{
"val" : "Können Sie das bitte aufschreiben?",
"key" : "Can you write that down?"
"key" : "Can you write that down, please?"
},
{
"val" : "Rufen Sie einen Krankenwagen!",
@ -121,7 +117,7 @@
},
{
"val" : "Mir geht es gut, danke!",
"key" : "I'm fine thanks!"
"key" : "I'm fine, thanks!"
},
{
"val" : "Wie geht's?",
@ -136,7 +132,7 @@
"key" : "Welcome"
},
{
"val" : "Wie heisst du?",
"val" : "Wie heißt du?",
"key" : "What's your name?"
}
],
@ -167,7 +163,7 @@
},
{
"val" : "Bitte halten Sie hier an.",
"key" : "Stop here please."
"key" : "Please stop here."
},
{
"val" : "Biegen Sie rechts ab.",
@ -182,7 +178,7 @@
"key" : "How can I get a taxi?"
}
],
"Dinner on the Town" : [
"Going out for dinner" : [
{
"val" : "Haben Sie ein vegetarisches Gericht?",
"key" : "Do you have vegetarian dishes?"
@ -224,7 +220,7 @@
"key" : "A glass of water please."
},
{
"val" : "Einen Tisch für zwei bitte!",
"val" : "Einen Tisch für zwei, bitte!",
"key" : "A table for two please!"
},
{

View File

@ -0,0 +1,318 @@
{
"id": "go_lang_script_cheat_sheet",
"name": "Go Language",
"metadata": {
"sourceName": "GitHub",
"sourceUrl": "https://github.com/a8m/go-lang-cheat-sheet"
},
"aliases": [
"go, go lang, go-lang, golang operators, golang functions"
],
"template_type": "terminal",
"section_order": [
"Variables",
"Operators and aliases",
"Functions",
"Built In Types",
"Control Structures",
"Arrays, Slices, Ranges",
"Maps",
"Structs",
"Pointers",
"Interfaces"
],
"sections": {
"Variables": [{
"val": "Declare a variable",
"key": "var varname vartype"
}, {
"val": "Declare a variable and assign a value",
"key": "var varname vartype = value"
}, {
"val": "Declare a variable shorthand, only in func bodies, omit var keyword, type is always implicit",
"key": "varname := value"
}, {
"val": "Declare a constant",
"key": "const constant = value"
}],
"Functions": [{
"val": "A simple function",
"key": "func functionName() \\{\\}"
}, {
"val": "Function with parameters (types go after identifiers)",
"key": "func functionName(param1 string, param2 int) \\{\\}"
}, {
"val": "Multiple parameters of the same type",
"key": "func functionName(param1, param2 int) \\{\\}"
}, {
"val": "Return type declaration",
"key": "func functionName() int \\{ <br> &nbsp;&nbsp;&nbsp;&nbsp;return 42 <br>\\}"
}, {
"val": "Can return multiple values at once",
"key": "func returnMulti() (int, string) \\{ <br>&nbsp;&nbsp;&nbsp;&nbsp;return 42, \"foobar\" <br>\\} <br> var x, str = returnMulti()"
}, {
"val": "Return multiple named results simply by return",
"key": "func returnMulti2() (n int, s string) \\{ <br> &nbsp;&nbsp;&nbsp;&nbsp;n = 42 <br> &nbsp;&nbsp;&nbsp;&nbsp;s = \"foobar\" <br> &nbsp;&nbsp;&nbsp;&nbsp;// n and s will be returned <br> &nbsp;&nbsp;&nbsp;&nbsp;return <br> \\} <br> var x, str = returnMulti2()"
}],
"Built In Types": [{
"val": "Bool is the set of boolean values, true and false.",
"key": "bool"
}, {
"val": "string is the set of all strings of 8-bit bytes, conventionally but not necessarily representing UTF-8-encoded text. A string may be empty, but not nil. Values of string type are immutable.",
"key": "string"
}, {
"val": "int is a signed integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, int32.",
"key": "int"
}, {
"val": "int8 is the set of all signed 8-bit integers. Range: -128 through 127.",
"key": "int8"
}, {
"val": "int16 is the set of all signed 16-bit integers. Range: -32768 through 32767.",
"key": "int16"
}, {
"val": "int32 is the set of all signed 32-bit integers. Range: -2147483648 through 2147483647.",
"key": "int32"
}, {
"val": "int64 is the set of all signed 64-bit integers. Range: -9223372036854775808 through 9223372036854775807.",
"key": "int64"
}, {
"val": "uint is an unsigned integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, uint32.",
"key": "uint"
}, {
"val": "uint8 is the set of all unsigned 8-bit integers. Range: 0 through 255.",
"key": "uint8"
}, {
"val": "uint16 is the set of all unsigned 16-bit integers. Range: 0 through 65535.",
"key": "uint16"
}, {
"val": "uint32 is the set of all unsigned 32-bit integers. Range: 0 through 4294967295.",
"key": "uint32"
}, {
"val": "uint64 is the set of all unsigned 64-bit integers. Range: 0 through 18446744073709551615.",
"key": "uint64"
}, {
"val": "uintptr is an integer type that is large enough to hold the bit pattern of any pointer.",
"key": "uintptr"
}, {
"val": "byte is an alias for uint8 and is equivalent to uint8 in all ways. It is used, by convention, to distinguish byte values from 8-bit unsigned integer values.",
"key": "byte"
}, {
"val": "rune is an alias for int32 and is equivalent to int32 in all ways. It is used, by convention, to distinguish character values from integer values.",
"key": "rune"
}, {
"val": "float32 is the set of all IEEE-754 32-bit floating-point numbers.",
"key": "float32"
}, {
"val": "float64 is the set of all IEEE-754 64-bit floating-point numbers.",
"key": "float64"
}, {
"val": "complex64 is the set of all complex numbers with float32 real and imaginary parts.",
"key": "complex64"
}, {
"val": "complex128 is the set of all complex numbers with float64 real and imaginary parts.",
"key": "complex128"
} ],
"Control Structures": [{
"val": "Main",
"key": "func main() \\{...\\}"
}, {
"val": "If",
"key": "if x > 0 \\{<br>&nbsp;&nbsp;&nbsp;&nbsp; return x<br>\\} else \\{<br>&nbsp;&nbsp;&nbsp;&nbsp; return -x<br>\\}"
}, {
"val": "For Loop",
"key": "for i := 1; i < 10; i++ \\{...\\}"
}, {
"val": "For Loop (single condition)",
"key": "for i < 10 \\{...\\}"
}, {
"val": "For Loop (no condition)",
"key": "for \\{...\\}"
}, {
"val": "Switch",
"key": "switch operatingSystem \\{<br>case \"darwin\":<br>&nbsp;&nbsp;&nbsp;&nbsp;fmt.Println(\"Mac OS Hipster\")<br>case \"linux\":<br>&nbsp;&nbsp;&nbsp;&nbsp;fmt.Println(\"Linux Geek\")<br>default:<br>&nbsp;&nbsp;&nbsp;&nbsp;fmt.Println(\"Other\")<br>\\}"
}, {
"val": "Switch (with preceeding assignement)",
"key": "switch os := runtime.GOOS; os \\{<br>case \"darwin\": ...<br>\\}"
}],
"Arrays, Slices, Ranges": [{
"key": "var a \\[10\\]int",
"val": "Declare an int array with length 10. Array length is part of the type!"
}, {
"key": "a\\[3\\] = 42",
"val": "set elements"
}, {
"key": "i := a\\[3\\]",
"val": "Read elements"
}, {
"key": "var a = \\[2\\]int\\{1, 2\\}",
"val": "Declare and initialize"
}, {
"key": "a := \\[2\\]int\\{1, 2\\}",
"val": "Shorthand"
}, {
"key": "a := \\[...\\]int\\{1, 2\\}",
"val": "Elipsis -&gt; Compiler figures out array length"
}, {
"key": "var a \\[\\]int",
"val": "Declare a slice - similar to an array, but length is unspecified"
}, {
"key": "var a = \\[\\]int \\{1, 2, 3, 4\\}",
"val": "Declare and initialize a slice (backed by the array given implicitly)"
}, {
"key": "a := \\[\\]int\\{1, 2, 3, 4\\}",
"val": "Shorthand"
}, {
"key":"chars := \\[\\]string\\{0:&quot;a&quot;, 2:&quot;c&quot;, 1: &quot;b&quot;\\}",
"val": " \\[ \"a\", \"b\", \"c\" \\] "
}, {
"key": "var b = a\\[lo:hi\\]",
"val": "Creates a slice (view of the array) from index lo to hi-1"
}, {
"key": "var b = a\\[1:4\\] ",
"val": "Slice from index 1 to 3"
}, {
"key": "var b = a\\[:3\\]",
"val": "Missing low index implies 0"
}, {
"key": "var b = a\\[3:\\]",
"val": "Missing high index implies len(a)"
}, {
"key":"a = make(\\[\\]byte, 5, 5)",
"val":"Create a slice with make, first arg length, second capacity"
}, {
"key":"a = make(\\[\\]byte, 5)",
"val":"Create a slice with make, capacity is optional"
}, {
"key":"x := \\[3\\]string\\{&quot;applies&quot;,&quot;oranges&quot;,&quot;kiwis&quot;\\}",
"val":"Create a slice from an array"
}, {
"key":"s := x\\[:\\]",
"val":"A slice referencing the storage of x"
}],
"Maps": [{
"key": "var m map\\[string\\]int<br>m = make(map\\[string\\]int)<br>m\\[\"key\"\\] = 42<br>fmt.Println(m\\[\"key\"\\])<br><br>delete(m, \"key\")<br>elem, ok := m\\[\"key\"\\]",
"val": "Map syntax"
}, {
"key": "var m = map\\[string\\]Vertex\\{<br>&nbsp;&nbsp;&nbsp;&nbsp;\"Bell Labs\": \\{40.68433, -74.39967\\},<br>&nbsp;&nbsp;&nbsp;&nbsp;\"Google\": \\{37.42202, -122.08408\\},<br>\\}",
"val": "Map literal"
}],
"Structs": [{
"key": "type Vertex struct \\{<br>&nbsp;&nbsp;&nbsp;&nbsp;X, Y int<br>\\}",
"val": "Struct declaration"
}, {
"key": "var v = Vertex\\{1, 2\\}",
"val": "Creating"
}, {
"key": "var v = Vertex\\{X: 1, Y: 2\\}",
"val": "Creates a struct by defining values with keys"
}, {
"key": "v.X = 4",
"val": "Accessing members"
}, {
"key": "func (v Vertex) Abs() float64 \\{<br>&nbsp;&nbsp;&nbsp;&nbsp;return math.Sqrt(v.X*v.X + v.Y*v.Y)<br>\\}",
"val": "You can declare methods on structs. The struct you want to declare the method on (the receiving type) comes between the the func keyword and the method name. The struct is copied on each method call."
}, {
"key": "v.Abs()",
"val": "Call method"
}, {
"key": "func (v *Vertex) add(n float64) \\{<br>&nbsp;&nbsp;&nbsp;&nbsp;v.X += n<br>&nbsp;&nbsp;&nbsp;&nbsp;v.Y += n<br>\\}",
"val": "For mutating methods, you need to use a pointer (see below) to the Struct as the type. With this, the struct value is not copied for the method call."
}, {
"key": "point := struct \\{<br>&nbsp;&nbsp;&nbsp;&nbsp;X, Y int<br>\\}\\{1, 2\\}",
"val": "Anonymous structs"
}],
"Pointers": [{
"key": "p := Vertex\\{1, 2\\}",
"val": "p is a Vertex"
}, {
"key": "q := &p",
"val": "q is a pointer to a Vertex"
}, {
"key": "r := &Vertex\\{1, 2\\}",
"val": "r is a pointer to a Vertex"
}, {
"key": "var s *Vertex = new(Vertex)",
"val": "new creates a pointer to a new struct instance"
}],
"Interfaces": [{
"key": "type Awesomizer interface \\{<br>&nbsp;&nbsp;&nbsp;&nbsp;Awesomize() string<br>\\}",
"val": "Interface declaration"
}, {
"key":"type Foo struct \\{\\}",
"val": "Types do *not* declare to implement interfaces"
}, {
"key": "func (foo Foo) Awesomize() string \\{<br>&nbsp;&nbsp;&nbsp;&nbsp;return \"Awesome!\"<br>\\}",
"val": "Rather, types implicitly satisfy an interface if they implement all required methods"
}],
"Operators and aliases": [{
"key": "+",
"val":"Addition"
}, {
"key": "-",
"val":"Subtraction"
}, {
"key": "*",
"val":"Multiplication"
}, {
"key": "/",
"val":"Quotient"
}, {
"key": "%",
"val":"Remainder"
}, {
"key": "&amp;",
"val":"Bitwise and"
}, {
"key": "|",
"val":"Bitwise or"
}, {
"key": "^",
"val":"Bitwise xor"
}, {
"key": "&amp;^",
"val":"Bit clear (and not)"
}, {
"key": "&lt;&lt;",
"val":"Left shift"
}, {
"key": "&gt;&gt;",
"val":"Right shift"
}, {
"key": "==",
"val":"Equal"
}, {
"key": "!=",
"val":"Not equal"
}, {
"key": "&lt;",
"val":"Less than"
}, {
"key": "&lt;=",
"val":"Less than or equal"
}, {
"key": "&gt;",
"val":"Greater than"
}, {
"key": "&gt;=",
"val":"Greater than or equal"
}, {
"key": "&amp;&amp;",
"val":"Logical and"
}, {
"key": "||",
"val":"Logical or"
}, {
"key": "!",
"val":"Logical not"
}, {
"key": "&amp;",
"val":"Address of / create pointer"
}, {
"key": "*",
"val":"Dereference pointer"
}, {
"key": "&lt;-",
"val":"Send / receive operator"
} ]
}
}

View File

@ -0,0 +1,324 @@
{
"id": "ghci_repl_cheat_sheet",
"name": "GHCi",
"description": "Glasgow Haskell Compiler (GHC) interactive environment, where Haskell expressions can be interactively evaluated and programs can be interpreted",
"metadata": {
"sourceName": "Haskell Website",
"sourceUrl": "https://www.haskell.org"
},
"aliases": [
"ghci"
],
"template_type": "terminal",
"section_order": [
"Commands available from the prompt",
"Commands for debugging",
"Commands for changing settings",
"Options for ':set' and ':unset'",
"Commands for displaying information"
],
"sections": {
"Commands available from the prompt": [
{
"key": "<statement>",
"val": "evaluate/run <statement>"
},
{
"key": ":",
"val": "repeat last command"
},
{
"key": ":\\{\\n ..lines.. \\n:\\}\\n",
"val": "multiline command"
},
{
"key": ":add \\[*\\]<module> ...",
"val": "add module(s) to the current target set"
},
{
"key": ":browse\\[!\\] \\[\\[*\\]<mod>\\]",
"val": "display the names defined by module <mod> (!: more details; *: all top-level names)"
},
{
"key": ":cd <dir>",
"val": "change directory to <dir>"
},
{
"key": ":cmd <expr>",
"val": "run the commands returned by <expr>::IO String"
},
{
"key": ":complete <dom> \\[<rng>\\] <s>",
"val": "list completions for partial input string"
},
{
"key": ":ctags\\[!\\] \\[<file>\\]",
"val": "create tags file for Vi (default: \"tags\") (!: use regex instead of line number)"
},
{
"key": ":def <cmd> <expr>",
"val": "define command :<cmd> (later defined command has precedence, ::<cmd> is always a builtin command)"
},
{
"key": ":edit <file>",
"val": "edit file"
},
{
"key": ":edit",
"val": "edit last module"
},
{
"key": ":etags \\[<file>\\]",
"val": "create tags file for Emacs (default: \"TAGS\")"
},
{
"key": ":help , :?",
"val": "display this list of commands"
},
{
"key": ":info\\[!\\] \\[<name> ...\\]",
"val": "display information about the given names (!: do not filter instances)"
},
{
"key": ":issafe \\[<mod>\\]",
"val": "display safe haskell information of module <mod>"
},
{
"key": ":kind\\[!\\] <type>",
"val": "show the kind of <type> (!: also print the normalised type)"
},
{
"key": ":load \\[*\\]<module> ...",
"val": "load module(s) and their dependents"
},
{
"key": ":main \\[<arguments> ...\\]",
"val": "run the main function with the given arguments"
},
{
"key": ":module \\[+/-\\] \\[*\\]<mod> ... ",
"val": "set the context for expression evaluation"
},
{
"key": ":quit",
"val": "exit GHCi"
},
{
"key": ":reload",
"val": "reload the current module set"
},
{
"key": ":run function \\[<arguments> ...\\]",
"val": "run the function with the given arguments"
},
{
"key": ":script <filename>",
"val": "run the script <filename>"
},
{
"key": ":type <expr>",
"val": "show the type of <expr>"
},
{
"key": ":undef <cmd>",
"val": "undefine user-defined command :<cmd>"
},
{
"key": ":!<command>",
"val": "run the shell command <command>"
}
],
"Commands for changing settings": [
{
"key": ":set <option> ...",
"val": "set options"
},
{
"key": ":seti <option> ...",
"val": "set options for interactive evaluation only"
},
{
"key": ":set args <arg> ...",
"val": "set the arguments returned by System.getArgs"
},
{
"key": ":set prog <progname>",
"val": "set the value returned by System.getProgName"
},
{
"key": ":set prompt <prompt>",
"val": "set the prompt used in GHCi"
},
{
"key": ":set prompt2 <prompt>",
"val": "set the continuation prompt used in GHCi"
},
{
"key": ":set editor <cmd>",
"val": "set the command used for :edit"
},
{
"key": ":set stop \\[<n>\\] <cmd>",
"val": "set the command to run when a breakpoint is hit"
},
{
"key": ":unset <option> ...",
"val": "unset options"
}
],
"Commands for debugging": [
{
"key": ":abandon",
"val": "at a breakpoint, abandon current computation"
},
{
"key": ":back",
"val": "go back in the history (after :trace)"
},
{
"key": ":break \\[<mod>\\] <l> \\[<col>\\]",
"val": "set a breakpoint at the specified location"
},
{
"key": ":break <name>",
"val": "set a breakpoint on the specified function"
},
{
"key": ":continue",
"val": "resume after a breakpoint"
},
{
"key": ":delete <number>",
"val": "delete the specified breakpoint"
},
{
"key": ":delete *",
"val": "delete all breakpoints"
},
{
"key": ":force <expr>",
"val": "print <expr>, forcing unevaluated parts"
},
{
"key": ":forward",
"val": "go forward in the history (after :back)"
},
{
"key": ":history \\[<n>\\]",
"val": "after :trace, show the execution history"
},
{
"key": ":list",
"val": "show the source code around current breakpoint"
},
{
"key": ":list <identifier>",
"val": "show the source code for <identifier>"
},
{
"key": ":list \\[<module>\\] <line>",
"val": "show the source code around line number <line>"
},
{
"key": ":print \\[<name> ...\\]",
"val": "prints a value without forcing its computation"
},
{
"key": ":sprint \\[<name> ...\\]",
"val": "simplifed version of :print"
},
{
"key": ":step",
"val": "single-step after stopping at a breakpoint"
},
{
"key": ":step <expr>",
"val": "single-step into <expr>"
},
{
"key": ":steplocal",
"val": "single-step within the current top-level binding"
},
{
"key": ":stepmodule",
"val": "single-step restricted to the current module"
},
{
"key": ":trace",
"val": "trace after stopping at a breakpoint"
},
{
"key": ":trace <expr>",
"val": "evaluate <expr> with tracing on (see :history)"
}
],
"Commands for displaying information": [
{
"key": ":show bindings",
"val": "show the current bindings made at the prompt"
},
{
"key": ":show breaks",
"val": "show the active breakpoints"
},
{
"key": ":show context",
"val": "show the breakpoint context"
},
{
"key": ":show imports",
"val": "show the current imports"
},
{
"key": ":show linker",
"val": "show current linker state"
},
{
"key": ":show modules",
"val": "show the currently loaded modules"
},
{
"key": ":show packages",
"val": "show the currently active package flags"
},
{
"key": ":show paths",
"val": "show the currently active search paths"
},
{
"key": ":show language",
"val": "show the currently active language flags"
},
{
"key": ":show <setting>",
"val": "show value of <setting>, which is one of \\[args, prog, prompt, editor, stop\\]"
},
{
"key": ":showi language",
"val": "show language flags for interactive evaluation"
}
],
"Options for ':set' and ':unset'": [
{
"key": "+m",
"val": "allow multiline commands"
},
{
"key": "+r",
"val": "revert top-level expressions after each evaluation"
},
{
"key": "+s",
"val": "print timing/memory stats after each evaluation"
},
{
"key": "+t",
"val": "print type after evaluation"
},
{
"key": "-<flags>",
"val": "most GHC command line flags can also be set here (eg. -v2, -XFlexibleInstances, etc.) for GHCi-specific flags, see User's Guide, Flag reference, Interactive-mode options"
}
]
}
}

View File

@ -0,0 +1,236 @@
{
"id": "http_status_codes_cheat_sheet",
"name": "HTTP Status Codes",
"description": "Informational, Success and Error Codes returned by HTTP",
"aliases": ["http status code", "http error code", "http error codes", "http response codes", "http response code", "http response status codes", "http response status code"],
"metadata": {
"sourceName": "Cheatography",
"sourceUrl": "http://www.cheatography.com/kstep/cheat-sheets/http-status-codes/"
},
"template_type": "reference",
"section_order": [
"HTTP Informational Codes (1xx)",
"HTTP Successful Codes (2xx)",
"HTTP Redirection Codes (3xx)",
"HTTP Client Error Codes (4xx)",
"HTTP Server Error Codes (5xx)"
],
"sections": {
"HTTP Informational Codes (1xx)": [{
"val": "Continue",
"key": "100"
}, {
"val": "Switching Protocols",
"key": "101"
}, {
"val": "Processing",
"key": "102"
}, {
"val": "Checkpoint",
"key": "103"
}, {
"val": "Request-URL too long(IE7)",
"key": "122"
}],
"HTTP Successful Codes (2xx)": [{
"val": "OK",
"key": "200"
}, {
"val": "Created",
"key": "201"
}, {
"val": "Successful",
"key": "202"
}, {
"val": "Non-authorative information",
"key": "203"
}, {
"val": "No content",
"key": "204"
}, {
"val": "Reset Content",
"key": "205"
}, {
"val": "Partial Content",
"key": "206"
}, {
"val": "Multi Status",
"key": "207"
}, {
"val": "Already Reported",
"key": "208"
}, {
"val": "IM used",
"key": "226"
}],
"HTTP Redirection Codes (3xx)": [{
"val": "Multiple Choices",
"key": "300"
}, {
"val": "Moved Permanently",
"key": "301"
}, {
"val": "Found",
"key": "302"
}, {
"val": "See Other",
"key": "303"
}, {
"val": "Not Modified",
"key": "304"
}, {
"val": "Use Proxy",
"key": "305"
}, {
"val": "Switch Proxy(unused)",
"key": "306"
}, {
"val": "Temporary Redirect",
"key": "307"
}, {
"val": "Resume Incomplete(PUT POST)",
"key": "308"
}],
"HTTP Client Error Codes (4xx)": [{
"val": "Bad Request",
"key": "400"
}, {
"val": "Unauthorized",
"key": "401"
}, {
"val": "Payment Required",
"key": "402"
}, {
"val": "Forbidden",
"key": "403"
}, {
"val": "Not Found",
"key": "404"
}, {
"val": "Method Not Allowed",
"key": "405"
}, {
"val": "Not Acceptable",
"key": "406"
}, {
"val": "Proxy Authentication Required",
"key": "407"
}, {
"val": "Request Timeout",
"key": "408"
}, {
"val": "Conflict",
"key": "409"
}, {
"val": "Gone",
"key": "410"
}, {
"val": "Length Required",
"key": "411"
}, {
"val": "Precondition Failed",
"key": "412"
}, {
"val": "Request Entity Too Large",
"key": "413"
}, {
"val": "Request URL Too Long",
"key": "414"
}, {
"val": "Unsupported Media Type",
"key": "415"
}, {
"val": "Request Range Not Satisfiable",
"key": "416"
}, {
"val": "Expectation Failed",
"key": "417"
}, {
"val": "I'm a Teapot",
"key": "418"
}, {
"val": "Unprocessable Entity",
"key": "422"
}, {
"val": "Locked",
"key": "423"
}, {
"val": "Failed Dependancy",
"key": "424"
}, {
"val": "Unordered Collection",
"key": "425"
}, {
"val": "Upgrade Required",
"key": "426"
}, {
"val": "Precondition Required",
"key": "428"
}, {
"val": "Too Many Requests",
"key": "429"
}, {
"val": "Request Header Fields Too Large",
"key": "431"
}, {
"val": "No Response",
"key": "444"
}, {
"val": "Retry With(MS)",
"key": "449"
}, {
"val": "Blocked by Parental Controls(MS)",
"key": "450"
}, {
"val": "Unavailable for Legal Reasons",
"key": "451"
}, {
"val": "Client Closed Request",
"key": "499"
}],
"HTTP Server Error Codes (5xx)": [{
"val": "Bad Request",
"key": "500"
}, {
"val": "Unauthorized",
"key": "501"
}, {
"val": "Payment Required",
"key": "502"
}, {
"val": "Forbidden",
"key": "503"
}, {
"val": "Not Found",
"key": "504"
}, {
"val": "Method Not Allowed",
"key": "505"
}, {
"val": "Not Acceptable",
"key": "506"
}, {
"val": "Proxy Authentication Required",
"key": "507"
}, {
"val": "Request Timeout",
"key": "508"
}, {
"val": "Conflict",
"key": "509"
}, {
"val": "Gone",
"key": "510"
}, {
"val": "Length Required",
"key": "511"
}, {
"val": "Precondition Failed",
"key": "598"
}, {
"val": "Request Entity Too Large",
"key": "599"
}]
}
}

View File

@ -0,0 +1,181 @@
{
"id": "emacs_idris_mode_cheat_sheet",
"name": "Idris-Mode for Emacs",
"description": "Shortcuts for the Idris-mode of the Emacs editor",
"metadata": {
"sourceName": "GiHub",
"sourceUrl": "https://github.com/idris-hackers/idris-mode#interactive-editing"
},
"template_type": "keyboard",
"aliases": [
"emacs idris-mode",
"emacs idris mode",
"idris-mode emacs",
"idris mode emacs",
"idris-mode for emacs",
"idris mode for emacs",
"idris emacs mode"
],
"section_order": [
"Loading Keys",
"Documentation",
"Editing",
"General Keys",
"Manipulate Active Terms",
"iPKG Keys"
],
"sections": {
"Documentation": [
{
"key": "[C-c], [C-t]",
"val": "Idris Type at Point"
},
{
"key": "[C-c], [C-d], [C-d]",
"val": "Docs at Point"
},
{
"key": "[C-c], [C-d], [d]",
"val": "Docs at Point"
},
{
"key": "[C-c], [C-d], [C-a]",
"val": "Apropos"
},
{
"key": "[C-c], [C-d], [a]",
"val": "Apropos"
},
{
"key": "[C-c], [C-d], [C-t]",
"val": "Type Search"
},
{
"key": "[C-c], [C-d], [t]",
"val": "Type Search"
}
],
"Editing": [
{
"key": "[C-c], [C-c]",
"val": "Case Split"
},
{
"key": "[C-c], [C-m]",
"val": "Add Missing"
},
{
"key": "[C-c], [C-e]",
"val": "Make Lemma"
},
{
"key": "[C-c], [C-s]",
"val": "Add Clause"
},
{
"key": "[C-c], [C-w]",
"val": "Make with block"
},
{
"key": "[C-c], [C-a]",
"val": "Proof Search"
},
{
"key": "[C-c], [C-r]",
"val": "Refine"
},
{
"key": "C-d",
"val": "Delete Forward Char"
},
{
"key": "M-n",
"val": "Next Error"
},
{
"key": "M-p",
"val": "Previous Error"
}
],
"General": [
{
"key": "[C-c], [C-z]",
"val": "Go to REPL"
},
{
"key": "[C-c], [C-SPC]",
"val": "Complete"
}
],
"Loading Keys": [
{
"key": "[C-c], [C-l]",
"val": "Load File"
},
{
"key": "[C-c], [C-n]",
"val": "Load Line Forward"
},
{
"key": "[C-c], [C-p]",
"val": "Load Line Backword"
}
],
"Manipulate Active Terms": [
{
"key": "[C-c], [C-m], [n]",
"val": "Normalise Term"
},
{
"key": "[C-c], [C-m], [i]",
"val": "Show Implicits"
},
{
"key": "[C-c], [C-m], [h]",
"val": "Hide Implicits"
},
{
"key": "[C-c], [C-m], [c]",
"val": "Show Core Term"
}
],
"iPKG Keys": [
{
"key": "[C-c], [C-b], [b]",
"val": "Build Idris Package"
},
{
"key": "[C-c], [C-b], [C-b]",
"val": "Build Idris Package"
},
{
"key": "[C-c], [C-b], [c]",
"val": "Clean Idris Package"
},
{
"key": "[C-c], [C-b], [C-c]",
"val": "Clean Idris Package"
},
{
"key": "[C-c], [C-b], [i]",
"val": "Install Idris Pacakage"
},
{
"key": "[C-c], [C-b], [C-i]",
"val": "Install Idris Pacakage"
},
{
"key": "[C-c], [C-f]",
"val": "Insert Field in Package File"
},
{
"key": "[C-c], [C-b], [C-p]",
"val": "Open Idris Package File"
},
{
"key": "[C-c], [C-b], [p]",
"val": "Open Idris Package File"
}
]
}
}

View File

@ -0,0 +1,193 @@
{
"id": "idris_repl_cheat_sheet",
"name": "Idris REPL",
"description": "Basic commands for the Idris REPL",
"metadata": {
"sourceName": "Idris-Lang",
"sourceUrl": "http://www.idris-lang.org"
},
"template_type": "terminal",
"section_order": [
"From the Prompt",
"Documentation and Searching",
"Changing Settings",
"Displaying Information",
"Advanced Usage"
],
"sections": {
"From the Prompt": [
{
"key": "<expr>",
"val": "Evaluate an expression."
},
{
"key": ":t, :type",
"val": "Check the type of an expression."
},
{
"key": ":q, :quit",
"val": "Exit the Idris system"
},
{
"key": ":w, :warranty",
"val": "Displays warranty information"
},
{
"key": ":?, :h, :help",
"val": "Display this help text"
},
{
"key": ":pp, :pprint <option> <number> <name>",
"val": "Pretty prints an Idris function in either LaTeX or HTML and for a specified width."
},
{
"key": ":r, :reload",
"val": "Reload current file"
},
{
"key": ":l, :load <filename>",
"val": "Load a new file"
},
{
"key": ":cd <filename>",
"val": "Change working directory"
},
{
"key": ":e, :edit",
"val": "Edit current file using $EDITOR or $VISUAL"
},
{
"key": ":module <module>",
"val": "Import an extra module"
},
{
"key": ":m, :metavars",
"val": "Show remaining proof obligations (metavariables or holes)"
},
{
"key": ":x <expr>",
"val": "Execute IO actions resulting from an expression using the interpreter"
},
{
"key": ":c, :compile <filename>",
"val": "Compile to an executable [codegen <filename>"
},
{
"key": ":exec, :execute <expr>",
"val": "Compile to an executable and run"
},
{
"key": ":let (<top-level declaration>)",
"val": "Evaluate a declaration, such as a function definition, instance implementation, or fixity declaration"
},
{
"key": ":unlet, :undefine (\\[<name>\\])",
"val": "Remove the listed repl definitions, or all repl definitions if no names given"
}
],
"Documentation and Searching": [
{
"key": ":doc <name>",
"val": "Show internal documentation"
},
{
"key": ":mkdoc <namespace>",
"val": "Generate IdrisDoc for namespace(s) and dependencies"
},
{
"key": ":apropos <package list> <name>",
"val": "Search names, types, and documentation"
},
{
"key": ":s :search \\[<package list>\\] <expr>",
"val": "Search for vals by type"
},
{
"key": ":browse <namespace>",
"val": "List the contents of some namespace"
}
],
"Displaying Information": [
{
"key": ":total <name>",
"val": "Check the totality of a name"
},
{
"key": ":miss, :missing <name>",
"val": "Show missing clauses"
},
{
"key": ":wc, :whocalls <name>",
"val": "List the callers of some name"
},
{
"key": ":cw, :callswho <name>",
"val": "List the callees of some name"
},
{
"key": ":printdef <name>",
"val": "Show the definition of a function"
},
{
"key": ":showproof <name>",
"val": "Show proof"
},
{
"key": ":proofs",
"val": "Show available proofs"
}
],
"Advanced Usage": [
{
"key": ":p, :prove <hole>",
"val": "Prove a metavariable"
},
{
"key": ":elab <hole>",
"val": "Build a metavariable using the elaboration shell"
},
{
"key": ":a, :addproof <name>",
"val": "Add proof to source file"
},
{
"key": ":rmproof <name>",
"val": "Remove proof from proof stack"
},
{
"key": ":core <expr>",
"val": "View the core language representation of a term"
},
{
"key": ":dynamic <filename>",
"val": "Dynamically load a C library (similar to %dynamic)"
},
{
"key": ":dynamic",
"val": "List dynamically loaded C libraries"
}
],
"Changing Settings": [
{
"key": ":set <option>",
"val": "Set an option (errorcontext, showimplicits)"
},
{
"key": ":unset <option>",
"val": "Unset an option"
},
{
"key": ":color, :colour <option>",
"val": "Turn REPL colours on or off; set a specific colour"
},
{
"key": ":consolewidth (auto|infinite|number)",
"val": "Set the width of the console"
},
{
"key": ":printerdepth \\[<number>\\]",
"val": "Set the maximum pretty-printer depth (no arg for infinite)"
}
]
}
}

View File

@ -0,0 +1,66 @@
{
"id": "imgur_cheat_sheet",
"name": "Imgur",
"description": "Shortcuts for Imgur.com",
"metadata": {
"sourceName": "Imgur",
"sourceUrl": "https://i.imgur.com/nz63EPD.png"
},
"section_order": [
"Voting",
"Accessibility",
"Homepage"
],
"sections": {
"Voting": [
{
"val": "Favorite",
"key": "0"
},
{
"val": "Favorite (Alternative)",
"key": "Insert"
},
{
"val": "Upvote",
"key": "+"
},
{
"val": "Downvote",
"key": "-"
}
],
"Accessibility": [
{
"val": "Previous image",
"key": "←"
},
{
"val": "Next image",
"key": "→"
},
{
"val": "Zoom",
"key": "Enter"
},
{
"val": "Slideshow",
"key": "[Ctrl] [F9]"
},
{
"val": "Expand album",
"key": "9"
}
],
"Homepage": [
{
"val": "Upload box",
"key": "%"
},
{
"val": "Exit upload or stats menu",
"key": "Esc"
}
]
}
}

View File

@ -0,0 +1,203 @@
{
"id": "java_cheat_sheet",
"name": "Java",
"metadata": {
"sourceName": "Cheatography",
"sourceUrl": "http://www.cheatography.com/sschaub/cheat-sheets/java-fundamentals/"
},
"template_type": "terminal",
"section_order": [ "Program Compilation and Execution",
"Data Types",
"Statements",
"Data Conver­sions",
"Text Formatting",
"String Methods",
"Ar­rayList Methods",
"Ha­shMap Methods"],
"sections": {
"Program Compilation and Execution" : [
{
"key" : "javac Hello.j­ava",
"val" : "Compile Java File"
},
{
"key" : "java Hello",
"val" : "Execute Java Program"
}
],
"Data Types": [
{
"key" : "byte/short/int/long",
"val" : "Integer Datatype."
},
{
"key" : "float/double",
"val" : "Floating Point Datatype."
},
{
"key" : "char",
"val" : "A Single Character."
},
{
"key" : "boolean",
"val" : "Represents True,False."
},
{
"key" : "String",
"val" : "Java object To Represent A Sequence Of Characters."
}
],
"Statements": [
{
"val" : "If Statement",
"key" : "if(expre­ssion)&nbsp;\\{­<br>&nbsp;&nbsp;&nbsp;&nbsp;st­ate­ments<br>\\}&nbsp;else&nbsp;\\{<br>&nbsp;&nbsp;&nbsp;&nbsp;­st­ate­ments<br>\\}"
},
{
"val" : "While Loop",
"key" : "while(expre­ssion)&nbsp;\\{<br>­&nbsp;&nbsp;&nbsp;&nbsp;st­ate­ments<br>\\}"
},
{
"val" : "Do While Loop ",
"key" : "do&nbsp;\\{<br>­&nbsp;&nbsp;&nbsp;&nbsp;st­ate­ments<br>\\}&nbsp;while(expre­ssion)"
},
{ "val" : "For Loop ",
"key" : "for(Initialization;&nbsp;Condition;&nbsp;Updation)&nbsp;\\{<br>&nbsp;&nbsp;&nbsp;&nbsp;­st­ate­ments<br>\\}"
},
{ "val" : "For Each Loop ",
"key" : "for(var&nbsp;:&nbsp;colle­ction)&nbsp;\\{<br>&nbsp;&nbsp;&nbsp;&nbsp;­st­ate­ments<br>\\}"
},
{
"val" : "Exce­ption Handling",
"key" : "try&nbsp;\\{­<br>&nbsp;&nbsp;&nbsp;&nbsp;sta­tem­ents<br>\\}&nbsp;catch(Exce­pti­onType&nbsp;e1)\\{<br>&nbsp;­&nbsp;&nbsp;&nbsp;­sta­tem­ents<br>\\}&nbsp;catch(Exception&nbsp;e2)&nbsp;\\{<br>­&nbsp;&nbsp;&nbsp;&nbsp;cat­ch-all&nbsp;statem­ents<br>\\}&nbsp;finally&nbsp;\\{<br>&nbsp;&nbsp;&nbsp;&nbsp;sta­tem­ents&nbsp;\\}"
}
],
"Data Conver­sions": [
{
"val" : "String to Number",
"key" : "int&nbsp;i&nbsp;=&nbsp;Intege­r.p­ars­eIn­t(­str);<br><br>double&nbsp;d&nbsp;=&nbsp;Double.pa­rse­Dou­ble­(s­tr);"
},
{
"val" : "Any Type to String",
"key" : "String&nbsps&nbsp=&nbspString.va­lue­Of(­va­lue);"
},
{
"val" : "Numeric Conver­sions",
"key" : "int&nbspi&nbsp=&nbsp(int)&nbspnumeric&nbspexpres­sion;"
}
],
"Text Formatting": [
{
"val" : "printf style format­ting",
"key" : "System.ou­t.p­rin­tf(­\"­Count&nbsp;is&nbsp;%d\n\",&nbsp;count);<br><br>s&nbsp;=&nbsp;String.fo­rma­t(\"Count&nbsp;is&nbsp;%d\",&nbsp;count);"
},
{
"val" : "Mess­age­Format style format­ting",
"key" : "Messag­eFo­rma­t.f­ormat(\"{0}&nbsp;rows.\",&nbsp;5);"
},
{
"val" : "Indi­vidual Numbers and Dates",
"key" : "Number­For­mat.ge­tCu­rre­ncy­Ins­tance().fo­rma­t(x);<br><br>Simple­Dat­eFo­rma­t(\"\"h:mm&nbsp;a\"\").fo­rma­t(new&nbsp;Date());<br><br>Decima­lFo­rma­t(\"#­,##­0.0­0\").fo­rma­t(1­25.32);"
}
],
"String Methods": [
{
"key" : "s.le­ngth()",
"val" : "Length Of S."
},
{
"key" : "s.ch­arA­t(i)",
"val" : "Extract ith Character."
},
{
"key" : "s.su­bst­rin­g(­start, end)",
"val" : "Substring From Start To End."
},
{
"key" : "s.to­Upp­erC­ase()/lowerCase()",
"val" : "Returns Copy Of s In Caps/Lower Case."
},
{
"key" : "s.in­dex­Of(x)",
"val" : "Index Of First Occurence Of x."
},
{
"key" : "s.re­pla­ce(­old, new)",
"val" : "Search And Replace."
},
{
"key" : "s.sp­lit­(r­egex)",
"val" : "Splits Into Tokens."
},
{
"key" : "s.trim()",
"val" : "Trims Surrounding White Space."
},
{
"key" : "s.eq­ual­s(s2)",
"val" : "True If s Equals s2."
},
{
"key" : "s.co­mpa­reT­o(s2)",
"val" : "0 if Equal or +ve If s > s2 or-ve If s < s2."
}
],
"Ar­rayList Methods" : [
{
"key" : "l.ad­d(­item)",
"val" : "Add Item To List."
},
{
"key" : "l.ge­t(i)",
"val" : "Return ith Item."
},
{
"key" : "l.size()",
"val" : "Returns The Number Of Items."
},
{
"key" : "l.re­mov­e(i)",
"val" : "Remove ith Item."
},
{
"key" : "l.se­t(i, value)",
"val" : "Put value At Position i."
}
],
"Ha­shMap Methods" : [
{
"key" : "m.pu­t(­key­,­value)",
"val" : "Inserts Value With Key."
},
{
"key" : "m.ge­t(­key)",
"val" : "Retrieves Value With Key."
},
{
"key" : "m.co­nta­ins­Key­(key)",
"val" : "True If m Contains Key."
}
]
}
}

View File

@ -0,0 +1,200 @@
{
"id": "javascript_cheat_sheet",
"name": "JavaScript Methods",
"description": "Explanation of core JavaScript methods",
"metadata": {
"sourceName": "OverAPI",
"sourceUrl": "http://overapi.com/javascript/"
},
"aliases": [
"js", "java script"
],
"template_type": "code",
"section_order": [
"Array Methods",
"String Methods",
"Math Methods",
"Number Methods",
"Boolean Methods",
"Global Methods"
],
"sections": {
"Array Methods": [{
"val": "Joins two or more arrays, and returns a copy of the joined arrays",
"key": "concact()"
}, {
"val": "Searches array for an element, and returns element's position",
"key": "indexOf()"
}, {
"val": "Joins all elements of an array into a string",
"key": "join()"
}, {
"val": "Searches array for an element, starting at the end, and returns element's position",
"key": "lastIndexOf()"
}, {
"val": "Removes last element of an array, and returns that element",
"key": "pop()"
}, {
"val": "Adds new element to the end of an array, and returns the new length",
"key": "push()"
}, {
"val": "Reverses the order of elements in an array",
"key": "reverse()"
}, {
"val": "Removes the first element of an array, and returns that element",
"key": "shift()"
}, {
"val": "Selects part of an array, and returns the new array",
"key": "slice()"
}, {
"val": "Sorts the elements of an array",
"key": "sort()"
}, {
"val": "Adds/Removes elements from an array",
"key": "splice()"
}, {
"val": "Converts an array to a string, and returns result",
"key": "toString()"
}, {
"val": "Adds new elements to the beginning of an array, and returns the new length",
"key": "unShift()"
}, {
"val": "Returns the primitive value of an array",
"key": "valueOf()"
}],
"Boolean Methods": [{
"val": "Converts a Boolean value to a string and returns the result",
"key": "toString()"
}, {
"val": "Returns the primitive value of a Boolean object",
"key": "valueOf()"
}],
"Math Methods": [{
"val": "Returns the absolute value of x",
"key": "abs(x)"
}, {
"val": "Returns x, rounded upwards to the nearest integer",
"key": "ceil()"
}, {
"val": "Returns x, rounded downwards to the nearest integer",
"key": "floor()"
}, {
"val": "Returns the number with the highest value",
"key": "max(x,y,z,...,n)"
}, {
"val": "Returns the number with the lowest value",
"key": "min(x,y,z,...,n)"
}, {
"val": "Returns the value of x to the power of y",
"key": "pow(x,y)"
}, {
"val": "Returns a random number between 0 (inclusive) and 1 (exclusive)",
"key": "random()"
}, {
"val": "Rounds x to the nearest integer",
"key": "round(x)"
}, {
"val": "Returns the square root of x",
"key": "sqrt(x)"
}],
"Number Methods": [{
"val": "Converts a number into an exponential notation",
"key": "toExponential(x)"
}, {
"val": "Formats a number with x numbers of digits after the decimal point",
"key": "toFixed(x)"
}, {
"val": "Formats a number to x length",
"key": "toPrecision(x)"
}, {
"val": "Converts a Number object to a string",
"key": "toString()"
}, {
"val": "Returns the primitive value of a Number object",
"key": "valueOf()"
}],
"String Methods": [{
"val": "Returns the character at the specified index",
"key": "charAt()"
}, {
"val": "Returns the Unicode of the character at the specified index",
"key": "charCodeAt()"
}, {
"val": "Joins two or more strings and returns a copy of the joined strings",
"key": "concat()"
}, {
"val": "Converts Unicode values to characters",
"key": "fromCharCode()"
}, {
"val": "Returns the position of the first found occurrence of a specified value in a string",
"key": "indexOf()"
}, {
"val": "Returns the position of the last found occurrence of a specified value in a string",
"key": "lastIndexOf()"
}, {
"val": "Searches for a match between a regular expression and a string, and returns the matches",
"key": "match()"
}, {
"val": "Searches for a match between a substring (or regular expression) and a string, and replaces the matched substring with a new substring",
"key": "replace()"
}, {
"val": "Searches for a match between a regular expression and a string, and returns the position of the match",
"key": "search()"
}, {
"val": "Extracts a part of a string and returns a new string",
"key": "slice()"
}, {
"val": "Splits a string into an array of substrings",
"key": "split()"
}, {
"val": "Extracts the characters from a string, beginning at a specified start position, and through the specified number of characters",
"key": "substr()"
}, {
"val": "Extracts the characters from a string, between two specified indices",
"key": "substring()"
}, {
"val": "Converts a string to lowercase letters",
"key": "toLowerCase()"
}, {
"val": "Converts a string to uppercase letters",
"key": "toUpperCase()"
}, {
"val": "Returns the primitive value of a String object",
"key": "valueOf()"
}],
"Global Methods": [{
"val": "Decodes a URI",
"key": "decodeURI()"
}, {
"val": "Decodes a URI component",
"key": "decodeURIComponent()"
}, {
"val": "Encodes a URI",
"key": "encodeURI()"
}, {
"val": "Encodes a URI component",
"key": "encodeURIComponent()"
}, {
"val": "Evaluates a string and executes it as if it was script code",
"key": "eval()"
}, {
"val": "Determines whether a value is a finite, legal number",
"key": "isFinite()"
}, {
"val": "Determines whether a value is an illegal number",
"key": "isNaN()"
}, {
"val": "Converts an object's value to a number",
"key": "Number()"
}, {
"val": "Parses a string and returns a floating point number",
"key": "parseFloat()"
}, {
"val": "Parses a string and returns an integer",
"key": "parseInt()"
}, {
"val": "Converts an object's value to a string",
"key": "String()"
}]
}
}

View File

@ -0,0 +1,396 @@
{
"id": "kmplayer_cheat_sheet",
"description": "Multimedia Player",
"metadata": {
"sourceName": "KB Mode",
"sourceURL": "http://kbmode.com/windows/kmplayer-keyboard-shortcuts/"
},
"aliases": [
"k-multimedia player"
],
"template_type": "keyboard",
"section_order": [
"Open",
"Album",
"Screen Controls",
"Pan & Scan",
"Playback",
"Subtitles",
"Video (basic)",
"Video (Advanced)",
"Audio",
"Capture",
"Option",
"Playlist",
"Exit"
],
"sections": {
"Exit": [
{
"key": "[Alt] [F4]",
"val": "Exit Kmplayer"
}
],
"Playlist": [
{
"key": "[Alt] [E]",
"val": "Playlist editor"
},
{
"key": "[Shift] [Del]",
"val": "Delete a file playing"
},
{
"key": "[Shift] [Ctrl] [Del] ",
"val": "Delete a file playing instantly"
}
],
"Option": [
{
"key": "F2",
"val": "Preference"
},
{
"key": "F2",
"val": "Help"
}
],
"Capture": [
{
"key": "[Ctrl] [Alt] [S] ",
"val": "Make Storyboard"
},
{
"key": "[Alt] [A]",
"val": "Audio Capture"
},
{
"key": "[Alt] [C]",
"val": "Video Capture"
},
{
"key": "[Ctrl] [E] ",
"val": "Frame : Orginal"
},
{
"key": "[Ctrl] [A] ",
"val": "Frame : Quick Capture"
},
{
"key": "[Ctrl] [G] ",
"val": "Frame Extract"
}
],
"Audio": [
{
"key": "Down",
"val": "Volume Down"
},
{
"key": "UP",
"val": "Volume Up"
},
{
"key": "M",
"val": "Mute "
},
{
"key": "[Shift] [PgDn]",
"val": "PreAmp: Decrease"
},
{
"key": "[Shift] [PgUp]",
"val": "PreAmp: Increase"
},
{
"key": "[Shift] [F1] ",
"val": "Equalizer"
},
{
"key": "[Shift] [F2]",
"val": "Normalizer"
},
{
"key": "[Shift] [F3]",
"val": "True Bass"
},
{
"key": "[Shift] [F4]",
"val": "Treble Enhance"
},
{
"key": "[Shift] [F5]",
"val": "Remove Left Channel"
},
{
"key": "[Shift] [F6]",
"val": "Remove Right Channel"
},
{
"key": "[Shift] [F7]",
"val": "Swap Channels"
},
{
"key": "[Shift] [F8]",
"val": "Downmix to Mono"
},
{
"key": "[Shift] [F9]",
"val": "Crystality"
},
{
"key": "[Shift] [Bksp]",
"val": "Ignore All Settings "
}
],
"Video (Advanced)": [
{
"key": "[Alt] [I]",
"val": "Deinterlacing"
},
{
"key": "[Alt] [H]",
"val": "Post Processing"
},
{
"key": "[Alt] [S]",
"val": "Sharpen"
},
{
"key": "[Alt] [W]",
"val": "aWarpSharp"
},
{
"key": "[Alt] [B]",
"val": "Soften (Blur)"
},
{
"key": "[Alt] [N]",
"val": "Gradual Denoise"
},
{
"key": "[Alt] [V]",
"val": "Denoise 3D"
},
{
"key": "[Alt] [Z]",
"val": "Level Control"
},
{
"key": "[Alt] [D]",
"val": "Dscaler Filters"
},
{
"key": "[Alt] [F]",
"val": "Super Speed Mode"
},
{
"key": "[Alt] [Ctrl] [F]",
"val": "High Speed Mode"
}
],
"Video (basic)": [
{
"key": "[Ctrl] [F1]",
"val": "Motion Blur"
},
{
"key": "[Ctrl] [F2]",
"val": "Soften"
},
{
"key": "[Ctrl] [F3]",
"val": "Sharpen"
},
{
"key": "[Ctrl] [F4]",
"val": "Media Vertical Filter"
},
{
"key": "[Ctrl] [F5]",
"val": "Media Horizontal Filter"
},
{
"key": "[Ctrl] [F6]",
"val": "Mean Y filter"
},
{
"key": "[Ctrl] [F7]",
"val": "Mean UV filter"
},
{
"key": "[Ctrl] [F8]",
"val": "Grayscale"
},
{
"key": "[Ctrl] [F9]",
"val": "Auto Level Control"
},
{
"key": "[Ctrl] [F10]",
"val": "Mirror Image"
},
{
"key": "[Ctrl] [F11]",
"val": "Flip input picture"
},
{
"key": "[Ctrl] [F12]",
"val": "Flip Output Picture"
}
],
"Subtitles": [
{
"key": "[Ctrl] [Alt] [Q]",
"val": "Online Subtitle Finder"
},
{
"key": "[Alt] [O]",
"val": "Load Subtitles"
},
{
"key": "[Alt] [X]",
"val": "Show/Hide Subtitles"
},
{
"key": "[Alt] [F1]",
"val": "Increase font size"
},
{
"key": "[Alt] [F2]",
"val": "Decrease font size"
},
{
"key": "[Alt] [F3]",
"val": "Size Reset"
}
],
"Playback": [
{
"key": "Space",
"val": "Play/Pause"
},
{
"key": "[Ctrl] [Space]",
"val": "Stop"
},
{
"key": "F",
"val": "Frame Step"
},
{
"key": "[Shift] [F]",
"val": "Frame Step Back"
},
{
"key": "Page up",
"val": "Previous"
},
{
"key": "PgDn",
"val": "Next"
},
{
"key": "[Shift] [Num] [-]",
"val": "Slow"
},
{
"key": "[Shift] [Num] [*]",
"val": "Normal"
},
{
"key": "[Shift] [Num] [+]",
"val": "Fast"
},
{
"key": "[Shift] [/]",
"val": "Set Speed"
}
],
"Screen Controls": [
{
"key": "[Alt] [1]",
"val": "Half Size"
},
{
"key": "[Alt] [2]",
"val": "Normal Size"
},
{
"key": "[Alt] [3]",
"val": "One half size"
},
{
"key": "[Alt] [4]",
"val": "Double Size"
},
{
"key": "[Alt] [Enter]",
"val": "Full Screen (Normal) "
},
{
"key": "[Ctrl] [Alt] [Enter]",
"val": "Full Screen (Overscan)"
},
{
"key": "[Shift] [Ctrl] [Enter]",
"val": "Maximize Window"
},
{
"key": "[Shift] [Enter]",
"val": "Desktop Mode"
}
],
"Album": [
{
"key": "[Ctrl] [Up]",
"val": "Previous Album"
},
{
"key": "[Shift] [Ctrl] [Down]",
"val": "Next Album"
}
],
"Open": [
{
"key": "[Ctrl] [O]",
"val": "Open"
},
{
"key": "[Ctrl] [U]",
"val": "Open URL"
},
{
"key": "[Ctrl] [F]",
"val": "Open Folder"
},
{
"key": "[Ctrl] [J]",
"val": "Open File Navigator"
},
{
"key": "[Ctrl] [R]",
"val": "Open Recent File"
},
{
"key": "[Ctrl] [P]",
"val": "Re Open current file"
},
{
"key": "[Ctrl] [D]",
"val": "Open DVD"
},
{
"key": "[Ctrl] [V]",
"val": "Open DVD File"
},
{
"key": "[Ctrl] [K]",
"val": "Open Video CD"
}
]
}
}

View File

@ -34,10 +34,12 @@
"Accessibility"
],
"sections": {
"General shortcuts": [{
"General shortcuts": [
{
"val": "File menu",
"key": "[Alt] [f]"
}, {
},
{
"val": "File menu (alternative)",
"key": "[F10], [f]"
}, {

View File

@ -0,0 +1,82 @@
{
"id": "mtg_phases_cheat_sheet",
"name": "Magic: The Gathering Phases and Steps",
"description": "Turn Structure",
"metadata": {
"sourceName": "WoTC",
"sourceUrl": "http://archive.wizards.com/Magic/tcg/article.aspx?x=magic/rules"
},
"template_type": "reference",
"aliases": [
"mtg turn structure",
"magic the gathering phases",
"magic the gathering turn structure"
],
"section_order": [
"Beginning Phase",
"Precombat Main Phase",
"Combat Phase",
"Postcombat Main Phase",
"Ending Phase"
],
"sections": {
"Beginning Phase": [
{
"key": "Untap Step",
"val": "The active player untaps the permanents they control. The active player doesn't recieve priority."
},
{
"key": "Upkeep Step",
"val": "Complete any actions or pay any costs that occur during upkeep. The active player recieves priority now."
},
{
"key": "Draw Step",
"val": "The active player draws a card for the turn. This does not use the stack."
}
],
"Precombat Main Phase": [
{
"key": "(No Step)",
"val": "The active player may play a land (if one hasn't been played this turn), play spells (the opponent may use abilities and instants in response). Lasts until neither player wants to use a spell or ability (i.e. the stack is empty and all players pass priority)."
}
],
"Combat Phase": [
{
"key": "Beginning of Combat Step",
"val": "Play instants or activate abilities. The active player declares which player will be attacked."
},
{
"key": "Declare Attackers Step",
"val": "The active player declares whether a creature will attack an opponent or their planeswalker."
},
{
"key": "Declare Blockers Step",
"val": "Opponents declare what creatures will be blocked and abilities/instants can be played in response."
},
{
"key": "Combat Damage Step",
"val": "The active player and defending player declare how combat damage will be assigned. An additional combat step is used for creatures with first or double strike."
},
{
"key": "End of Combat Step",
"val": "Triggers occuring at the end of combat are put on to the stack and the active player recieves priority."
}
],
"Postcombat Main Phase": [
{
"key": "(No Step)",
"val": "The active player may play a land (if one hasn't been played this turn), play spells (the opponent may use abilities and instants in response). Lasts until neither player wants to use a spell or ability (i.e. the stack is empty and all players pass priority)."
}
],
"Ending Phase": [
{
"key": "End Step",
"val": "Triggers occuring during the end step are put on to the stack and the active player recieves priority for the last time in a turn."
},
{
"key": "Cleanup Step",
"val": "The active player reduces their hand to 7 cards or less, removes marked damage from all permanents, then passes the turn. No player recieves priority."
}
]
}
}

View File

@ -0,0 +1,326 @@
{
"id": "nmap_cheat_sheet",
"name": "nmap",
"description": "Nmap Security Scanner",
"metadata": {
"sourceName": "nmap cookbook",
"sourceUrl": "http://nmapcookbook.blogspot.com.br/2010/02/nmap-cheat-sheet.html"
},
"template_type": "terminal",
"section_order": [
"Basic Scanning Techniques",
"Discovery Options",
"Advanced Scanning Options",
"Port Scanning Options",
"Version Detection",
"Timing Options",
"Firewall Evasion Techniques",
"Output Options",
"Troubleshooting and Debugging",
"Nmap Scripting Engine",
"Ndiff"
],
"sections": {
"Basic Scanning Techniques": [{
"val": "Scan a single target",
"key": "nmap \\[target\\]"
}, {
"val": "Scan multiple targets",
"key": "nmap \\[target1, target2, etc\\]"
}, {
"val": "Scan a list of targets",
"key": "nmap -iL \\[list.txt\\]"
}, {
"val": "Scan a range of hosts",
"key": "nmap \\[range of IP adresses\\]"
}, {
"val": "Scan an entire subnet",
"key": "nmap \\[ip address/cdir\\]"
}, {
"val": "Scan random hosts",
"key": "nmap -iR \\[number\\]"
}, {
"val": "Excluding targets from a scan",
"key": "nmap \\[targets\\] --exclude \\[targets\\]"
}, {
"val": "Excluding targets using a list",
"key": "nmap \\[targets\\] --excludefile \\[list.txt\\]"
}, {
"val": "Perform an agressive scan",
"key": "nmap -A \\[target\\]"
}, {
"val": "Scan an IPv6 target",
"key": "nmap -6 \\[target\\]"
}],
"Discovery Options": [{
"val": "Perform a ping-only scan",
"key": "nmap -sP \\[target\\]"
}, {
"val": "Don't ping",
"key": "nmap -PN \\[target\\]"
}, {
"val": "TCP SYN ping",
"key": "nmap -PS \\[target\\]"
}, {
"val": "TCP ACK ping",
"key": "nmap -PA \\[target\\]"
}, {
"val": "UDP ping",
"key": "nmap -PU \\[target\\]"
}, {
"val": "SCTP INIT ping",
"key": "nmap -PY \\[target\\]"
}, {
"val": "ICMP echo ping",
"key": "nmap -PE \\[target\\]"
}, {
"val": "ICMP timestamp ping",
"key": "nmap -PP \\[target\\]"
}, {
"val": "ICMP address mask ping",
"key": "nmap -PM \\[target\\]"
}, {
"val": "IP protocol ping",
"key": "nmap -PO \\[target\\]"
}, {
"val": "ARP ping",
"key": "nmap -PR \\[target\\]"
}, {
"val": "Traceroute",
"key": "nmap --traceroute \\[target\\]"
}, {
"val": "Force reverse DNS resolution",
"key": "nmap -R \\[target\\]"
}, {
"val": "Disable reverse DNS resolution",
"key": "nmap -n \\[target\\]"
}, {
"val": "Alternative DNS lookup",
"key": "nmap --system-dns \\[target\\]"
}, {
"val": "Manually specify DNS server(s)",
"key": "nmap --dns-servers \\[servers\\] \\[target\\]"
}, {
"val": "Create a host list",
"key": "nmap -sL \\[targets\\]"
}],
"Advanced Scanning Functions": [{
"val": "TCP SYN scan",
"key": "nmap -sS \\[target\\]"
}, {
"val": "TCP connect scan",
"key": "nmap -sT \\[target\\]"
}, {
"val": "UDP scan",
"key": "nmap -sU \\[target\\]"
}, {
"val": "TCP NULL scan",
"key": "nmap -sN \\[target\\]"
}, {
"val": "TCP FIN scan",
"key": "nmap -sF \\[target\\]"
}, {
"val": "Xmas scan",
"key": "nmap -sA \\[target\\]"
}, {
"val": "TCP ACK scan",
"key": "nmap -sA \\[target\\]"
}, {
"val": "Custom TCP scan",
"key": "nmap --scanflags \\[flags\\] \\[target\\]"
}, {
"val": "IP protocol scan",
"key": "nmap -sO \\[target\\]"
}, {
"val": "Send raw ethernet packets",
"key": "nmap --send-eth \\[target\\]"
}, {
"val": "Send IP packets",
"key": "nmap --send-ip \\[target\\]"
}],
"Port Scanning Options": [{
"val": "Perform a fast scan",
"key": "nmap -F \\[target\\]"
}, {
"val": "Scan specific ports",
"key": "nmap -p \\[port(s)\\] \\[target\\]"
}, {
"val": "Scan ports by name",
"key": "nmap -p \\[port name(s)\\] \\[target\\]"
}, {
"val": "Scan ports by protocol",
"key": "nmap -sU -sT -p U:\\[ports\\],T:\\[ports\\] \\[target\\]"
}, {
"val": "Scan all ports",
"key": "nmap -p \"*\" \\[target\\]"
}, {
"val": "Scan top ports",
"key": "nmap --top-ports \\[number\\] \\[target\\]"
}, {
"val": "Perform a sequential port scan",
"key": "nmap -r \\[target\\]"
}, {
"val": "Attempt to guess an unknown OS",
"key": "nmap -O --osscan-guess \\[target\\]"
}, {
"val": "Service version detection",
"key": "nmap -sV \\[target\\]"
}, {
"val": "Troubleshooting version scans",
"key": "nmap -sV --version-trace \\[target\\]"
}, {
"val": "Perform a RPC scan",
"key": "nmap -sR \\[target\\]"
}],
"Timing Options": [{
"val": "Timing templates",
"key": "nmap -T\\[0-5\\] \\[target\\]"
}, {
"val": "Set the packet TTL",
"key": "nmap --ttl \\[time\\] \\[target\\]"
}, {
"val": "Minimum number of parallel operations",
"key": "nmap --min-parallelism \\[number\\] \\[target\\]"
}, {
"val": "Maximum number of parallel operations",
"key": "nmap --max-parallelism \\[number\\] \\[target\\]"
}, {
"val": "Minimum host group size",
"key": "nmap --min-hostgroup \\[number\\] \\[targets\\]"
}, {
"val": "Maximum host group size",
"key": "nmap --max-hostgroup \\[number\\] \\[targets\\]"
}, {
"val": "Maximum RTT timeout",
"key": "nmap --initial-rtt-timeout \\[time\\] \\[target\\]"
}, {
"val": "Initial RTT timeout",
"key": "nmap --max-rtt-timeout \\[TTL\\] \\[target\\]"
}, {
"val": "Maximum number of retries",
"key": "nmap --max-retries \\[number\\] \\[target\\]"
}, {
"val": "Host timeout",
"key": "nmap --host-timeout \\[time\\] \\[target\\]"
}, {
"val": "Minimum scan delay",
"key": "nmap --scan-delay \\[time\\] \\[target\\]"
}, {
"val": "Maximum scan delay",
"key": "nmap --max-scan-delay \\[time\\] \\[target\\]"
}, {
"val": "Minimum packet rate",
"key": "nmap --min-rate \\[number\\] \\[target\\]"
}, {
"val": "Maximum packet rate",
"key": "nmap --max-rate \\[number\\] \\[target\\]"
}, {
"val": "Defeat reset rate limits",
"key": "nmap --defeat-rst-ratelimit \\[target]"
}],
"Firewall Evasion Techniques": [{
"val": "Fragment packets",
"key": "nmap -f \\[target\\]"
}, {
"val": "Specify a specific MTU",
"key": "nmap --mtu \\[MTU\\] \\[target\\]"
}, {
"val": "Use a decoy",
"key": "nmap -D RND:\\[number\\] \\[target\\]"
}, {
"val": "Idle zombie scan",
"key": "nmap -sI \\[zombie\\] \\[target\\]"
}, {
"val": "Manually specify a source port",
"key": "nmap --source-port \\[port\\] \\[target\\]"
}, {
"val": "Append random data",
"key": "nmap --data-length \\[size\\] \\[target\\]"
}, {
"val": "Randomize target scan order",
"key": "nmap --randomize-hosts \\[target\\]"
}, {
"val": "Spoof MAC address",
"key": "nmap --spoof-mac \\[MAC|0|vendor\\] \\[target\\]"
}, {
"val": "Send bad checksums",
"key": "nmap --badsum \\[target\\]"
}],
"Output Options": [{
"val": "Save output to a text file",
"key": "nmap -oN \\[scan.txt\\] \\[target\\]"
}, {
"val": "Save output to a XML file",
"key": "nmap -oX \\[scan.xml\\] \\[target\\]"
}, {
"val": "Grepable output",
"key": "nmap -oG \\[scan.txt\\] \\[target\\]"
}, {
"val": "Output all supported file types",
"key": "nmap -oA \\[path\/filename\\] \\[target\\]"
}, {
"val": "Periodically display statistics",
"key": "nmap --stats-every \\[time\\] \\[target\\]"
}, {
"val": "1337 output",
"key": "nmap -oS \\[scan.txt\\] \\[target\\]"
}],
"Troubleshooting and Debugging": [{
"val": "Getting help",
"key": "nmap -h"
}, {
"val": "Display nmap version",
"key": "nmap -V"
}, {
"val": "Verbose output",
"key": "nmap -v \\[target\\]"
}, {
"val": "Debugging",
"key": "nmap -d \\[target\\]"
}, {
"val": "Display port state reason",
"key": "nmap --reason \\[target\\]"
}, {
"val": "Only display open ports",
"key": "nmap --open \\[target\\]"
}, {
"val": "Trace packets",
"key": "nmap --packet-trace \\[target\\]"
}, {
"val": "Display host networking",
"key": "nmap --iflist"
}, {
"val": "Specify a network interface",
"key": "nmap -e \\[interface\\] \\[target\\]"
}],
"Nmap Scripting Engine": [{
"val": "Execute individual scripts",
"key": "nmap --script \\[script.nse\\] \\[target\\]"
}, {
"val": "Execute multiple scripts",
"key": "nmap --script \\[expression\\] \\[target\\]"
}, {
"val": "Execute scripts by category",
"key": "nmap --script \\[category\\] \\[target\\]"
}, {
"val": "Execute multiple script categories",
"key": "nmap --script \\[category1,category2,etc\\]"
}, {
"val": "Troubleshoot scripts",
"key": "nmap --script \\[script\\] --script-trace \\[target\\]"
}, {
"val": "Update the script database",
"key": "nmap --script-updatedb"
}],
"Ndiff": [{
"val": "Comparison using Ndiff",
"key": "$ ndiff \\[scan1.xml\\] \\[scan2.xml\\]"
}, {
"val": "Ndiff verbose mode",
"key": "$ ndiff -v \\[scan1.xml\\] \\[scan2.xml\\]"
}, {
"val": "XML output mode",
"key": "$ ndiff --xml \\[scan1.xml\\] \\[scan2.xml\\]"
}]
}
}

View File

@ -0,0 +1,63 @@
{
"id": "openboot_cheat_sheet",
"name": "OpenBoot",
"description": "Quick reference of OpenBoot commands on SUN Workstations",
"metadata": {
"sourceName": "SUN OpenBoot Quick Reference",
"sourceUrl": "http://irtfweb.ifa.hawaii.edu/~spex/computers/spex1/techdocs/1201-hilodog/SunOBP_Quick_Ref.pdf"
},
"aliases": [
"sun boot prompt", "sun openboot"
],
"template_type": "code",
"section_order": ["Basic Commands", "Other Helpful Commands"],
"sections": {
"Basic Commands": [{
"val": "Shows up the startup banner",
"key": "banner"
}, {
"val": "Boots the system from its default device",
"key": "boot"
}, {
"val": "Boots from hard drive #1",
"key": "boot disk"
}, {
"val": "Boots from floppy",
"key": "boot floppy"
}, {
"val": "Quickboots from network",
"key": "boot net"
}, {
"val": "Boots from CD drive",
"key": "boot cdrom"
}, {
"val": "Switches off the machine",
"key": "power-off"
}],
"Other Helpful Commands": [{
"val": "Ejects the floppy",
"key": "eject floppy"
}, {
"val": "Ejects the CD drive",
"key": "eject cdrom"
}, {
"val": "Re-sets all NVRAM contents",
"key": "[Stop] [N]"
}, {
"val": "Sets the entire PROM to default values",
"key": "set-defaults"
}, {
"val": "Restarts the system",
"key": "reset"
}, {
"val": "Shows all device aliases",
"key": "devalias"
}, {
"val": "Shows all NVRAM envs",
"key": "printenv"
}, {
"val": "Re-Scans devices on all SCSI buses",
"key": "probe-scsi-all"
}]
}
}

View File

@ -0,0 +1,265 @@
{
"id":"opera_cheat_sheet",
"name":"Opera Browser",
"description":"To utilize all the keys you must activate advance keyboard option (Settings>Browser>Under Shortcuts, tick the Enable advanced keyboard shortcuts checkbox.)",
"template_type":"keyboard",
"metadata":{
"sourceName":"MakeUseOf",
"sourceUrl":"http://www.makeuseof.com/tag/opera-shortcuts/"
},
"aliases": [
"opera browser"
],
"section_order":[
"Navigation",
"Scrolling",
"Search",
"Tabs",
"History",
"System keys ",
"Display",
"Zooming",
"Email"
],
"sections":{
"Navigation":[
{
"val":"Next Link up",
"key":"[Shift] [↑]"
},
{
"val":"Next Link down",
"key":"[Shift] [↓]"
},
{
"val":"Next Link to the left",
"key":"[Shift] [←]"
},
{
"val":"Next link to the right",
"key":"[Shift] [→]"
},
{
"val":"Activate link",
"key":"Enter"
},
{
"val":"Activate link in new tab",
"key":"[Shift] [Enter]"
}
],
"Scrolling":[
{
"val":"One line up",
"key":"↑"
},
{
"val":"One line down",
"key":"↓"
},
{
"val":"Go to top",
"key":"Home"
},
{
"val":"Go to bottom",
"key":"End"
}
],
"Search":[
{
"val":"Find text in page",
"key":"[Ctrl] [F]"
},
{
"val":"Find next instance of page",
"key":"[Ctrl] [G]"
},
{
"val":"Find previous instance of page",
"key":"[Ctrl] [Shift] [G]"
},
{
"val":"Find text in links in page",
"key":"[Shift] [/]"
}
],
"Tabs":[
{
"val":"Close Tab",
"key":"[Ctrl] [W]"
},
{
"val":"Close window",
"key":"[Alt] [F4]"
},
{
"val":"Open new Tab",
"key":"[Ctrl] [T]"
},
{
"val":"Cycle between tabs",
"key":"[Ctrl] [Tab]"
}
],
"History":[
{
"val":"Reload",
"key":"F5"
},
{
"val":"Show history",
"key":"[ctrl] [H]"
}
],
"System Keys":[
{
"val":"Open file",
"key":"[Ctrl] [O]"
},
{
"val":"Save copy of page",
"key":"[Ctrl] [S]"
},
{
"val":"Set preferences",
"key":"[Alt] [P]"
},
{
"val":"Quit opera",
"key":"[Ctrl] [Q]"
}
],
"Display":[
{
"val":"Use entire screen for viewing page",
"key":"F11"
},
{
"val":"back to normal",
"key":"Esc"
}
],
"Zooming":[
{
"val":"Zoom in 10%",
"key":"0"
},
{
"val":"Zoom out 10%",
"key":"9"
},
{
"val":"Zoom in 100%",
"key":"8"
},
{
"val":"Zoom out 100%",
"key":"7"
},
{
"val":"Restore Zoom",
"key":"6"
}
],
"Email":[
{
"val":"Check Email",
"key":"[Ctrl] [K]"
},
{
"val":"Write new EmaiL",
"key":"[Ctrl] [E]"
},
{
"val":"Save Email to draft",
"key":"[Ctrl] [S]"
},
{
"val":"Next Email",
"key":"J"
},
{
"val":"Previous Email",
"key":"U"
},
{
"val":"Check Email",
"key":"[Shift] [J]"
},
{
"val":"Go to next unread Email",
"key":"[Shift] [U]"
},
{
"val":"Scroll Up",
"key":"[Alt] [↑]"
},
{
"val":"Scroll down",
"key":"[Alt] [↓]"
},
{
"val":"Close thread",
"key":"←"
},
{
"val":"Expand thread",
"key":"→"
},
{
"val":"Close all threads",
"key":"[Shift] [←]"
},
{
"val":"Expand all threads",
"key":"[Shift] [→]"
},
{
"val":"Send composed message",
"key":"[Ctrl] [Shift] [S]"
},
{
"val":"Mark all selected email in active view as read",
"key":"[Ctrl] [Shift] [A]"
},
{
"val":"Mark selected email as read",
"key":"K"
},
{
"val":"Mark selected email as read and go to next unread email",
"key":"G"
},
{
"val":"Mark selected email as read and go to previous unread email",
"key":"T"
},
{
"val":"Mark selected email as unread",
"key":"[Shift] [K]"
},
{
"val":"Mark all email in active window as read",
"key":"[Ctrl] [Shift] [K]"
},
{
"val":"Reply",
"key":"R"
},
{
"val":"Reply to all recipients",
"key":"[Shift] [R]"
},
{
"val":"Forward",
"key":"F"
},
{
"val":"Re-direct email",
"key":"D"
}
]
}
}

View File

@ -0,0 +1,184 @@
{
"id": "sublime_text_osx_cheat_sheet",
"name": "Sublime Text 2 (OS X)",
"aliases": [
"sublime mac",
"sublime osx",
"sublime for mac",
"sublime 2 for osx",
"sublime text osx",
"sublime text os x",
"sublimetext mac",
"sublimetext osx",
"sublimetext os x"
],
"metadata": {
"sourceName": "Cheatography",
"sourceUrl": "http://www.cheatography.com/gelicia/cheat-sheets/sublime-text-2-shortcuts-verbose-mac/"
},
"template_type": "keyboard",
"section_order": [
"General",
"File Navigation",
"View/Window Manipulation",
"Find",
"Line Manipulation"
],
"sections": {
"General": [{
"key":"[⌘] [Shift] [N]",
"val":"New File in New Tab"
}, {
"key":"[⌘] [S]",
"val":"Save"
}, {
"key":"[⌘] [Shift] [S]",
"val":"Save As"
}, {
"key":"[⌘] [K] [U]",
"val":"Upper Case"
}, {
"key":"[⌘] [K] [L]",
"val":"Lower Case"
}, {
"key":"[⌘] [Z]",
"val":"Undo"
}, {
"key":"[⌘] [Y]",
"val":"Re-do"
}, {
"key":"[⌘] [U]",
"val":"Undo Movement (Soft Undo)"
}, {
"key":"[⌘] [Shift] [U]",
"val":"Re-do Movement (Soft Re-do)"
}, {
"key":"[Ctrl] [Space]",
"val":"Auto Complete (Repeat for Next Selection)"
}, {
"key":"[Ctrl] [M]",
"val":"Jump to Matching Bracket"
}, {
"key":"[⌘] [/]",
"val":"Toggle comment"
}, {
"key":"[⌘] [Option] [/]",
"val":"Toggle Block Comment"
}, {
"key":"[⌘] [Space]",
"val":"Show Completions"
}, {
"key":"[⌘] [Shift] [P]",
"val":"Command Prompt"
}],
"File Navigation": [{
"key":"[⌘] [Shift] [N]",
"val":"New File in New Window"
}, {
"key":"[⌘] [W]",
"val":"Close Current File"
}, {
"key":"[⌘] [G]",
"val":"Go to Line"
}, {
"key":"[⌘] [F2]",
"val":"Set Bookmark"
}, {
"key":"[Shift] [F2]",
"val":"Previous Bookmarks"
}, {
"key":"[⌘] [Shift] [F2]",
"val":"Clear all Bookmarks"
}, {
"key":"F2",
"val":"Go to Next Bookmark"
}],
"View/Window Manipulation": [{
"key":"[⌘] [K] [B]",
"val":"Toggle Side Bar"
}, {
"key":"[⌘] [Option] [1]",
"val":"Single Column Layout"
}, {
"key":"[⌘] [Option] [2]",
"val":"Two Column Layout"
}, {
"key":"[⌘] [Option] [5]",
"val":"Grid Layout"
}, {
"key":"[Ctrl] ( [1] / [2] / [3] / [4] )",
"val":"Focus Group"
}, {
"key":"[Ctrl] [Shift] ( [1] / [2] / [3] / [4] )",
"val":"Move File to Group"
}, {
"key":"[⌘] ( [1] / [2] / [3] / [4] )",
"val":"Select Tab"
}],
"Find": [{
"key":"[⌘] [F]",
"val":"Find"
}, {
"key":"[Option] [⌘] [G]",
"val":"Find Next"
}, {
"key":"[Ctrl] [⌘] [G]",
"val":"Find All Occurrences"
}, {
"key":"[⌘] [Option] [F]",
"val":"Replace"
}, {
"key":"[⌘] [Shift] [F]",
"val":"Find in Files"
}],
"Line Manipulation": [{
"key":"[⌘] [L]",
"val":"Select Line"
}, {
"key":"[⌘] [D]",
"val":"Select Word"
}, {
"key":"[Ctrl] [Shift] [M]",
"val":"Select Content in Brackets"
}, {
"key":"[⌘] [Shift] [Enter]",
"val":"Insert Line Before Cursor"
}, {
"key":"[⌘] [Enter]",
"val":"Insert Line After"
}, {
"key":"[⌘] [Shift] [D]",
"val":"Duplicate Line or Lines"
}, {
"key":"[⌘] [J]",
"val":"Join Lines"
}, {
"key":"[⌘] [Shift] [A]",
"val":"Select Content Into Tag"
}, {
"key":"[Ctrl] [Shift] [K]",
"val":"Delete Line"
}, {
"key":"[⌘] [K], [K]",
"val":"Delete from Cursor to End of Line"
}, {
"key":"[⌘] [K] [Delete]",
"val":"Delete from Cursor to Beginning of Line"
}, {
"key":"[⌘] [Option] [.]",
"val":"Close Tag"
}, {
"key":"[⌘] [X]",
"val":"Cut Line"
}, {
"key":"[⌘] [V]",
"val":"Paste Cut/Copied line above"
}, {
"key":"[⌘] [Shift] [V]",
"val":"Paste and Indent"
}, {
"key":"[Ctrl] [M]",
"val":"Jump to Matching Bracket"
}]
}
}

View File

@ -0,0 +1,132 @@
{
"id" : "microsoft_windows_ten_cheat_sheet",
"name" : "Microsoft Windows 10",
"description" : "List of shortcuts only for Windows 10",
"metadata" : {
"sourcename" : "How-To Geek",
"sourceUrl" : "http://www.howtogeek.com/198122/32-new-keyboard-shortcuts-in-the-windows-10-technical-preview"
},
"aliases" : [
"windows 10",
"microsoft windows 10"
],
"template_type": "keyboard",
"section_order": [
"Windows Snapping",
"Task view / Window Management",
"Virtual Desktops",
"Command Prompt",
"More Shortcuts"
],
"sections" : {
"Windows Snapping" : [{
"val" : "Snap current window to the left side of the screen",
"key" : "[Win] [←]"
},{
"val" : "Snap current window the the right side of the screen",
"key" : "[Win] [→]"
},{
"val" : "Snap current window to the top of the screen",
"key" : "[Win] [↑]"
},{
"val" : "Snap current window to the bottom of the screen",
"key" : "[Win] [↓]"
}],
"Task view / Window Management" : [{
"val" : "Opens the new Task View interface",
"key" : "[Win] [Tab]"
},{
"val" : "Switchs between open windows",
"key" : "[Alt] [Tab]"
}],
"Virtual Desktops": [{
"val" : "Create a new virtual desktop and switch to it",
"key" : "[Win] [Ctrl] [d]"
},{
"val" : "Close the current virtual desktop",
"key" : "[Win] [Ctrl] [F4]"
},{
"val" : "Switch to the virtual desktop on the left",
"key" : "[Win] [Ctrl] [←]"
},{
"val" : "Switch to the virtual desktop on the right",
"key" : "[Win] [Ctrl] [→]"
}],
"Command Prompt" : [{
"val" : "Paste",
"key" : "[Ctrl] [v]"
},{
"val" : "Paste (alternative)",
"key" : "[Shift] [Insert]"
},{
"val" : "Copy",
"key" : "[Ctrl] [c]"
},{
"val" : "Copy (alternative)",
"key" : "[Ctrl] [Insert]"
},{
"val" : "Selects all",
"key" : "[Ctrl] [a]"
},{
"val" : "Selects text to the left of the cursor",
"key" : "[Shift] [←]"
},{
"val" : "Selects text to the right of the cursor",
"key" : "[Shift] [→]"
},{
"val" : "Selects text down a line",
"key" : "[Shift] [↓]"
},{
"val" : "Selects text up a line",
"key" : "[Shift] [↑]"
},{
"val" : "Moves the cursor, Selects the words along the left",
"key" : "[Ctrl] [Shift] [←]"
},{
"val" : "Moves the cursor, Selects the words along the right",
"key" : "[Ctrl] [Shift] [→]"
},{
"val" : "Moves the cursor to the beginning of the current line, selects text along the way",
"key" : "[Shift] [Home]"
},{
"val" : "Moves the cursor to the end of the current line, selects text along the way",
"key" : "[Shift] [End]"
},{
"val" : "Moves the cursor up the screen, selects text",
"key" : "[Shift] [PageUp]"
},{
"val" : "Moves the cursor down the screen, selects text",
"key" : "[Shift] [PageDown]"
},{
"val" : " Moves the cursor to the beginning,selects all text between the cursor and the beginning",
"key" : "[Ctrl] [Shift] [Home]"
},{
"val" : " Moves the cursor to the end,selects all text between the cursor and the end",
"key" : "[Ctrl] [Shift] [End]"
}],
"More Shortcuts" : [{
"val" : "Moves one line up in the Command Prompts history",
"key" : "[Ctrl] [↑]"
},{
"val" : "Moves one line down in the Command Prompts history",
"key" : "[Ctrl] [↓]"
},{
"val" : "Moves one page up in the Command Prompts history",
"key" : "[Ctrl] [PageUp]"
},{
"val" : "Moves one page down in the Command Prompts history",
"key" : "[Ctrl] [PageDown]"
},{
"val" : "Enter “mark mode,” which helps for selecting text",
"key" : "[Ctrl] [M]"
},{
"val" : "Find text in Command Prompt",
"key" : "[Ctrl] [F]"
},{
"val" : "Closes the Command Prompt window",
"key" : "[Alt] [F4]"
}]
}
}

View File

@ -1,13 +1,16 @@
{
"id": "xwing_alliance_cheat_sheet",
"name": "X-Wing Alliance Shortcuts",
"name": "Star Wars X-Wing Alliance",
"description": "Keyboard commands for Star Wars X-Wing Alliance simulation game",
"metadata": {
"sourceName": "Darksaber's X-Wing Station",
"sourceUrl": "http://www.darksaber.xwaupgrade.com/archive/files/X-Wing_Alliance_Reference_Card_Printable.pdf"
},
"aliases": [
"x-wing alliance"
"x-wing alliance",
"star wars x-wing alliance",
"star wars x wing alliance",
"xwa"
],
"template_type": "keyboard",
"section_order": ["Targeting", "Energy", "Propulsion", "Weapons & Shields", "Turret & Dock", "View", "Communications", "Other"],
@ -16,7 +19,7 @@
{ "key": "R", "val": "Nearest enemy fighter" },
{ "key": "E", "val": "Nearest craft targeting you" },
{ "key": "T", "val": "Next target" },
{ "key": "Y", "val": "Previous target" },
{ "key": "Y", "val": "Previous target" },
{ "key": "U", "val": "Newest craft" },
{ "key": "I", "val": "Nearest incoming warhead" },
{ "key": "O", "val": "Nearest objective" },
@ -61,33 +64,33 @@
{ "key": "[Shift] ([F11] / [F12])", "val": "Save Throttle/Energy Preset #1/#2"}
],
"Weapons & Shields": [
{ "key": "S", "val": "Cycle shield settings" },
{ "key": "S", "val": "Cycle shield settings" },
{ "key": "W", "val": "Switch weapons" },
{ "key": "X", "val": "Switch firing-linking modes" },
{ "key": "Z", "val": "Cycles through Gun Harmonization modes" },
{ "key": "B", "val": "Toggle beam weapon on/off" },
{ "key": "C", "val": "Fire countermeasure" }
],
],
"Turret & Dock": [
{ "key": "G", "val": "Switch to/from gunner position" },
{ "key": "F", "val": "Cycle gunner/pilot IA settings" },
{ "key": "[Shift] [D]", "val": "Dock with target" },
{ "key": "[Shift] [P]", "val": "Pick up target" },
{ "key": "G", "val": "Switch to/from gunner position" },
{ "key": "F", "val": "Cycle gunner/pilot IA settings" },
{ "key": "[Shift] [D]", "val": "Dock with target" },
{ "key": "[Shift] [P]", "val": "Pick up target" },
{ "key": "[Shift] [R]", "val": "Release carried object" }
],
"View": [
{ "key": "M", "val": "View/leave map" },
{ "key": "M", "val": "View/leave map" },
{ "key": "[Alt] [.]", "val": "Simple HUD mode" },
{ "key": ".", "val": "Toggle cockpit mode on/off" },
{ "key": "L", "val": "Lock view on target (cockpit mode)" },
{ "key": "L", "val": "Lock view on target (cockpit mode)" },
{ "key": "NumLock", "val": "Free look with mouse (cockpit mode)" }
],
],
"Communications": [
{ "key": "[Shift] [A]", "val": "\"Attack my target!\"" },
{ "key": "[Shift] [A]", "val": "\"Attack my target!\"" },
{ "key": "[Shift] [I]", "val": "\"Ignore my target!\"" },
{ "key": "[Shift] [C]", "val": "\"Cover me!\"" },
{ "key": "[Shift] [E]", "val": "\"Run away!\"" },
{ "key": "[Shift] [Tab]", "val": "Toggle chat line to other players" },
{ "key": "[Shift] [Tab]", "val": "Toggle chat line to other players" },
{ "key": "Space", "val": "Confirm critical order" }
]
}

View File

@ -2,57 +2,64 @@
color: #333;
}
.name-days-country {
.zci--name_days .name-days-country {
padding-right: 2em;
white-space: nowrap;
vertical-align: top;
width: 25%;
}
.name-days-dates {
.zci--name_days .name-days-dates {
width: 75%;
}
.name-days-country-name, .name-days-tile {
.zci--name_days .name-days-country-name,
.zci--name_days .name-days-tile {
line-height: 1.6;
}
.name-days-country-name {
.zci--name_days .name-days-country-name {
vertical-align: middle;
padding-left: 0.4em;
}
.name-days-country .flag-sm {
.zci--name_days .name-days-country .flag-sm {
vertical-align: middle;
}
.name-days-country, .name-days-dates {
.zci--name_days .name-days-country,
.zci--name_days .name-days-dates {
border-bottom: solid 1px #DDD;
padding-top: 0.3em;
padding-bottom: 0.3em;
}
tr:last-of-type .name-days-country, tr:last-of-type .name-days-dates {
.zci--name_days tr:last-of-type .name-days-country,
.zci--name_days tr:last-of-type .name-days-dates {
border-bottom: none;
}
.name-days-tile span {
.zci--name_days .name-days-tile span {
padding: 0 0.5em 0 0;
}
.name-days-tile {
.zci--name_days .name-days-tile {
display: inline-block;
min-width: 33%;
}
@media (max-width: 600px) {
.name-days-tile {
.zci--name_days .name-days-tile {
min-width: 50%;
}
}
@media (max-width: 400px) {
.name-days-tile {
.zci--name_days .name-days-tile {
width: 100%;
}
}
.zci--name_days {
max-width: 44em;
}

View File

@ -19,12 +19,12 @@ sub get_flag {
sub header_name {
my $query = shift;
return '<span>Name days for <b>' . $query . '</b></span><div class="zci__content"><table>';
return '<div class="zci--name_days"><span>Name days for <b>' . $query . '</b></span><div class="zci__content"><table>';
}
sub header_date {
my $query = shift;
return '<span>Name days on <b>' . $query . '</b></span><div class="zci__content"><table>';
return '<div class="zci--name_days"><span>Name days on <b>' . $query . '</b></span><div class="zci__content"><table>';
}
sub line {
@ -39,7 +39,7 @@ sub tile {
return "<div class=\"name-days-tile\"><span>$month $days</span></div>";
}
my $footer = '</table></div>';
my $footer = '</table></div></div>';
@ -66,17 +66,17 @@ my $feb_29_html = header_date('February 29th') . line('Czech Republic', 'Horymí
my $dec_30_html = header_date('December 30th') . line('Croatia', 'Silvestar, Silvestrovo, Zahvalnica') . line('Czech Republic', 'David') .
line('Denmark', 'David') . line('France', 'Roger') . line('Hungary', 'Dávid'). line('Latvia', 'Dāvis, Dāvids').
line('Poland', 'Dawid, Eugeniusz, Katarzyna, Uniedrog') . line('Slovakia', 'Dávid, Lotar').
line('Poland', 'Dawid, Eugeniusz, Katarzyna, Uniedrog') . line('Slovakia', 'Dávid, Lotar').
line('Sweden', 'Abel, Set'). $footer;
my $dec_31_html = header_date('December 31st') . line('Czech Republic', 'Silvestr') . line('Denmark', 'Sylvester') .
line('France', 'Sylvestre') . line('Hungary', 'Szilveszter') . line('Latvia', 'Kalvis, Silvestris') .
line('Poland', 'Korneliusz, Melania, Sebastian, Sylwester, Tworzysław') .
line('Slovakia', 'Silvester, Horst') . line('Sweden', 'Sylvester') . $footer;
my $tamara_html = header_name('Tamara') . line('Czech Republic', tile('3', 'Jun')) . line('Hungary', tile('29', 'Dec')) .
line('Poland', tile('3', 'Jun')) . line('Slovakia', tile('26', 'Jan')) . $footer;
my $maria_poland = line('Poland', tile('23', 'Jan') . tile('2, 11', 'Feb') . tile('25', 'Mar') . tile('14, 26, 28', 'Apr') .
tile('3, 24, 25, 29', 'May') . tile('2, 13, 27', 'Jun') . tile('2, 16, 17, 22, 29', 'Jul') .
tile('2, 4, 5, 15, 22, 26', 'Aug') . tile('8, 12, 15, 24', 'Sep') .
@ -91,7 +91,7 @@ my $maria_html = header_name('Maria') . line('Bulgaria', tile('15', 'Aug')) .
ddg_goodie_test(
[qw( DDG::Goodie::NameDays )],
'name day mieszko' => test_zci('Poland: 1 Jan', html =>
header_name('Mieszko') . line('Poland', tile('1', 'Jan')) . $footer),
header_name('Mieszko') . line('Poland', tile('1', 'Jan')) . $footer),
'maria imieniny' => test_zci($maria, html => $maria_html),
'3 June name day' => test_zci('Croatia: Karlo Lwanga, dr.; Czech Republic: Tamara; Denmark: Erasmus; France: Kévin; ' .
'Greece: Marinos, Nikiforos; Hungary: Klotild, Cecília; Latvia: Inta, Dailis; ' .
@ -107,13 +107,13 @@ ddg_goodie_test(
'namedays dec 30' => test_zci($dec_30, html => $dec_30_html),
'name day 1 Jan' => test_zci('Bulgaria: Vassil; Croatia: Marija; Denmark: Nytårsdag; France: Jour de l\'An; ' .
'Greece: Basilius, Telemachus; Hungary: Fruzsina; Latvia: Solvija, Laimnesis; Poland: Mieczysław, Mieszko; Sweden: Nyårsdagen', html =>
header_date('January 1st') . line('Bulgaria', 'Vassil') . line('Croatia', 'Marija') . line('Denmark', 'Nytårsdag') .
header_date('January 1st') . line('Bulgaria', 'Vassil') . line('Croatia', 'Marija') . line('Denmark', 'Nytårsdag') .
line('France', 'Jour de l\'An') . line('Greece', 'Basilius, Telemachus') . line('Hungary', 'Fruzsina') .
line('Latvia', 'Solvija, Laimnesis') . line('Poland', 'Mieczysław, Mieszko') . line('Sweden', 'Nyårsdagen') . $footer),
'Radmila svátek' => test_zci('Croatia: 11 Apr; Czech Republic: 3 Jan; Slovakia: 3 Jan', html =>
header_name('Radmila') . line('Croatia', tile('11', 'Apr')) . line('Czech Republic', tile('3', 'Jan')) .
header_name('Radmila') . line('Croatia', tile('11', 'Apr')) . line('Czech Republic', tile('3', 'Jan')) .
line('Slovakia', tile('3', 'Jan')) . $footer),
# 1st, 2nd, 3rd, etc.
'imieniny Dec 22' => test_zci('Croatia: Ivan Kentijski, Viktorija; Czech Republic: Šimon; Denmark: Japetus; France: François Xavière; ' .
'Greece: Anastasias, Anastasia; Hungary: Zénó; Latvia: Donis, Donalds; ' .
@ -121,30 +121,30 @@ ddg_goodie_test(
'Sweden: Natanael, Jonatan', html =>
header_date('December 22nd') . line('Croatia', 'Ivan Kentijski, Viktorija') .
line('Czech Republic', 'Šimon') . line('Denmark', 'Japetus') . line('France', 'François Xavière') .
line('Greece', 'Anastasias, Anastasia') . line('Hungary', 'Zénó') . line('Latvia', 'Donis, Donalds') .
line('Poland', 'Beata, Drogomir, Franciszka, Zenon') .
line('Slovakia', 'Adela, Ada, Adelaida, Adelgunda, Adelína, Adina, Alida') .
line('Greece', 'Anastasias, Anastasia') . line('Hungary', 'Zénó') . line('Latvia', 'Donis, Donalds') .
line('Poland', 'Beata, Drogomir, Franciszka, Zenon') .
line('Slovakia', 'Adela, Ada, Adelaida, Adelgunda, Adelína, Adina, Alida') .
line('Sweden', 'Natanael, Jonatan') . $footer ),
'imieniny Aug 12' => test_zci('Croatia: Anicet, Hilarija; Czech Republic: Klára; Denmark: Clara; France: Clarisse; Hungary: Klára; ' .
'Latvia: Klāra, Vārpa; Poland: Klara, Lech, Piotr; Slovakia: Darina, Dárius, Dária; Sweden: Klara', html =>
header_date('August 12th') . line('Croatia', 'Anicet, Hilarija') .
line('Czech Republic', 'Klára') . line('Denmark', 'Clara') . line('France', 'Clarisse') .
line('Hungary', 'Klára') . line('Latvia', 'Klāra, Vārpa') . line('Poland', 'Klara, Lech, Piotr') .
header_date('August 12th') . line('Croatia', 'Anicet, Hilarija') .
line('Czech Republic', 'Klára') . line('Denmark', 'Clara') . line('France', 'Clarisse') .
line('Hungary', 'Klára') . line('Latvia', 'Klāra, Vārpa') . line('Poland', 'Klara, Lech, Piotr') .
line('Slovakia', 'Darina, Dárius, Dária') . line('Sweden', 'Klara') . $footer ),
# Genetive case
'imieniny marii' => test_zci($marii, html => $marii_html),
'imieniny Tamary' => test_zci("Poland: 3 Jun", html => header_name('Tamary') . line('Poland', tile('3', 'Jun')) . $footer),
'imieniny Tamara' => test_zci($tamara, html => $tamara_html),
'imieniny 29 Feb' => test_zci($feb_29, html => $feb_29_html),
'imieniny February 29th' => test_zci($feb_29, html => $feb_29_html),
# US date format
'name days 12/30' => test_zci($dec_30, html => $dec_30_html),
'name days 2/29' => test_zci($feb_29, html => $feb_29_html),
'name days 1 / 09' => test_zci($jan_9, html => $jan_9_html),
# Polish date formats
'imieniny 30.12' => test_zci($dec_30, html => $dec_30_html),
'imieniny 9.01' => test_zci($jan_9, html => $jan_9_html),
@ -155,13 +155,13 @@ ddg_goodie_test(
'imieniny 31 Grudnia' => test_zci($dec_31, html => $dec_31_html),
'Imieniny 31 GRUDNIA' => test_zci($dec_31, html => $dec_31_html),
'Imieniny 29 lutego' => test_zci($feb_29, html => $feb_29_html),
# Czech date formats
'svátek 9 ledna' => test_zci($jan_9, html => $jan_9_html),
'jmeniny 9 leden' => test_zci($jan_9, html => $jan_9_html),
'svátek 31 Prosince' => test_zci($dec_31, html => $dec_31_html),
'jmeniny 29 února' => test_zci($feb_29, html => $feb_29_html),
# Try to include some examples of queries on which it might
# appear that your answer will trigger, but does not.
'name day 12/32' => undef,