-
Do it
-
Test it
-
Fix it
-
Done this well
-
Nice work!
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 Sample where | |
import Stack exposing (..) | |
import String | |
import Html exposing (..) | |
reverseString : String -> String | |
reverseString str = | |
String.split "" str | |
|> Stack.fromList |
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
import Graphics.Element exposing (Element, flow, down, show) | |
import List exposing (map) | |
main : Element | |
main = | |
let fizzBuzz n = case (n % 3, n % 5) of | |
(0, 0) -> "FizzBuzz" | |
(0, _) -> "Fizz" | |
(_, 0) -> "Buzz" | |
_ -> toString 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
// | |
// (1) C++: - Defining a dictionary [key type=string, value type=int] | |
// - No easy way to initialize. | |
// | |
map<string, int> dict; | |
// | |
// (1`) C++11: Defining and initializing a dictionary [key type=string, value type=int] | |
// | |
map<string, int> dict | |
{ |
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
// | |
// (1) C#: Defining an initializing a dictionary [key type=string, value type=int] | |
// | |
Dictionary<string, int> dict = new Dictionary<string, int>() | |
{ | |
{"Eve", 101}, | |
{"George", 150}, | |
{"Emma", 200} | |
}; | |
// |
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
Scapy: send, sniff and dissect and forge network packets. Usable interactively or as a library | |
pypcap, Pcapy and pylibpcap: several different Python bindings for libpcap | |
libdnet: low-level networking routines, including interface lookup and Ethernet frame transmission | |
dpkt: fast, simple packet creation/parsing, with definitions for the basic TCP/IP protocols | |
Impacket: craft and decode network packets. Includes support for higher-level protocols such as NMB and SMB | |
pynids: libnids wrapper offering sniffing, IP defragmentation, TCP stream reassembly and port scan detection | |
Dirtbags py-pcap: read pcap files without libpcap | |
flowgrep: grep through packet payloads using regular expressions | |
Knock Subdomain Scan, enumerate subdomains on a target domain through a wordlist | |
Mallory, extensible TCP/UDP man-in-the-middle proxy, supports modifying non-standard protocols on the fly |
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
(* | |
enterprise-tic-tac-toe-2.fsx | |
Follow up to the example of implementing "enterprise" tic-tac-toe in a functional way. | |
* Added true capability based security. | |
Related blog post: http://fsharpforfunandprofit.com/posts/enterprise-tic-tac-toe-2/ | |
*) |
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
open System | |
// ----------------------------------------------------------- | |
// Domain | |
// ----------------------------------------------------------- | |
module GameDomain = | |
type Dice = One | Two | Three | Four | Five | Six |
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
open System | |
// ----------------------------------------------------------- | |
// Domain | |
// ----------------------------------------------------------- | |
module GameDomain = | |
type Dice = One | Two | Three | Four | Five | Six |
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
var serialAsyncMap = function () { | |
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(collection, fn) { | |
var result, _iterator, _isArray, _i, _ref2, item; | |
return regeneratorRuntime.wrap(function _callee$(_context) { | |
while (1) { | |
switch (_context.prev = _context.next) { | |
case 0: | |
result = []; | |
_iterator = collection, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); |
OlderNewer