Skip to content

Instantly share code, notes, and snippets.

View tangjeff0's full-sized avatar
🏛️

jeff tangjeff0

🏛️
View GitHub Profile
@tangjeff0
tangjeff0 / cVim
Last active April 17, 2021 23:27
cVim config
let completionengines = ["duckduckgo", "google-maps", "youtube", "wikipedia"]
let defaultengine = "duckduckgo"
let searchalias y = "youtube"
let searchalias m = "google-maps"
let searchalias w = "wikipedia"
let blacklists = ["https://trello.com/*","https://www.youtube.com/*","https://mail.google.com/*","https://soundcloud.com/*","https://www.reddit.com/*","https://hackrice.typeform.com/*","https://repl.it/*","https://calendar.google.com/*","https://codepen.io/*","https://cckl.github.io/*","http://localhost/*","http://keycode.info/*","https://www.figma.com/*","https://photos.google.com/*","http://jefftang.world/*","https://dashboard.lytmus.io/*","https://app.codesignal.com/*","https://docs.google.com/*","https://web.telegram.org/*","https://coderpad.io/*","http://webchat.freenode.net/*","http://ternjs.net/*","https://github.com/*projects/*"]
map zx zi
map zc zo
@tangjeff0
tangjeff0 / pyramid.js
Created September 2, 2018 13:58
fn that takes in a number n, and prints a right aligned pyramid such that line 1 has n-1 spaces and 1 hash, line 2 has n-2 spaces and 2 hashes...
// n = 6
// 5 ' ' 1 '#' = 6
// 4 ' ' 2 '#' = 6
// 3 ' ' 3 '#' = 6
// 2 ' ' 4 '#' = 6
// <= inclusive
// < exclusive
/*
* worst case, Big O of O(n*n)
const assert = require('assert')
/* takes in two strings, and returns if they are anagrams */
function isAnagram(a,b) {
if (a.length != b.length) {
return false
}
var o1 = {}
var o2 = {}
{
"blockedSites": [],
"charsToAutoInsertUserList": [
[
"(",
")"
],
[
"{",
"}"
@tangjeff0
tangjeff0 / jq
Created August 14, 2019 21:36
recipes
# print names of all branches
cat ./data/all_branches.json \
| jq 'map(.name)' \
> ./data/all_branches.txt
# filter to only include branches that start with "RS"
cat ./data/all_branches.json \
| jq 'map(select(.name | test("^RS")) | .name)' \
> ./data/rs_branches.txt
'''
class signatures
'''
'''
everything is an object in ruby
everything is a system in the universe. when emergent properties emerge is the
line for a system
'''
class System:
@tangjeff0
tangjeff0 / random_notion.py
Last active June 4, 2024 19:02
get random notion notes to resurface your old ideas!
'''
author:
@tangjeff0
https://www.notion.so/tangjeff0/Public-Home-0e2636bd409b454ea64079ad8213491f
inspired by: https://praxis.fortelabs.co/p-a-r-a-iii-building-an-idea-generator-400347ef3bb6/
with help from: https://medium.com/@jamiealexandre/introducing-notion-py-an-unofficial-python-api-wrapper-for-notion-so-603700f92369
credits:
@jamiealexandre
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tangjeff0
tangjeff0 / roam-styles.css
Last active April 3, 2020 14:13
roam-styles
.rm-page-ref {
font-weight: bold;
}
a:hover, .rm-page-ref:hover {
font-style: italic;
}
.rm-page-ref-link-color {
color: #1aae9f; /* teal */
(defn ignore
[expr] ;; expression evaluated
nil)
(ignore (pr "hello world"))
(defmacro ignore
[expr] ;; expression never evaluated
nil)