Skip to content

Instantly share code, notes, and snippets.

View ApolloTang's full-sized avatar
🏠
Working from home

Apollo Tang ApolloTang

🏠
Working from home
  • Toronto Canada
View GitHub Profile
@ApolloTang
ApolloTang / grokking_to_leetcode.md
Created January 24, 2023 04:43 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@ApolloTang
ApolloTang / esm-package.md
Created January 5, 2023 12:58 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@ApolloTang
ApolloTang / learning-path-web3.md
Created September 27, 2022 00:29 — forked from sibelius/learning-path-web3.md
Learning Path Web3
  • learn blockchain concepts
  • learn ethereum
  • learn how to use metamask
  • learn how to use hardhat (https://hardhat.org/)
  • learn how to deploy and interact with a smart contract
  • learn common smart contract standards like ERC20 (token), ERC721 (nft), ERC1155 (opensea)
  • learn ipfs
  • learn how to read blockchain explorers like https://etherscan.io/
  • learn how to use web3 and etherjs
  • learn solidity
import React, { useEffect } from 'react';
let resetClientSession: () => void;
const SessionCtx = React.createContext(null);
type propsType = {
children: JSX.Element;
};
@ApolloTang
ApolloTang / tmux-cheats.md
Created March 2, 2020 21:32 — forked from Starefossen/tmux-cheats.md
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@ApolloTang
ApolloTang / gist:57879804ab9ea4adb7e93911bf18cf5f
Created December 7, 2017 02:06
YouCompleteMe build in OmniSharpServer
~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer
$ msbuild /property:Configuration=Release /property:TargetFrameworkVersion=v4.5
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Wed Oct 18 09:47:05 EDT 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2017-12-06 9:06:28 PM.
Project "/Users/apollotang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/OmniSharp.sln" on node 1 (default targets).
/Users/apollotang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/OmniSharp.sln.metaproj : error MSB4126: The specified solution configuration "Release|mac" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [/Users/apollotang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/O
$ mvim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 21 2017 13:14:19)
MacOS X (unix) version
Included patches: 1-1203
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +find_in_path -mouse_sysmouse -tag_any_white
+arabic +float +mouse_urxvt -tcl
+autocmd +folding +mouse_xterm +termguicolors
+balloon_eval -footer +multi_byte +terminal
@ApolloTang
ApolloTang / gist:c71f874d62bbd776421181370d67306f
Created December 6, 2017 05:38
youcompleteme fail installing --cs-completer on OSX
~/.vim/plugged/YouCompleteMe
$ ./install.py --cs-completer
Searching Python 2.7 libraries...
Found Python library: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
Found Python headers folder: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
unity asset package is empty, screen shot
@ApolloTang
ApolloTang / gist:32462333b7aadaca8cc264bde21f9e62
Created November 21, 2017 04:41
unity asset package is empty
asdfa