Skip to content

Instantly share code, notes, and snippets.

📝
Coding

Jiayuan (@Tisoga) forrestchang

📝
Coding
Block or report user

Report or block forrestchang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View +bindings.el
;;; ~/.doom.d/+bindings.el -*- lexical-binding: t; -*-
;; Unbind keys
(map! :leader
"A" nil
"X" nil
)
;; Leader key
View scroll_to_hide_headers.js
const throttle = (callback, limit) => {
let timeoutHandler = null
return () => {
if (timeoutHandler == null) {
timeoutHandler = setTimeout(() => {
callback()
timeoutHandler = null
}, limit)
}
}
@forrestchang
forrestchang / gitstars.json
Last active Feb 6, 2018
github stars manager for production
View gitstars.json
{"tags":[],"lastModified":1517888367215}
@forrestchang
forrestchang / chain.py
Last active Feb 22, 2017
itertools.chain(*iterables)
View chain.py
def chain(*iterables):
# chain('ABC', 'DEF') => A B C D E F
for it in iterables:
for element in it:
yield element
@forrestchang
forrestchang / flatten.py
Created Feb 22, 2017
Flatten (an irregular) list of lists in Python
View flatten.py
# http://stackoverflow.com/questions/2158395/flatten-an-irregular-list-of-lists-in-python
def flatten(nested_list):
for i in nested_list:
if isinstance(i, collections.Iterable) and not isinstance(i, (str, bytes)):
yield from flatten(i)
else:
yield i
@forrestchang
forrestchang / The Technical Interview Cheat Sheet.md
Last active Aug 29, 2015 — forked from TSiege/The Technical Interview Cheat Sheet.md
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.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
You can’t perform that action at this time.