Skip to content

Instantly share code, notes, and snippets.

View kgashok's full-sized avatar
🎯
Focusing

Ashok Bakthavathsalam kgashok

🎯
Focusing
View GitHub Profile
@kgashok
kgashok / todo.md
Last active August 29, 2015 14:03
both checked and unchecked

###ToDo list

  • Do it

  • Test it

  • Fix it

  • Done this well

  • Nice work!

@kgashok
kgashok / Sample.elm
Created April 30, 2016 17:30 — forked from rundis/Sample.elm
Reversing a string using a stack
module Sample where
import Stack exposing (..)
import String
import Html exposing (..)
reverseString : String -> String
reverseString str =
String.split "" str
|> Stack.fromList
@kgashok
kgashok / fizzbuzz.elm
Last active May 6, 2016 01:29 — forked from ctran/fizzbuzz.elm
Fizz Buzz in elm
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
@kgashok
kgashok / C++Example.cpp
Created May 10, 2016 02:57 — forked from ahmedahamid/C++Example.cpp
Why I started to feel differently about C# | Using STL map
//
// (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
{
@kgashok
kgashok / C#Example.cs
Created May 10, 2016 02:58 — forked from ahmedahamid/C#Example.cs
Why I started to feel differently about C# | Using Dictionaries
//
// (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}
};
//
@kgashok
kgashok / info_sec python modules
Created October 31, 2016 19:01 — forked from sh1nu11bi/info_sec python modules
This a collection of Python modules commonly associated with InfoSec.
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
@kgashok
kgashok / enterprise-tic-tac-toe-2.fsx
Created March 3, 2017 19:09 — forked from swlaschin/enterprise-tic-tac-toe-2.fsx
Follow up to the example of implementing "enterprise" tic-tac-toe in a functional way.
(*
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/
*)
@kgashok
kgashok / Game.fsx
Created March 3, 2017 19:16 — forked from battermann/Game.fsx
Data-centric vs Function-centric Domain Design
open System
// -----------------------------------------------------------
// Domain
// -----------------------------------------------------------
module GameDomain =
type Dice = One | Two | Three | Four | Five | Six
@kgashok
kgashok / Game.fsx
Created March 3, 2017 19:16 — forked from battermann/Game.fsx
Data-centric vs Function-centric Domain Design
open System
// -----------------------------------------------------------
// Domain
// -----------------------------------------------------------
module GameDomain =
type Dice = One | Two | Three | Four | Five | Six
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]();