Skip to content

Instantly share code, notes, and snippets.

@zouyangdev
zouyangdev / OpenWithSublimeText.bat
Last active January 15, 2020 07:28 — forked from cstewart90/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
pause

The process starts by creating the CSR and the private key:

openssl req -nodes -newkey rsa:2048 -keyout mydomain.com.key -out mydomain.com.csr

Generates

  • mydomain.com.key
  • mydomain.com.csr

After validation, you will get a zip file with 4 files:

根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf
@zouyangdev
zouyangdev / solarized_dark.xcs
Created March 22, 2017 14:18
Solarized Dark, Solarized Light, Xshell color schemes
[Solarized Dark]
text=839496
cyan(bold)=93a1a1
text(bold)=839496
magenta=dd3682
green=859900
green(bold)=586e75
background=042028
cyan=2aa198
red(bold)=cb4b16
@zouyangdev
zouyangdev / packt_books.py
Created March 8, 2018 04:10 — forked from kspeeckaert/packt_books.py
PacktPub e-books downloader
from pathlib import Path
import logging
import re
import requests
from bs4 import BeautifulSoup
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())
class PacktBooks:

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@zouyangdev
zouyangdev / instructions.rst
Created April 2, 2020 03:07 — forked from Nachtalb/telegram-desktop-multiple-accounts.rst
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]

How to add multiple accounts to Telegram Desktop

Table of Contents

ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: telegramdesktop/tdesktop#4261).

@zouyangdev
zouyangdev / New Empty File.applescript
Last active May 18, 2024 05:36
Create a new empty file in Finder called untitled.txt. If this file name already exists, name it as untitled 2.txt, untitled 3.txt, and so on.
tell application "Finder"
set currentFolder to (the target of the front window) as alias
set baseName to "untitled"
set extension to ".txt"
set fileName to baseName & extension
set maxNumber to 100
set counter to 1
repeat
if not (exists file fileName of currentFolder) then
set newFile to make new file at currentFolder as alias with properties {name: fileName}
@zouyangdev
zouyangdev / extract-audio.bat
Last active May 26, 2024 08:37 — forked from flatlinebb/extract-audio.bat
How to extract audio from video with ffmpeg, into separate files
REM This script will check all MP4 files in the current folder
REM and process them to extract audio into separate files (M4A).
REM The audio files use the same file name as the original video file, with a number, and the M4A extension
REM This is a batch file, to be run on Windows, in Command Line.
REM For Linux, see the "extract-audio.sh" gist below
REM In this example, there are 2 audio tracks, which get split out to 2 separate audio files.
REM The original video file remains unchanged.
REM If you want have a video file with more than 2 audio tracks,
REM just add more "-map 0:a:0 -c copy "%~na audio track 1.m4a"" sections:
REM -map 0:a:0 -c copy "%~na audio track 1.m4a"