Skip to content

Instantly share code, notes, and snippets.

View CodeDotJS's full-sized avatar

Rishi Giri CodeDotJS

View GitHub Profile

Keybase proof

I hereby claim:

  • I am codedotjs on github.
  • I am rishigiri (https://keybase.io/rishigiri) on keybase.
  • I have a public key ASAB__iKNCfwjYeZWhZRPmFPRWlxEXpsHBlKxB7JKJWjYwo

To claim this, I am signing this object:

var i = 0;
var text = '';
var spell = ['a', 'acada', 'a'];
while (spell[i]) {
text += spell[i] + "<br>";
i++
}
text.substr(0, 15)
{
"caret_style": "phase",
"color_scheme": "Packages/ayu/ayu-mirage.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"ensure_newline_at_eof_on_save": true,
"font_face": "Fira Code Medium",
"font_size": 9,
"ignored_packages":
[
"Markdown",
Opening/Closing Sidebar - Ctrl + B
Focus Terminal - Ctrl + J
Search files from sidebar - Ctrl + 0
Split Editors Vertically - Ctrl + [1-9]
Move back to the editor - Ctrl + 9
Switch language - Ctrl + k | m
Go to line - Ctrl + g
Go to variable in the working file - Ctrl + Shift + o
Go to variable in the whole project - Ctrl + T
Go to end of the line - Ctrl + K | E
@CodeDotJS
CodeDotJS / unique_email.js
Last active February 7, 2019 10:12
Unique Email Address - LeetCode Solution.
'use strict';
const numUniqueEmails = emails => {
const listofMails = [];
const storeUniqueEmails = [];
const mailLength = emails.length;
for (let i = 0; i <= mailLength - 1; i++) {
const filteredName = emails[i].split('+')[0].replace(/\./g, '') + '@' + emails[i].split('@')[1];
@CodeDotJS
CodeDotJS / reverseVowelsOfString.js
Last active February 7, 2019 10:06
Function that takes a string as input and reverses only the vowels of a string
'use strict';
const reverseVowelString = s => {
let str = s.split('');
const voewls = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'];
const storeVowelsFromString = [];
for (let i = 0; i <= str.length - 1; i++) {
for (let j = 0; j <= voewls.length - 1; j++) {
if (str[i] === voewls[j]) {
"bannedWordsList": [
"Eminem raping MGK",
"murder",
"child",
"incest",
"beastiality",
"bleed",
"raping",
"scat",
"rape",
@CodeDotJS
CodeDotJS / explanation.md
Created May 20, 2018 21:52 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

'use strict';
const got = require('got');
const user = process.argv[2];
const opts = process.argv[3];
const url = `http://en.gravatar.com/${user}.json`;
if (!user || ! opts) {
console.log('Gimme what I need');
{
"always_show_minimap_viewport": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 1,
"caret_style": "blink",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Ocean.tmTheme",
"fade_fold_buttons": false,
"font_face": "inconsolata",
"font_size": 12,