This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! ClosePluginWindow() | |
| " Close quickfix | |
| cclose | |
| " Close Leaderf Buffer | |
| redir => message | |
| silent execute "ls!" | |
| redir END | |
| let l:buflist = split(message, '\n') | |
| for l:one in l:buflist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! SearchRoot() | |
| let l:scm_list = ['.root', '.svn', '.git'] | |
| for l:item in l:scm_list | |
| let l:dirs = finddir(l:item, '.;', -1) | |
| if !empty(l:dirs) | |
| return fnamemodify(l:dirs[-1].'/../', ':p:h') | |
| endif | |
| endfor | |
| return getcwd() | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ForegroundColour=248,248,242 | |
| BackgroundColour=40,42,54 | |
| Black=0,0,0 | |
| BoldBlack=104,104,104 | |
| Red=255,85,85 | |
| BoldRed=255,110,103 | |
| Green=80,250,123 | |
| BoldGreen=90,247,142 | |
| Yellow=241,250,140 | |
| BoldYellow=244,249,157 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local lru = {} | |
| local lru_mt = { __index = lru } | |
| local function addnode(self, node) | |
| local head = self._head | |
| node._next = head | |
| if head then | |
| head._pre = node | |
| end | |
| self._head = node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void PrintRefCnt(const char *s, PyObject *obj) | |
| { | |
| printf("PrintRefCnt:%s.%ld\n", s, (long)(obj->ob_refcnt)); | |
| } | |
| static void DumpPyObject(const char *s, PyObject *obj) | |
| { | |
| PyObject *str = PyObject_Str(obj); | |
| printf("DumpPyObject:%s.%s\n", s, PyString_AsString(obj)); | |
| Py_DECREF(str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <inttypes.h> | |
| static uint64_t pack754(long double f, uint8_t bits, uint8_t expbits) | |
| { | |
| long double fnorm; | |
| int shift; | |
| uint64_t sign; | |
| uint64_t exp; | |
| uint64_t significand; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local lpeg = require 'lpeg' | |
| local P,S,C,Cs,Cg = lpeg.P,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cg | |
| local test = [[ | |
| A title | |
| --- | |
| BTitle | |
| -- | |
| CTitle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible | |
| filetype off | |
| "{{ 插件安装 | |
| "git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
| "PluginInstall | |
| "set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'gmarik/Vundle.vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* J. David's webserver */ | |
| /* This is a simple webserver. | |
| * Created November 1999 by J. David Blackstone. | |
| * CSE 4344 (Network concepts), Prof. Zeigler | |
| * University of Texas at Arlington | |
| */ | |
| /* This program compiles for Sparc Solaris 2.6. | |
| * To compile for Linux: | |
| * 1) Comment out the #include <pthread.h> line. | |
| * 2) Comment out the line that defines the variable newthread. |