Skip to content

Instantly share code, notes, and snippets.

@wsdjeg
wsdjeg / JavaUnit.md
Created January 30, 2016 02:54
Java Unit Test in VIM
@wsdjeg
wsdjeg / awesome.md
Last active February 14, 2016 07:52
The awesome vim&&neovim distribution
@wsdjeg
wsdjeg / testfunc.vim
Last active June 2, 2016 13:45
TestFunc
function! TestFunction()
let lnum = line(".")
let col = col(".")
let func = getline(search("\\h\\+\\s\\+\\h\\+\\s*(.*)", 'bW'))
let func = substitute(func, '\v(public|protected|private|function)', '', 'g')
let func = substitute(func, '()', '', 'g')
let func = substitute(func, ' ', '', 'g')
let cmd = "phpunit " . expand('%:p') ." --filter " . func
let output = systemlist(cmd)
echomsg cmd . join(output)
@wsdjeg
wsdjeg / log
Created October 15, 2016 05:13
CheckHealth result.
health#deoplete#check
================================================================================
## deoplete.nvim
- SUCCESS: has("nvim") was successful
- SUCCESS: has("python3") was successful
- INFO: If you're still having problems, ' . 'try the following commands:
$ export NVIM_PYTHON_LOG_FILE=/tmp/log
$ export NVIM_PYTHON_LOG_LEVEL=DEBUG
$ nvim
@wsdjeg
wsdjeg / TrueColour.md
Created March 20, 2017 16:22 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@wsdjeg
wsdjeg / gist:3b0bcdda979d4aeca268edfc32115334
Created September 2, 2017 13:14 — forked from demouth/gist:3217440
mb_strwidth on JavaScript
;(function(ns){
/**
* mb_strwidth
* @param String
* @return int
* @see http://php.net/manual/ja/function.mb-strwidth.php
*/
var mb_strwidth = function(str){
var i=0,l=str.length,c='',length=0;
for(;i<l;i++){
@wsdjeg
wsdjeg / image.resize.in.github.flavored.markdown.md
Created September 10, 2017 05:37 — forked from uupaa/image.resize.in.github.flavored.markdown.md
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
# ncmpc configuration file
# vim: filetype=config
enable-colors = yes
auto-center = yes
set-xterm-title = yes
color background = none
color title = brightwhite
color title-bold = green,bold
@wsdjeg
wsdjeg / gist.md
Created December 12, 2017 04:37 — forked from benbalter/gist.md
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

@wsdjeg
wsdjeg / jekyll-and-liquid.md
Created January 13, 2018 15:53 — forked from magicznyleszek/jekyll-and-liquid.md
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes: