Skip to content

Instantly share code, notes, and snippets.

@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
"----------------------------------------------------------------------
" 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 / .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
@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>(
" 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 / test.xml
Last active November 29, 2021 18:44
我就是不告诉你我要写什么 #tag1 #tag2 #tag3
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<FileZilla3>
<Servers>
<Server>
<Host>ftp.cocosx.com</Host>
<Port>21</Port>
<Protocol>0</Protocol>
<Type>0</Type>
<User>[email protected]</User>
<Logontype>2</Logontype>
@skywind3000
skywind3000 / settings.py
Created May 9, 2019 08:52
[python] settings #1234 #4571234 #1234
import sys
@skywind3000
skywind3000 / test.py
Created May 9, 2019 08:51
[python] test1
import sys
@skywind3000
skywind3000 / tasks-new-terminal.json
Created May 9, 2019 01:49
[vscode] task tricks #new #terminal
// open new terminal
// https://stackoverflow.com/questions/47993595/launch-vscode-task-in-external-terminal-via-tasks-2-0-0
{
"label": "%name%",
"type": "shell",
"command": "Start-Process -FilePath \"%path to bat%\"",
"presentation": {
"reveal": "never"
},
"problemMatcher": [],
@skywind3000
skywind3000 / baidu_statistic.js
Last active May 8, 2019 16:03
[javascript] async load script #js #async
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?430525c455fa119f047f66ba9aa5e3b1";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();