<commit_before>alias reload!='. ~/.zshrc'
alias re='reload!'
alias 1803='class 1803'
alias 6006='class 6006'

function take() {
  mkdir $1
  cd $1
}

function search() {
    DIR=.

    if [ ! -z $2 ]; then
        DIR=$2
    fi

    grep -r $1 $DIR
}

function class() {
  cd "`find_class $1`"
}

alias dok='ssh dokku@apps '

function puse() {
  lsof -i tcp:$1 $2
}

# short url functions
SHORT_URL_BASE='http://jiahao.link/'

function uset() {
  curl -s --data-urlencode "url=$1" $SHORT_URL_BASE/$2 | jq ".url//.error" -r
}

function uget() {
  curl -s $SHORT_URL_BASE/$1 | jq ".actual_url//.error" -r
}

function uopen() {
  open "`uget $1`"
}<commit_msg>Update short_url CLI utilities.<commit_after>alias reload!='. ~/.zshrc'
alias re='reload!'
alias 1803='class 1803'
alias 6006='class 6006'

function take() {
  mkdir $1
  cd $1
}

function search() {
    DIR=.

    if [ ! -z $2 ]; then
        DIR=$2
    fi

    grep -r $1 $DIR
}

function class() {
  cd "`find_class $1`"
}

alias dok='ssh dokku@apps '

function puse() {
  lsof -i tcp:$1 $2
}

# short url functions
SHORT_URL_BASE='http://jiahao.link/'

function uset() {
  curl -s -H "Accept: application/json" --data-urlencode "url=$1" $SHORT_URL_BASE/$2 | jq ".url//.error" -r
}

function uget() {
  curl -s $SHORT_URL_BASE/$1 | jq ".actual_url//.error" -r
}

function uopen() {
  open "$SHORT_URL_BASE/$1"
}
{'fraction_non_alphanumeric': 0.18234865061998543, 'fraction_numerical': 0.040846097738876735, 'mean_word_length': 2.9653179190751446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '756488', 'n_tokens_mistral': 615, 'n_tokens_neox': 561, 'n_words': 147}