Skip to content

Instantly share code, notes, and snippets.

View stillzhl's full-sized avatar
🎯
Focusing

Haili Zhang stillzhl

🎯
Focusing
View GitHub Profile
@stillzhl
stillzhl / vimfiler-shortcuts
Created May 7, 2021 23:10 — forked from elithrade/vimfiler-shortcuts
Common vimfiler keyboard shortcuts
Toggle safe mode: gs
Create new file: N
Delete file: d
Rename file: r
New directory: K
Open file: e
Move file: m
Open VimFilerExplorer: e
Open current directory in a new buffer: dl
Open current directory in a new split: ds
@stillzhl
stillzhl / BaseClient.py
Last active September 9, 2015 04:37
抓取系统的启动器基类
#!/usr/bin/env python
# coding: utf-8
from __future__ import absolute_import
import pickle
import threading
import time
import settings
@stillzhl
stillzhl / delete_tt_ulog.sh
Created September 9, 2015 04:02
维护ttserver ulog文件的脚本
#!/bin/bash
remove_old_ulog()
{
now_stamp=`date '+%s'`
one_week_secs=604800
one_week_ago=`expr $now_stamp - $one_week_secs`
for ulog_file in `ls $1`
do
@stillzhl
stillzhl / download_unzip.py
Created March 6, 2015 10:23
python 下载文件并解压,写到本地
import urllib2
import StringIO
import gzip
def download_unzip():
print 'downloading'
res = urllib2.urlopen(geo_city_download_url)
print 'downloaded'
f_compressed = StringIO.StringIO(res.read())
@stillzhl
stillzhl / log_settings.py
Created March 25, 2013 07:21
A python logging confuration
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'console': {
'format': '[%(asctime)s][%(levelname)s] %(name)s %(filename)s:%(funcName)s:%(lineno)d | %(message)s',
'datefmt': '%Y-%m-%d %H:%M:%S',
},
'file': {