Skip to content

Instantly share code, notes, and snippets.

Gaurav Kamath st0le

Block or report user

Report or block st0le

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
st0le / PlaysTvDownloader.ps1
Last active Dec 3, 2019
Downloads all public videos of a user
View PlaysTvDownloader.ps1
# Copy and paste this in a Powershell window. Enter the userId at the prompt. Follow instruction below to get your userId
# download all PlaysTv videos of a user
# To find the user id, navigate to the your profile while logged in (IMPORTANT!)
# View source of the page, In the <html> tag there's data-conf attribute.
# The json in there will have the user id under []
function Safe-Title {
param (
st0le / DraculaMod
Last active Aug 23, 2019
Windows Terminal Theme
View DraculaMod
"background": "#282A36",
"black": "#21222C",
"blue": "#F1FA8C",
"brightBlack": "#6272A4",
"brightBlue": "#D6ACFF",
"brightCyan": "#A4FFFF",
"brightGreen": "#69FF94",
"brightPurple": "#FF92DF",
"brightRed": "#FF6E6E",
st0le / UbuntuLegit.json
Created Aug 9, 2019
UbuntuLegit Windows Terminal Scheme
View UbuntuLegit.json
"background": "#2C001E",
"black": "#4E9A06",
"blue": "#3465A4",
"brightBlack": "#555753",
"brightBlue": "#729FCF",
"brightCyan": "#34E2E2",
"brightGreen": "#8AE234",
"brightPurple": "#AD7FA8",
def popcount(n):
c = 0
while n != 0:
c += n % 2
n //= 2
return c
def popcount_range_naive(n):
return sum(map(popcount, range(n + 1)))

Keybase proof

I hereby claim:

  • I am ST0LE on github.
  • I am gauravkamath ( on keybase.
  • I have a public key whose fingerprint is AC20 EC1E 4274 DA5F 32E4 4704 B9C9 97B3 05BE A391

To claim this, I am signing this object:

st0le / Find-FirstItem.ps1
Last active Mar 22, 2018
Simple Utility Function
View Find-FirstItem.ps1
Function Find-FirstItem {
[Parameter(Mandatory, Position = 0)]
[string] $Filter
Get-ChildItem -Recurse -Filter $Filter | Select-Object -First 1 -ExpandProperty FullName
View Systray.cs
using System;
using System.Drawing;
using System.Windows.Forms;
namespace MyTrayApp
public class SysTrayApp : Form
public static void Main()
st0le / MediaKeys.ahk
Created Nov 14, 2017
Add MediaKey shortcuts to normal keyboard
View MediaKeys.ahk
; ^ = Ctrl
; volume up
; volume down
; volume mute
st0le / autoexec.cfg
Last active Jul 16, 2017
View autoexec.cfg
alias +jumpthrow "+jump;-attack"
alias -jumpthrow "-jump"
bind mouse3 +jumpthrow
bind mouse5 +voicerecord
alias +fwdjumpthrow "+forward;+jump;-attack"
alias -fwdjumpthrow "-forward;-jump"
bind capslock +fwdjumpthrow
exec buyscript;
alias +djump "+jump; +duck"
alias -djump "-jump; -duck"

Distributed Circular linked list sum

You are given a circular linked list whose nodes are distributed. Every node has next pointer and a method send(integer). A node can talk to its next node only. Different instances of same �threads are running in the nodes. How would you implement the run method of the thread class so that each node prints the sum of complete linked list.

Distributed binary tree sum

You are given a binary tree where each node has an integer value, a left, right and parent pointer. Every node is an independent distributed system where a thread is running in each node. You can talk to other node only by one method called "send(node, data)". And a node can call "send" only to its children or parent. How will you design the system so that all the nodes know the total sum of values of all the nodes in the binary tree and report them asynchronously.

Distributed doubly linked list sum

You are given a doubly linked list whose nodes are distributed. Every node has n

You can’t perform that action at this time.