Skip to content

Instantly share code, notes, and snippets.

View yask123's full-sized avatar
👨‍💻

Yask Srivastava yask123

👨‍💻
View GitHub Profile
@jonathankwok
jonathankwok / sandibooks.txt
Last active February 24, 2021 14:08
sandi's recommended references
(I've amended it to use Amazon.ca)
Things to Read:
Refactoring
Martin Fowler: Refactoring, Improving the Design of Existing Code
https://www.amazon.ca/Refactoring-Improving-Existing-Addison-Wesley-Technology-ebook/dp/B007WTFWJ6
Jay Fields: Refactoring, Ruby Edition
https://www.amazon.ca/Refactoring-Ruby-Addison-Wesley-Professional-ebook/dp/B002TIOYWG/
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

var img_dom = document.getElementsByClassName('image-thumb-body');
var links = [];
for (var i = 0; i< img_dom.length;i++){
links.push(img_dom[i].src);
}
function downloadAll(urls) {
var link = document.createElement('a');
@mdang
mdang / RAILS_CHEATSHEET.md
Last active April 13, 2024 15:36
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
function dispatch(target, eventType, char) {
var evt = document.createEvent("TextEvent");
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US");
target.focus();
target.dispatchEvent(evt);
}
dispatch(document.querySelector("#compose-input div"), "textInput", "hello!");
@mycodeschool
mycodeschool / BST_InorderSuccessor_CPP.cpp
Last active October 29, 2023 09:20
C++ program to find Inorder successor in a BST
/* C++ program to find Inorder successor in a BST */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find some data in the tree
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 5, 2024 04:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@preshing
preshing / sort1mb.cpp
Created October 25, 2012 11:28
Sort one million 8-digit numbers in 1MB RAM
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef unsigned int u32;
typedef unsigned long long u64;
//-------------------------------------------------------------------------
// WorkArea
//-------------------------------------------------------------------------