Skip to content

Instantly share code, notes, and snippets.

View swapnilraj's full-sized avatar

Swapnil Raj swapnilraj

View GitHub Profile
@swapnilraj
swapnilraj / bubba.bf
Last active December 7, 2018 23:36
bubba-brainfuck
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
++++++++++
<<
[b.> u.> n> c[>+ <<<<.>>> -] > [-<+>]<+ <<<b..-.+ >>n. <<]
@swapnilraj
swapnilraj / keybase.md
Created March 23, 2018 21:00
Gist to verify github account to Keybase <3

Keybase proof

I hereby claim:

  • I am swapnilraj on github.
  • I am rajs (https://keybase.io/rajs) on keybase.
  • I have a public key ASChJTyL_0wTG4XLqDSoKnWW9Ht5rM8dnZF522KUOC3Tgwo

To claim this, I am signing this object:

@swapnilraj
swapnilraj / Graph.java
Created November 3, 2017 15:11
Implementation of a Graph in Java. Testing with different kinds of implementation.
// Copyright 2017 Swapnil Raj<[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
@swapnilraj
swapnilraj / subList.js
Last active August 29, 2017 10:07
Javascript snippet to get the name of subscriptions and channel links on Youtube.
(() => {
let subs = Array.from(document.querySelectorAll('#sections > ytd-guide-subscriptions-section-renderer > div#container > ytd-guide-entry-renderer')).map(
e => `${e.querySelector('span.title').innerText} - ${e.querySelector('a').href}`,
);
if (subs.length === 0) {
subs = Array.from(document.querySelectorAll('#guide-channels > li.guide-channel')).map(
e => `${e.querySelector('span.display-name').innerText} - ${e.querySelector('a').href}`,
);
}
const subList= JSON.stringify(subs, undefined, 2);