Skip to content

Instantly share code, notes, and snippets.

View liujingyu's full-sized avatar

jingyu liu liujingyu

View GitHub Profile
@liujingyu
liujingyu / gist:df2a9f957220557dc066e9e85c67f73f
Created October 29, 2018 07:21 — forked from siddharthg/gist:6923b2cbb402bd65255af7859a5d52a5
Install Thrift 0.10.0 with brew on macOS
brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/16ebe5f1843e6cb54856311ff0f676be53007329/Formula/thrift.rb
@liujingyu
liujingyu / vimawesome.vim
Created September 3, 2017 03:44 — forked from junegunn/vimawesome.vim
Plugin completion using VimAwesome API
" ----------------------------------------------------------------------------
" vimawesome.com
" ----------------------------------------------------------------------------
function! VimAwesomeComplete() abort
let prefix = matchstr(strpart(getline('.'), 0, col('.') - 1), '[.a-zA-Z0-9_/-]*$')
echohl WarningMsg
echo 'Downloading plugin list from VimAwesome'
echohl None
ruby << EOF
require 'json'
@liujingyu
liujingyu / find_relative_path.func.php
Created October 13, 2016 03:14 — forked from ohaal/find_relative_path.func.php
Find the relative path between two paths
/**
*
* Find the relative file system path between two file system paths
*
* @param string $frompath Path to start from
* @param string $topath Path we want to end up in
*
* @return string Path leading from $frompath to $topath
*/
function find_relative_path ( $frompath, $topath ) {