Skip to content

Instantly share code, notes, and snippets.

View tysg's full-sized avatar
🔭
exploring and experimenting

Tianyi Song tysg

🔭
exploring and experimenting
View GitHub Profile
@tysg
tysg / cli.ts
Last active February 13, 2020 11:29
import { createContext, parseError, runInContext } from '../index'
const fs = require('fs')
function main() {
const chapter = 4
const path = process.argv[2]
const code = fs.readFileSync(path, 'utf8')
const context = createContext(chapter)
@tysg
tysg / keybase.md
Last active December 21, 2020 06:31
Keybase proof

Keybase proof

I hereby claim:

  • I am tysg on github.
  • I am tsong (https://keybase.io/tsong) on keybase.
  • I have a public key whose fingerprint is FF56 89FB FEFF 3BF2 F255 41F6 B7B0 C754 94C3 A429

To claim this, I am signing this object:

@tysg
tysg / ty.zsh-theme
Last active February 21, 2019 11:58
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${fg_bold[green]%}%n@%m%{$reset_color%} ${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@tysg
tysg / check.sh
Created January 27, 2019 05:26
check.sh
#!/bin/bash
if [ -z "$1" ]
then
echo "Problem name is required as the first argument."
echo "eg: ./check.sh Helloworld"
exit 0
fi
problem="$1" #problem name as first variable
@tysg
tysg / .vimrc
Last active February 21, 2019 11:55
my .vimrc
set enc=utf-8
inoremap jk <ESC>
syntax on
filetype indent plugin on
set lbr nu et ts=3 sw=3 ai si sc bs=2 wb nobk vb so=1 ru ls=2 ww=b,s,h,l,<,>,[,]
set com=sr:/*,mb:*,el:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\:
set nojs vi=""
set mps+=<:>
set clipboard=autoselect,exclude:.*