Compare commits

..

No commits in common. "46b534d4478e05581c9679c72ea25453346c8306" and "b742a0ef61edf68952ecb0cad4b01ebe2f362ba5" have entirely different histories.

2 changed files with 12 additions and 45 deletions

@ -2,7 +2,6 @@
import asyncio import asyncio
import enum import enum
import threading import threading
import shutil
import collections import collections
import datetime import datetime
import functools import functools
@ -23,9 +22,6 @@ import time
import traceback import traceback
logger = logging.getLogger(__name__)
def custom_notify( def custom_notify(
title=None, title=None,
msg=None, msg=None,
@ -1145,7 +1141,7 @@ def http_server(argv):
else: else:
path = options.token path = options.token
logger.info( print(
'access url is http://%s:%d/%s/' % ( 'access url is http://%s:%d/%s/' % (
options.host, options.host,
options.port, options.port,
@ -1262,8 +1258,7 @@ http {
) as f: ) as f:
f.write(r''' f.write(r'''
server { server {
server_name %s; listen 80;
listen %d;
charset UTF-8; charset UTF-8;
client_max_body_size 2K; client_max_body_size 2K;
@ -1277,24 +1272,20 @@ server {
%s %s
} }
''' % ( ''' % (
options.host,
options.port,
DATA_DIR, DATA_DIR,
location_section, location_section,
)) ))
sys.stderr.flush() subprocess.check_call(
sys.stdout.flush() r'''
exec nginx -c $CONF_DIR/nginx.conf -p $DATA_DIR -g "daemon off;"
os.execv( ''',
'/usr/sbin/nginx', env=dict(
[ CONF_DIR=CONF_DIR,
'/usr/sbin/nginx', DATA_DIR=DATA_DIR,
'-c', #APP_DIR=APP_DIR,
os.path.join(CONF_DIR, 'nginx.conf'), ),
'-p', DATA_DIR, shell=True,
'-g', 'daemon off;',
],
) )
def pass_ssh_osx(argv): def pass_ssh_osx(argv):
@ -3364,7 +3355,6 @@ def media_keys(argv):
def commands_cli(): def commands_cli():
logging.getLogger().setLevel(logging.INFO) logging.getLogger().setLevel(logging.INFO)
logger.setLevel(logging.INFO)
msg = None msg = None

@ -19,7 +19,6 @@ set backspace=indent,eol,start
set mouse=a set mouse=a
au FileType netrw nmap <buffer> <LeftMouse> <LeftMouse> <CR> au FileType netrw nmap <buffer> <LeftMouse> <LeftMouse> <CR>
au FocusLost * silent! wa
set term=xterm-256color set term=xterm-256color
@ -29,34 +28,12 @@ set hls
colorscheme morning colorscheme morning
hi MatchParen guifg=white guibg=black gui=NONE ctermfg=1 ctermbg=0 hi MatchParen guifg=white guibg=black gui=NONE ctermfg=1 ctermbg=0
function! MakeSession()
let b:sessiondir = '.vim/'
if (filewritable(b:sessiondir) != 2)
exe 'silent !mkdir -p ' b:sessiondir
redraw!
endif
let b:filename = b:sessiondir . '/session.vim'
exe "mksession! " . b:filename
endfunction
function! LoadSession()
let b:sessiondir = '.vim/'
let b:sessionfile = b:sessiondir . "/session.vim"
if (filereadable(b:sessionfile))
exe 'source ' b:sessionfile
else
echo "No session loaded."
endif
endfunction
map <Leader>w <C-w> map <Leader>w <C-w>
map <Leader>wo :py3 print('fuck')<CR> map <Leader>wo :py3 print('fuck')<CR>
map <Leader>z :wqa<CR> map <Leader>z :wqa<CR>
map <Leader>m :py3 f1()<CR> map <Leader>m :py3 f1()<CR>
map <Leader>r :redraw!<CR> map <Leader>r :redraw!<CR>
map <Leader>s :call MakeSession()<CR>
map <Leader>l :call LoadSession()
map <Leader>cq :cq<CR> map <Leader>cq :cq<CR>
map <Leader>f2 :py3 f2()<CR> map <Leader>f2 :py3 f2()<CR>
map <Leader>f3 :source ~/.vimrc<CR>:echo 'reloaded'<CR> map <Leader>f3 :source ~/.vimrc<CR>:echo 'reloaded'<CR>