Skip to content

Instantly share code, notes, and snippets.

View naveensrinivasan's full-sized avatar

Naveen naveensrinivasan

View GitHub Profile
Top contributor in Github Ocotkit - https://github.com/octokit/octokit.net/graphs/contributors?from=2015-08-17&to=2016-01-16&type=c
Github Profile - https://github.com/naveensrinivasan
Stackover flow - One of the top contributors to Windbg - Addressed the most arcane internals of the CLR and Windows http://stackoverflow.com/tags/windbg/topusers
My own blog - http://www.naveensrinivasan.com/ - Right now working a lot on the algorithmic challenges on solving problems - https://github.com/naveensrinivasan/adventcode
type Node<'a> = { value : 'a; left : Node<'a> option; right : Node<'a> option }
@naveensrinivasan
naveensrinivasan / 7.fsx
Created January 12, 2016 22:36
Here is my solution to adventcode problem 7 using F# which is a functional language.
open System
open System.IO
open System.Text.RegularExpressions
let filereadlines f = File.ReadAllLines(Path.Combine(__SOURCE_DIRECTORY__, f))
type Operations =
| ASSIGNVALUE
| ASSIGN of string
| AND of string * string
set nohud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
let hintcharacters = "asdfghjkl"
map j j j
@naveensrinivasan
naveensrinivasan / SlowXSTypeProvider.fs
Created December 23, 2015 02:13
slow XS type provider
#r "/Users/naveen/Projects/githubstats/packages/FSharp.Data.2.2.5/lib/portable-net40+sl5+wp8+win8/FSharp.Data.dll"
open FSharp.Data
type GitHubEvent = JsonProvider<""" [
{
"type": "CreateEvent",
"public": true,
"payload": "{\"ref\":\"3.35\",\"ref_type\":\"tag\",\"master_branch\":\"master\",\"description\":\"\",\"pusher_type\":\"user\"}",
➜ choco git:(master) ✗ ./build.sh
BUILD FAILED
Compilation failed:
/var/folders/zc/sh267kp90m5ccjz100_hddmh0000gn/T/485d48bc/2414ad89.0.cs(18,43) : error CS0246: The type or namespace name `Task' could not be found. Are you missing `System.Threading.Tasks' or `NAnt.Core' using directive?
/var/folders/zc/sh267kp90m5ccjz100_hddmh0000gn/T/485d48bc/2414ad89.0.cs(29,37) : error CS0115: `nant5b9da17e4c2d4f968bd35cbc81de30e4.ResultsProcessTask.ExecuteTask()' is marked as an override but no suitable method found to override
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
var keywords = new[] { "GET", "DELETE", "PATCH", "POST" };
var document =new HtmlDocument();
document .LoadHtml(
(new HtmlWeb()
.Load("https://developer.github.com/v3/")
.DocumentNode.SelectSingleNode("/html[1]/body[1]/div[3]/div[2]/div[1]").ChildNodes
.Select(cn => cn.InnerHtml)
.Where(cn => !string.IsNullOrEmpty(cn.Trim()))
.First()));
@naveensrinivasan
naveensrinivasan / FilesSnapshot.xml
Created December 7, 2015 02:06
Gist created with unicode characters for the folder Gist_20151205_222102_3425
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\AquaSnap\AquaSnap.nupkg" checksum="2AE441E4591807CAC88A6656B35FC6E6" />
<file path="C:\ProgramData\chocolatey\lib\AquaSnap\AquaSnap.png" checksum="937E0B688A818F30C7CC82D56EEB6E71" />
<file path="C:\ProgramData\chocolatey\lib\AquaSnap\tools\ChocolateyInstall.ps1" checksum="9C9613385ED336A2651E864FC6D504AF" />
<file path="C:\ProgramData\chocolatey\lib\AquaSnap\tools\ChocolateyUninstall.ps1" checksum="33ACC853A7A23CE93C245069B379BA03" />
</files>
</fileSnapshot>
@naveensrinivasan
naveensrinivasan / FilesSnapshot.xml
Created December 7, 2015 02:06
Gist created with unicode characters for the folder Gist_20151205_212007_4893
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\MongoDb30\MongoDb30.nupkg" checksum="D277E1E3F21F4FF6A690CB44F5860CC4" />
<file path="C:\ProgramData\chocolatey\lib\MongoDb30\tools\chocolateyInstall.ps1" checksum="0975E20D93FDD46BAD2C2F162245665F" />
</files>
</fileSnapshot>
@naveensrinivasan
naveensrinivasan / FilesSnapshot.xml
Created December 7, 2015 02:06
Gist created with unicode characters for the folder Gist_20151205_211459_1119
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\PowerBI\ms.png" checksum="1530AE05EC7B783F4FB5942493DCD235" />
<file path="C:\ProgramData\chocolatey\lib\PowerBI\PowerBI.nupkg" checksum="93CB8ECC18C75C548DC150D864B120C4" />
<file path="C:\ProgramData\chocolatey\lib\PowerBI\tools\ChocolateyInstall.ps1" checksum="920291FE1353C2F0FB9F949B9AED8F05" />
<file path="C:\ProgramData\chocolatey\lib\PowerBI\tools\ChocolateyUninstall.ps1" checksum="FEBB4F2571CB19EF9E7AC780AB664385" />
</files>
</fileSnapshot>