Skip to content

Instantly share code, notes, and snippets.

@Juddd
Juddd / 修正剪贴板汉字_.idea_.gitignore
Created August 6, 2020 06:29
用于修正MarginNote汉字编码不准的问题
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
@Juddd
Juddd / Mini_Format_Pack_Supplementary___init__.py
Created August 16, 2019 10:07
Add-on for Anki 2.1 to supplement the Mini Format Pack
from anki.hooks import addHook
import os.path
import json
import re
def escape_html_chars(s):
html_escape_table = {
"&": "&",
'"': """,
@Juddd
Juddd / git-change-commit-messages.md
Created January 13, 2018 09:00 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@Juddd
Juddd / share.nb
Created October 18, 2016 13:51
You can use it in Mathematica.The function can convert everyting into a expression including Pictrue bed link.
ShareAny[expr_] :=
Module[{list, imageWidth, imageHeight, n},
list = ToCharacterCode[Compress[expr]];
{imageWidth,
imageHeight} = {If[(n = Ceiling[Sqrt[Length[list]/3]])*(n - 1) >
Length[list]/3, n - 1, n], n};
Print[Style[
The following expression to share is in your clipboard., 11,
Red]]; (CopyToClipboard@#; #) &[
Defer[Uncompress@*FromCharacterCode@*