Skip to content

Instantly share code, notes, and snippets.

View shajanjp's full-sized avatar
🎯
Wiring up zeros and ones

Shajan Jacob shajanjp

🎯
Wiring up zeros and ones
View GitHub Profile
#!/bin/sh
mkdir "big8"
mkdir "nonbig8"
curl -o "big8/0 - Unit 1: Eyelid-Eyebrows-Lacrimal System & Orbit.mp4" https://kmk-production.nyc3.cdn.digitaloceanspaces.com/video/desktop/13/4_2023-11-28.mp4
curl -o "big8/1 - Unit 1: Eyelid-Eyebrows-Lacrimal System & Orbit.mp4" https://kmk-production.nyc3.cdn.digitaloceanspaces.com/video/desktop/16/3_2023-04-28
curl -o "big8/2 - Unit 2: EOMs & Blood Supply.mp4" https://kmk-production.nyc3.cdn.digitaloceanspaces.com/video/desktop/17/3_2023-04-28
curl -o "big8/3 - Unit 2: EOMs & Blood Supply.mp4" https://kmk-production.nyc3.cdn.digitaloceanspaces.com/video/desktop/18/3_2023-04-28
curl -o "big8/4 - Unit 3: Cornea & Conjunctiva.mp4" https://kmk-production.nyc3.cdn.digitaloceanspaces.com/video/desktop/19/3_2023-04-28
curl -o "big8/5 - Unit 3: Cornea & Conjunctiva.mp4" https://kmk-production.nyc3.cdn.digitaloceanspaces.com/video/desktop/20/3_2023-04-28
@shajanjp
shajanjp / latest-github-forks.js
Created March 24, 2022 08:48
Search most recently updated forks of a github repository
const axios = require("axios").default;
(async () => {
async function getForkByPage(repoUrl, page) {
console.log(`Fetching page ${page}`);
return axios
.get(`${repoUrl}/forks?page=${page}`)
.then((res) => {
return res.data || [];
})
@shajanjp
shajanjp / unsolicited_advice_to_junior_developers.md
Created October 27, 2017 09:25
Unsolicited Advice To Junior Developers

After over 20 years as a Software Engineer, Architect, and Manager, I want to pass along some unsolicited advice to junior developers either because I grew through it, or I've had to deal with developers who behaved poorly:

  • Your ego will hurt you FAR more than your junior coding skills. Nobody expects you to be the best early in your career, so don't act like you are.

  • Working independently is a must. It's okay to ask questions, but ask sparingly. Remember, mid and senior level guys need to focus just as much as you do, so before interrupting them, exhaust your resources (Google, Stack Overflow, books, etc..)

  • Working code != good code. You are an author. Write your code so that it can be read. Accept criticism that may seem trivial such as renaming a variable or method. If someone is suggesting it, it's because they didn't know what it did without further investigation.

  • Ask for peer reviews and LISTEN to the critique. Even after 20+ years, I send my code to more junior developers and often get

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Status</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.css">
<style>
laaaaalaaaaaaaaaaaaaaaalaaaaaaaalaaaaaaaaaaaa laaaaaaaalaaaaaaaaaaaa laaaaaaaaaaa laaaaalaaalaaaaaaaaaaaalaaaaa laaaaaaaaaaaaaaaaaaaaaaaaaalaaalaaaaaaaaaaaalaaaaaaaaaaaalaaaaaaaaaaalaaaaaaaaaaaaaaalaaal laalaaa laaaaaaaaaaalaaaalaaa laaaaaaaaaaaaaaaaalaaaaaaalaaaaaaaaaaaalaaaaa laalaaaaaaaaalaaaaaaaaaaaaaaaaaalaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaa laaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaa laaaaalaaaaaaaaaaaaaaaalaaaaaaaalaaaaaaaaaaaa laaaaaaaaaaaaaaaaaaaaaaaaalaaalaa laaaaaaaaaaalaaaaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaalaaaaaaaaalaaaalaaaaaaaalaaaaalaaaaaaaaaaaaaaaalaaaaaaaaaaaaaaaaaaaaaaaaaal
Do the math !
function Cache(size) {
this.store = {};
this.size = size;
this.get = function(k){
this.store[k].d = Date.now();
return this.store[k].v;
};
this.put = function(k, v) {
let objKeys = Object.keys(this.store);
if(objKeys.length < this.size){
let people = [
["Arun Prabhakaran",
"Abhilash Pillai",
"Vishnu Agikumar",
"Lovegin John",
"Akhilesh PV",
"Bibin Binny Mathew ",
"Amal Babu"],
["Akhil Xavier",
function alertEveryone(fullName) {
let myName = `Mighty ${fullName}`;
for (let i = 0; i < length; i++) {
console.log(`${myName} is coming..`)
}
}
alertEveryone("Octocat");
{
"parserOptions": {
"ecmaVersion": 6
},
"extends": "google",
"rules": {
"require-jsdoc": [
"off"
],
"max-len": ["off"]
{
"added_words":
[
"Techno",
"Cubet",
"Arduino"
],
"auto_format_on_save": true,
"binary_file_patterns":
[