hllu's blog hllu 的个人空间.

tikz画图

画弧线 \begin{tikzpicture}[xscale=6,yscale=6] \draw[<->] (0,0.8) -- (0,0) -- (0.8,0); \draw[green,thick,domain=0:0.5] plot(\x, {0.025+\x*\x}); \draw[red, thick, domain=0:0.5] plot(\x, {sqrt(\x)}); \draw[blue, thick, domain=0:0.5] plot(\x, {abs(\x)}); \end{tikzpicture} 画球体 \begin{tikzpicture} \draw[step=1,color=gray!40] (-2,-2) grid (2,2); \draw[->] (-3,0) -- (3,0); \draw[->] (0,-3) -- (0,3); \draw[color=gray!40] (0,0) circle (1); % \draw[color=red] (1,0) arc (0:45:1); \draw[color=gray!40] (0,0) ellipse (1 and 0.5); \draw[color=green] (1,0) arc (0:60:1 and 0.5); \end{tikzpicture} 流程图 \usetikzlibrary{positioning, shapes.geometric} \begin{tikzpicture}[node distance=10pt] \node[draw, rounded corners] (start) {Start}; \node[draw, below=of start] (step 1) {Step 1}; \node[draw, below=of step 1] (step 2) {Step 2}; \node[draw, diamond, aspect=2, below=of step 2] (choice) {Choice}; \node[draw, right=30pt of

emacs在org模式使用plantuml

emacs在org模式画图 org模式画简单的图,可以用ditaa这种工具,小巧够用,可以满足大部分的需求。 配合emacs的picture-mode和artis-mode,可以实现文本画大部分的图。生成

use getopt in c program

getopt getopt库是用来分析命令行参数的。由Unix标准库提供。 对类似于main函数那样传进来的参数进行解析。如有的参数是 –help 也可以 是-h,同时也可以传递参数,如 –interval 10。getopt可以支持-key 或者-

use ditaa in emacs

ditaa ditaa 是 DIagrams Through Ascii Art,作者是 Stathis Sideris。是一 种基于java的类似plantuml但是更轻量级的绘图工具。ditaa使用符号| - + / > < V ^符号渲染不同的字符画出来,在文本格式下,字符画本身方便存储

git blame使用

git blame 排查问题的时候,为了查找是谁改得某个文件或者某一行,可以用git blame这 个命令,用法最常用的就是 git blame <filename> git blame -L start,end <filename> 或者 git blame myfile.py git blame -L 5,20 myfile.py //查看5-20行的修改历史 git blame -L 5,+20 myfile.py //表示查看5行及后面

my emacs config

my .config ;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it, ;; just comment it out by adding a semicolon to the start of the line. ;; You may delete these explanatory comments. ;; C-x C-+会增加字体大小 ;; C-+ 或 C-- 会增加/缩小字体大小 ;; C-x C-0会恢复字体大小 ;;================org======================== ;;-------------------org----------------- ;; #+ATTR_ORG: :width 100 ~ ;; #+ATTR_HTML: :width 100 ~ ;; C-c C-q 为

VPC内互通问题排查

问题 VPC内虚机通过NAT网关配置SNAT访问外网。如下所示: 使用中出现问题,虚机不能访问外网。 基础知识 DVR模式 按照 Neutron 原先的设计,所有网络服务都在网络节点上进行,这意味着大量 的流量和处理,给网络节点

iptables-in-neutron

iptables Iptables 很早就已经集成到了Linux 的内核中,它由转发表 和 规则链 组成,通过表和链的组合,能适应各种场景下的安全需求功能。 iprable默认包含了表,每个表都有不同的用途,比如 Filter 表用来过滤数据 包,发往主机内

abbrev和skeleton使用

abbrew abbrev 是 abbreviation 的缩写。这个模块的主要功能也是定义宏,并在文档 中把宏展开。总的来说,abbrev 提供了缩写展开功能,对于输入频次比较高的 文本可以减少输入工作。 abbrew 定义 abbrev 的定义使用 C-x a 作为快捷键前缀,或者说凡是和

在emacs使用org和beamer做演讲稿

Beamer 介绍 Beamer是一个生成演示稿的 LaTeX 环境. 它包括了以下特性: 在演示稿中自动生成结构化的元素(例如 Marburg 主题)。 在演示稿中,这个特性可以为观众提供了视觉参考。 对组织演示稿有很大的帮助。 主题 完全支持 LaTeX 优点 在