Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

404NotFound crosslife

🏠
Working from home
  • Netease Games
  • Hangzhou
Block or report user

Report or block crosslife

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@crosslife
crosslife / OneNote-to-MD.md
Created Jun 14, 2019 — forked from heardk/OneNote-to-MD.md
Convert notes from OneNote into Markdown
View OneNote-to-MD.md

Converting One Note to Markdown

This is an example of how to convert notes from OneNote into Markdown to use in other, less annoying Note applications. I am using PowerShell on Windows here, but other shell/scripting environments would work as well. If you want separate .md files, you'll need to export your OneNote pages separately. Exporting a section, or a selection of pages creates a single .docx file.

  • Download and install Pandoc
  • Export each of your note pages to a .docx (Word) format using OneNote export from the File menu
  • Gather all of these .docx files into a directory
  • Open directory in File Explorer
  • Open Powershell from the File Explorer using File -> Open Windows Powersell
  • Run the following command:
@crosslife
crosslife / repo-reset.md
Created Jan 13, 2019 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands
View repo-reset.md

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@crosslife
crosslife / convert.py
Last active Dec 31, 2015
convert pzd to png
View convert.py
import os
def convertPzdToPng(fileName):
pzdBinFile =open(fileName,'rb')
pzdSize = os.path.getsize(fileName)
pngSize = pzdSize - 33
pzdBinFile.read(32)
outFileName = "outTexture\\" + fileName.split("\\")[-1][0:-4] + ".png"
pngFile =open(outFileName,"wb")
@crosslife
crosslife / gist:5551993
Last active Dec 17, 2015
简单的校园网IEEE下载模块,输入论文链接中的ID自动尝试登录下载(只在校园网有效)
View gist:5551993
'''
Created on 2013-5-10
@author: crosslife
'''
from urllib import urlopen
import urllib2
import cookielib
import re
import time
@crosslife
crosslife / IEEESimple
Created May 10, 2013
简单的校园网IEEE下载模块,输入论文链接中的ID自动尝试登录下载(只在校园网有效)
View IEEESimple
'''
Created on 2013-5-10
@author: crosslife
'''
from urllib import urlopen
import urllib2
import cookielib
import re
import time
@crosslife
crosslife / confs.py
Created Dec 6, 2012
校园网IEEE论文下载系统后台
View confs.py
'''
Created on 2012-3-7
@author: GeZiyang
'''
from urllib import urlopen
import urllib2
import cookielib
import re
import time
You can’t perform that action at this time.