Skip to content

Instantly share code, notes, and snippets.

Looking for Opportunity

Sangram sangram-chavan

Looking for Opportunity
View GitHub Profile
sangram-chavan / Create-Bootable-ISO-Image-From-OS-X-For-VirtualBox
Last active Apr 14, 2020
View Create-Bootable-ISO-Image-From-OS-X-For-VirtualBox
# Mount the installer image
hdiutil attach Install\ OS\ X\ -noverify -nobrowse -mountpoint /Volumes/install_app
# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite
# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Yosemite.sparseimage
sangram-chavan /
Created Mar 18, 2020 — forked from jamesramsay/
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
    • LABEL_TO_DELETE: the label that should be have old messages deleted
sangram-chavan / DateTime Precision
Created May 5, 2015
Calculate DateTime, Environment.Ticks and Stopwatch Precision
View DateTime Precision
int xcnt = 0;
long xdelta, xstart;
xstart = DateTime.UtcNow.Ticks;
xdelta = DateTime.UtcNow.Ticks - xstart;
} while (xdelta == 0);
Console.WriteLine("DateTime:\t{0} ms, in {1} cycles", xdelta / (10000.0), xcnt);
View Clear EventViewer Log.bat
@echo off
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
echo goto theEnd
echo clearing %1
wevtutil.exe cl %1
goto :eof

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

View CustomTimeSpanFormatter
/* Custom TimeSpan formar