Skip to content

Instantly share code, notes, and snippets.

View beyang's full-sized avatar
🤖
Always Be Coding

Beyang Liu beyang

🤖
Always Be Coding
View GitHub Profile
@beyang
beyang / cr.org
Created February 7, 2019 23:13
Rough CR checklist

“Physical reality”: What bits get written where?

What is the specific problem being solved?

  • Minimal viable problem, the specific things that will be fixed/improved.
  • A contract for success.
#!/bin/bash
set -euo pipefail
cd $(git rev-parse --show-toplevel)
git fetch origin
git checkout origin/master -b ent-master
git remote remove origin
@beyang
beyang / puzzle.ts
Created September 7, 2018 01:47
Observables puzzle
import { combineLatest, from, Observable, Unsubscribable } from 'rxjs'
import { map, switchMap } from 'rxjs/operators'
import { Location } from 'vscode-languageserver-types'
import { ReferenceParams, TextDocumentPositionParams, TextDocumentRegistrationOptions } from '../../protocol'
import { compact, flatten } from '../../util'
import { FeatureProviderRegistry } from './registry'
import { flattenAndCompact } from './util'
export function getLocationsWithExtensionID<
P extends TextDocumentPositionParams = TextDocumentPositionParams,
Left-aligned Center-aligned Right-aligned
git status git status git status
git diff git diff git diff
@beyang
beyang / gh2sg.js
Last active March 22, 2017 20:53
GitHub -> Sourcegraph (repo page only)
javascript:(function(){ if (window.location.hostname === "github.com") { let ownerRepo = window.location.pathname.match('^/[^/]+/[^/]+')[0]; window.location.href = "https://sourcegraph.com/github.com" + ownerRepo; } })();

Keybase proof

I hereby claim:

  • I am beyang on github.
  • I am beyang (https://keybase.io/beyang) on keybase.
  • I have a public key whose fingerprint is 8A67 B30A B9CD 1602 E4E4 5AF8 C4C5 7550 4004 51C1

To claim this, I am signing this object: