Skip to content

Instantly share code, notes, and snippets.

View CodeDotJS's full-sized avatar

Rishi Giri CodeDotJS

View GitHub Profile
@CodeDotJS
CodeDotJS / solar_system.py
Last active March 18, 2024 14:34
Solar System using Python
import turtle
import math
class SolarSystem:
def __init__(self, width, height):
self.thesun = None
self.planets = []
self.ssturtle = turtle.Turtle()
self.ssturtle.hideturtle()
self.ssscreen = turtle.Screen()
"bannedWordsList": [
"Eminem raping MGK",
"murder",
"child",
"incest",
"beastiality",
"bleed",
"raping",
"scat",
"rape",
@CodeDotJS
CodeDotJS / SoundCloud Follower Count.markdown
Created November 16, 2015 08:35
SoundCloud Follower Count

SoundCloud Follower Count

Card that shows SoundCloud follower count using the SoundCloud REST API.

Does not update live.

A Pen by jczimm on CodePen.

License.

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:

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
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",
@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]) {
@CodeDotJS
CodeDotJS / Animated Terminal Session.markdown
Created January 8, 2016 21:19
Animated Terminal Session