Commit bed632d1 authored by 大地缸's avatar 大地缸
Browse files

init

parent c2e8c24e
File added
.TH micro 1 "2020-02-10"
.SH NAME
micro \- A modern and intuitive terminal-based text editor
.SH SYNOPSIS
.B micro
.RB [OPTIONS]
[FILE]\&...
.SH DESCRIPTION
Micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities
of modern terminals. It comes as one single, batteries-included, static binary with no dependencies.
As the name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use in a pinch, but micro also aims to be
enjoyable to use full time, whether you work in the terminal because you prefer it (like me), or because you need to (over ssh).
Use Ctrl-q to quit, Ctrl-s to save, and Ctrl-g to open the in-editor help menu.
.SH OPTIONS
.PP
\-clean
.RS 4
Cleans the configuration directory
.RE
.PP
\-config-dir dir
.RS 4
Specify a custom location for the configuration directory
.RE
.PP
[FILE]:LINE:COL
.RS 4
Specify a line and column to start the cursor at when opening a buffer
.RE
.PP
\-options
.RS 4
Show all option help
.RE
.PP
\-debug
.RS 4
Enable debug mode (enables logging to ./log.txt)
.RE
.PP
\-version
.RS 4
Show the version number and information
.RE
Micro's plugins can be managed at the command line with the following commands.
.RS 4
.PP
\-plugin remove [PLUGIN]...
.RS 4
Remove plugin(s)
.RE
.PP
\-plugin update [PLUGIN]...
.RS 4
Update plugin(s) (if no argument is given, updates all plugins)
.RE
.PP
\-plugin search [PLUGIN]...
.RS 4
Search for a plugin
.RE
.PP
\-plugin list
.RS 4
List installed plugins
.RE
.PP
\-plugin available
.RS 4
List available plugins
.RE
.RE
Micro's options can also be set via command line arguments for quick
adjustments. For real configuration, please use the settings.json
file (see 'help options').
.RS 4
.PP
\-option value
.RS 4
Set `option` to `value` for this session
For example: `micro -syntax off file.c`
.RE
.SH CONFIGURATION
Micro uses $MICRO_CONFIG_HOME as the configuration directory.
If this environment variable is not set, it uses $XDG_CONFIG_HOME/micro instead.
If that environment variable is not set, it uses ~/.config/micro as the configuration directory.
In the documentation, we use ~/.config/micro to refer to the configuration directory
(even if it may in fact be somewhere else if you have set either of the above environment variables).
.SH NOTICE
This manpage is intended only to serve as a quick guide to the invocation of
micro and is not intended to replace the full documentation included with micro
which can be accessed from within micro. Micro tells you what key combination to
press to get help in the lower right.
.SH BUGS
A comprehensive list of bugs will not be listed in this manpage. See the Github
page at \fBhttps://github.com/zyedidia/micro/issues\fP for a list of known bugs
and to report any newly encountered bugs you may find. We strive to correct
bugs as swiftly as possible.
.SH COPYRIGHT
Copyright \(co 2020 Zachary Yedidia, et al. MIT license.
See \fBhttps://github.com/zyedidia/micro\fP for details.
[Desktop Entry]
Name=Micro
GenericName=Text Editor
Comment=Edit text files in a terminal
Icon=micro
Type=Application
Categories=Utility;TextEditor;Development;
Keywords=text;editor;syntax;terminal;
Exec=micro %F
StartupNotify=false
Terminal=true
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 103.2 103.2"
enable-background="new 0 0 960 560"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="micro-logo-notext.svg"
width="103.2"
height="103.2"><metadata
id="metadata9"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs7" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="733"
inkscape:window-height="480"
id="namedview5"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.28541667"
inkscape:cx="302"
inkscape:cy="-4"
inkscape:window-x="1699"
inkscape:window-y="277"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="M 51.6,0 C 23.1,0 0,23.1 0,51.6 c 0,28.5 23.1,51.6 51.6,51.6 28.5,0 51.6,-23.1 51.6,-51.6 C 103.2,23.1 80.1,0 51.6,0 Z m 24.5,58.6 c -0.5,2 -1.3,3.6 -2.4,4.9 -1,1.3 -2,2.1 -3.1,2.5 -1.1,0.4 -2.2,0.6 -3.4,0.6 -1.2,0 -2.2,-0.2 -3,-0.7 C 63.4,65.5 62.8,64.8 62.3,64 61.8,63.2 61.5,62.2 61.3,61.1 61.1,60 61,58.8 61,57.5 c 0,-0.5 0,-1 0.1,-1.7 0.1,-0.7 0.2,-1.6 0.3,-1.6 l -0.2,0 c -1.6,4 -3.8,6.9 -6.6,9.2 -2.8,2.3 -5.9,3.4 -9.3,3.4 -2.3,0 -4.2,-0.9 -5.5,-2.6 -1.4,-1.7 -2.1,-4.3 -2.1,-7.7 0,-0.5 0,-1 0.1,-1.6 0.1,-0.5 0.1,-0.7 0.2,-1.7 l -0.7,0 c -0.9,2 -1.7,4.8 -2.3,7.3 -0.6,2.5 -1.1,4.8 -1.4,6.9 -0.4,2.1 -0.6,4 -0.8,5.6 -0.2,1.6 -0.3,2.7 -0.4,3.3 0.1,0.5 0.2,1 0.3,1.6 0.2,0.6 0.3,1.2 0.5,1.7 0.2,0.5 0.3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.1,0.4 2.6,1.1 0.4,0.7 0.6,1.6 0.6,2.6 -0.1,1 -0.2,2 -0.5,3 -0.3,1 -0.5,1.8 -0.7,2.4 -0.8,2.5 -1.6,4.7 -2.4,6.7 -0.8,2 -1.5,3.8 -2.2,5.2 -0.6,1.5 -1.1,2.6 -1.5,3.5 -0.4,0.9 -0.6,1.5 -0.6,1.8 0,2.6 0.6,4.5 1.7,5.6 1.1,1.1 2.3,1.7 3.6,1.7 2.2,0 3.9,-0.7 5.2,-2 1.3,-1.4 2.3,-3.9 2.9,-6.9 l 0.8,0 c 0.2,2.9 -0.1,5.3 -0.6,7.3 z"
id="path3"
inkscape:connector-curvature="0"
style="fill:#2e3192" /></svg>
\ No newline at end of file
#example
**.baidu.com
\ No newline at end of file
File added
# 20221224
```csharp
using System;
using System.Drawing;
using System.IO;
namespace 图片批量加水印
{
internal class Program
{
public static void Main(string[] args)
{
foreach (var file in Directory.GetFiles(Environment.CurrentDirectory
,"*",SearchOption.AllDirectories))
{
Console.WriteLine(file);
if (file.EndsWith(".jpg"))
{
var f = Image.FromFile(file);
var g = Graphics.FromImage(f)
;
Console.WriteLine(f.Width+"*"+f.Height);
var text = Path.GetFileNameWithoutExtension(file).Replace("IMG","");
var fz=g.MeasureString(text.ToString()
, new Font("楷体", f.Width/30, FontStyle.Bold));
g.DrawString(text.ToString()
,new Font("楷体",f.Width/30,FontStyle.Bold)
,
new SolidBrush(Color.Aqua),
f.Width/30,
f.Height/30 );
g.DrawRectangle(new Pen(new SolidBrush(Color.Azure))
{Width = 10}
,f.Width/30
,f.Height/30
,fz.Width
,fz.Height
);
f.Save(file+".tag.jpg");
}
}
Console.WriteLine("123123");
Console.ReadLine();
}
}
}
```
# domain support wildcard and comment line stared with #
# **.google.com match all domain subfix with .google.com
# *.youtube.com only math level 3 sub domain of .youtube.com
#example
**.google.com proxy
*.youtube.com
*.baidu.com 114.114.114.114,system,direct
b.com
c.com
d.com 8.8.8.8:53
e.com
#explain
#using `proxy >>> -q` to resolve **.google.com and *.youtube.com
#using 114.114.114.114:53 and system and `direct >>> -q` to resolve *.baidu.com and b.com and c.com
#using 8.8.8.8:53 to resolve **.google.com and *.youtube.com
\ No newline at end of file
# example
www.a.com:80 10.0.0.2:8080
**.b.com:80 10.0.0.2:80
192.168.0.11:80 10.0.0.2:8080
\ No newline at end of file
# minimal example
[[host]]
bind="http://demo.com/"
target="https://127.0.0.1:9090/"
upstream="127.0.0.1:9090"
# example: http to https
#[[host]]
#bind="https://localhost"
#tlscert="default"
#target="http://www.baidu.com/"
#upstream="www.baidu.com:80"
#timeout=3000
# example: http to http
#[[host]]
#bind="http://demo.com"
#target="http://www.baidu.com/path/"
#upstream="www.baidu.com:80"
#timeout=3000
# example: https to https
#[[host]]
#bind="https://demo.com"
#tlscert="proxy.crt"
#tlskey="proxy.key"
#target="https://www.baidu.com/"
#upstream="www.baidu.com:443"
#timeout=3000
######################################################################
# All configuration keys of section [[host]].
# A [[host]] is a section.
# You can set multiple [[host]] for the different binding.
######################################################################
#[[host]]
######################################################################
# 1.listen on http or https port in url,
# default http port is 80, https defalt https port is 443.
# 2.multiple binding elements split by space.
######################################################################
#bind="https://demo.com/ http://demo2.com/"
######################################################################
# 1.the binding is https, you can set the certificate and key file.
# 2.tlscert is the https certificate file.
# 3.tlskey is the https certificate key file.
######################################################################
#tlscert="proxy.crt"
#tlskey="proxy.key"
######################################################################
# 1.all requests to binding url will send to the target url.
# 2.you can set the target path FOO_PATH, or leave it empty.
# 3.the finally path send to taget is "/FOO_PATH/PATH", PATH is
# bind-path, if not set, it is empty.
# 4.the HOST HTTP header send to upstream is the host in target url.
######################################################################
#target="https://demo.com/FOO_PATH"
######################################################################
# 1.you can set multiple upstreams.
# 2.proxy will select one upstream by the --lb-method rule.
# 3.multiple upstreams separated by space.
# 4.upstream host can be ip or domain, format is HOST:PORT.
######################################################################
#upstream="10.0.0.10:443 app.com:443"
######################################################################
# 1.you can set some path access forbidden.
# 2."403 path" regex expression supported.
# 3.you can set mutiple path, it is a path array.
######################################################################
#403=["/admin","/auth","^/user/.*html$"]
######################################################################
# 1.you can set the timeout milliseconds connect to target.
# 2."403 path" regex expression supported.
# 3.you can set mutiple path, it is a path array.
######################################################################
#timeout=3000
##########################################################################
# 1.you can set the alias name of binding.
# 2.the first element is bind to, it should be one element of bind value.
# 3.the else elements are alias host names, name format is HOST:PORT, it
# will be set in the HTTP header HOST send to the upstream.
##########################################################################
#bind-alias=["https://demo.com www.foo.com:443"]
######################################################################
# 1.the request's path must be has a prefix in the bind-path array.
#bind-path=["/PATH"]
it is a real fantasitc function
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
File added
#compdef $PROG
_cli_zsh_autocomplete() {
local -a opts
local cur
cur=${words[-1]}
if [[ "$cur" == "-"* ]]; then
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}")
else
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
fi
if [[ "${opts[1]}" != "" ]]; then
_describe 'values' opts
else
_files
fi
return
}
compdef _cli_zsh_autocomplete $PROG
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment