Skip to content

Instantly share code, notes, and snippets.

@michaelHL
michaelHL / .vimrc
Last active August 2, 2017 04:11
Vim Configuration
set nocompatible " be iMproved, required
filetype off " required
syntax on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
" let path = '~/some/path/here'
" call vundle#rc(path)
@michaelHL
michaelHL / word2pdf.vba
Last active April 27, 2023 03:05
vba - 批量word转pdf
Sub ConvertWordsToPdfs()
Dim directory As String
directory = "PATH\TO\DESIRED\DIR" ' The starting directory
Dim fso, newFile, folder, files
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(directory)
Set files = folder.files
@michaelHL
michaelHL / linux_time_c.md
Last active July 3, 2017 17:29
Linux系统常用时间函数

Linux下常用的几个时间函数: time, gettimeofday, clock_gettime, _ftime

  • time提供了秒级的精确度

    • 头文件time.h
    • 函数原型
    time_t time(time_t * timer)
    
@michaelHL
michaelHL / dokany_sshfs.md
Last active July 5, 2017 05:21
Dokany, sshfs, win-sshfs笔记

Dokany, sshfs, win-sshfs折腾笔记

几个概念

  • Dokany 是一个利用FUSE Wrapper的一个文件系统库. 目前最新版本为1.0.3(25 Mar 2017)
  • sshfs可远程加载系统文件, 应该也是基于FUSE(暂不清楚这些是什么概念), 可在Linux, OSX上使用
  • win-sshfs, 顾名思义,
@michaelHL
michaelHL / mobaxterm_cygwin.md
Last active July 5, 2017 05:31
mobaxterm, cygwin, git related

Mobaxterm&Cygwin折腾笔记

  1. 建议使用10.0版本的Mobaxterm(下简称Moba), 10.2版本的有少许问题, 比如用 apt-get 或者 apt-cyg 不能用 C-c 停止, 不能使用gist-vim插件, git clone也出现各种不能名状的问题.
  2. 配置 Persistent home directory 以及 Persistent root (/) directory, 个人的路径为 F:\WorkingDirectory\Cygwin\home, F:\WorkingDirectory\Cygwin. 关闭Moba, 修改 /etc/fstab 文件, 加上行:
@michaelHL
michaelHL / texlive_tlmgr.md
Last active July 8, 2017 12:23
TeXLive安装摘要
@michaelHL
michaelHL / line_break_eof.md
Last active July 9, 2017 17:08
line, break, eof初窥

Line Break 初窥

Linux下

利用

cat > cat.txt
In sleep he sang to me
^D
@michaelHL
michaelHL / ezftp.md
Last active July 19, 2017 05:41
C使用ftp命令行上传文件

在同一目录下新建如下文件:

  • ezftp.c

    #include <stdlib.h>
    #include <stdio.h>
    #include <time.h>
    #include <string.h>

删除Outlook所有账户

Outlook删除到最后一个账户不给删除了, 解决方案如下:

  1. Close Outlook.
  2. Run Windows Control Panel.
  3. Open the "Mail (Microsoft Outlook 2016)" applet and click the "Show Profiles..." button.
  4. Remove the existing "Outlook" profile.
  5. Add a new profile, name it "Outlook" and create a new account as needed.