Skip to content

Instantly share code, notes, and snippets.

View rahulnshah's full-sized avatar
🚀
...5...3...2...1...Blastoff!!

Rahul Shah rahulnshah

🚀
...5...3...2...1...Blastoff!!
View GitHub Profile
const material_lots_form = document.getElementById("material_lots_form");
const fetchPromise = fetch('http://localhost:3000/material_lots');
fetchPromise
.then( response => {
if (!response.ok) {
throw new Error(`HTTP error: ${response.status}`);
}
return response.json();
})
.then( json => {
@rahulnshah
rahulnshah / show_shortcuts_for.sh
Last active January 15, 2023 23:50
See Shortcuts on-the-go
#!/usr/bin/bash
# Author: Rahul Shah
# In your terminal, run this command first: export times=0. This will initialize a variable called times for this script to use
# When you run a script, your current shell, such as bash, launches a child shell, most often sh, to run the script. You can instead execute a script that modifies the current shell environment using the source. Execute this script as source see_shortcuts.sh to accurately see how many times you have called this script in your current shell.
# windows 10
if (test $times) then
hitTheUnkownCase=0
@rahulnshah
rahulnshah / js_linked_list.js
Created March 25, 2022 22:53 — forked from bradtraversy/js_linked_list.js
JS Linked List Class
// Construct Single Node
class Node {
constructor(data, next = null) {
this.data = data;
this.next = next;
}
}
// Create/Get/Remove Nodes From Linked List
class LinkedList {