Skip to content

Instantly share code, notes, and snippets.

" root markers used to locate project
if !exists('g:projectile#marker')
let g:projectile#marker = '.svn,.git,.projectile'
endif
" returns nearest parent directory contains one of the markers
function! projectile#find_root(name)
let name = fnamemodify((a:name != '')? a:name : bufname(), ':p')
let finding = ''
" iterate all markers
@skywind3000
skywind3000 / branch.cpp
Last active June 1, 2020 05:23
branch.cpp
#include <stdio.h>
#include <time.h>
#include <stdint.h>
#include <stdlib.h>
#include <chrono>
#include <thread>
int64_t clock_realtime()
{
return std::chrono::duration_cast<std::chrono::nanoseconds>(
@skywind3000
skywind3000 / .vimrc
Created January 29, 2021 17:16 — forked from eduardoarandah/.vimrc
Mi configuración .vimrc y coc-settings.json
scriptencoding utf-8 " basic
set nocompatible " basic
filetype off " basic
filetype plugin on " Enable filetype plugins
filetype indent on " Enable loading the indent file for specific file types
syntax enable " Enable syntax highlighting
set encoding=utf-8 " Encoding (needed in youcompleteme)
set fileencoding=utf-8 " The encoding written to file.
set noerrorbells " No annoying sound on errors
set number " Line numbers on
"----------------------------------------------------------------------
" OpenURL[!] [url]
" - open url in default browser (change this by g:browser_cmd)
" - when bang (!) is included, ignore g:browser_cmd
" - when url is omitted, use the current url under cursor
" - vim-plug format "Plug 'xxx'" can also be accepted.
"----------------------------------------------------------------------
command! -nargs=* -bang OpenURL call s:OpenURL(<q-args>, '<bang>')
function! s:OpenURL(url, bang)
let url = a:url
@skywind3000
skywind3000 / ssl_server_nonblock.c
Created March 3, 2024 15:14 — forked from darrenjs/ssl_server_nonblock.c
OpenSSL example using memory BIO with non-blocking socket IO
/*
This file had now been added to the git repo
https://github.com/darrenjs/openssl_examples
... which also includes a non blocking client example.
-------------------------------------------------------------------------------
ssl_server_nonblock.c -- Copyright 2017 Darren Smith -- MIT license