Skip to content

Instantly share code, notes, and snippets.

@zouyang08
zouyang08 / 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

Introduction

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).

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
@zouyang08
zouyang08 / 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:
根据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

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:

@zouyang08
zouyang08 / 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