Skip to content

Instantly share code, notes, and snippets.

View x-ji's full-sized avatar

Xiang Ji x-ji

View GitHub Profile
@x-ji
x-ji / JS: Detect IE
Created December 9, 2012 03:32 — forked from padolsey/gist:527683
JS: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
zh-CN:
admin:
js:
true: True
false: False
is_present: Is present
is_blank: Is blank
date: Date ...
between_and_: Between ... and ...
today: Today

Keybase proof

I hereby claim:

  • I am x-ji on github.
  • I am xji (https://keybase.io/xji) on keybase.
  • I have a public key ASAAo7ZNa_AlHMSs07-1gLH1ACgjVoblAz4sP4Aiv-J8EQo

To claim this, I am signing this object:

@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
(setcdr (assoc "*Help*" popwin:special-display-config)
'(:dedicated t :position right :stick t :noselect t :width 0.3))
@x-ji
x-ji / Markdium-Shell.sh
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# Folder for private layers
cd ~/.emacs.d/private
git clone git@github.com:thanhvg/vue.git
# Install the necessary tools manually
# vue-language-server is the language server developed by vetur
npm install -g eslint prettier vue-language-server
@x-ji
x-ji / Markdium-Shell.sh
Created October 18, 2019 14:48
Markdium-Language Server Protocol
git clone git@github.com:elixir-lsp/elixir-ls.git
cd elixir-ls
mix compile
# For example, when the target Elixir version is 1.9.0
mix elixir_ls.release -o release-1.9.0
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
((elixir-mode
(elixir-ls-path . "path-to-elixir-ls/release-1.8.1")))
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
(lsp :variables
lsp-ui-doc-enable nil)
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In `dotspacemacs/layers`
(vue :variables
vue-backend 'lsp)
# Depends on whether you already configured this variable in the `javascript` layer
(node :variable node-add-modules-path)
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
(lsp :variables
lsp-enable-file-watchers nil
)