iTerm2 + zsh

iTerm2 + zsh Install iTerm2 1 brew cask install iterm2 or Download and install iTerm2 Set solarized-dark color 1 2 Preferences > Profiles > Colors: Color Presets > Solarized Dark Install powerline/fonts powerline/fonts: Patched fonts for Powerline users. Here we install it to support agnoster.zsh-theme. powerline/fonts git repo Install by git-clone and run install.sh 1 2 3 4 5 6 7 8 # clone git clone https://github.

The journal of linux logrotate

Overview test Linux system cronjob cronjob: hourly, daily, … 1 2 [root@xxx run]# cd /etc/cron cron.d/ cron.daily/ cron.deny cron.hourly/ cron.monthly/ crontab cron.weekly/ logrotate calling 1 2 3 4 5 6 7 8 9 10 11 [root@xxx cron.daily]# pwd /etc/cron.daily [root@xxx cron.daily]# cat logrotate #!/bin/sh /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0 Logrotate manual 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 NAME logrotate ‐ rotates, compresses, and mails system logs SYNOPSIS logrotate [-dv] [-f|--force] [-s|--state file] config_file .

The journal of debug lightty access log not appending

What I learned Why O_APPEND is needed: multiple process write the same file O_APPEND Before each write(2), the file offset is positioned at the end of the file, as if with lseek(2). The modification of the file offset and the write operation are performed as a single atomic step. fcntl(fd, F_SETFL, O_NONBLOCK); It will clear all file status flags firstly. UML: user mode linux With it, we could GDB linux

Shortcodes Notice Preview

normal use Note example: 1 2 3 {{% notice note %}} A notice disclaimer {{% /notice %}} Result: note A notice disclaimer You could custom title : 1 2 3 {{% notice note 笔记 %}} A notice disclaimer {{% /notice %}} 笔记 A notice disclaimer tip 1 2 3 {{% notice tip %}} A tip disclaimer {{% /tip %}} tip A tip disclaimer tip-1th 1 I am a

Jane Theme Preview

Markdown is created by Daring Fireball, the original guideline is here. Its syntax, however, varies between different parsers or editors.

Please note that HTML fragments in markdown source will be recognized but not parsed or rendered. Also, there may be small reformatting on the original markdown source code after saving.

Shortcodes Preview

What a Shortcode is

Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video <iframes>) to Markdown content. We think this contradicts the beautiful simplicity of Markdown’s syntax.

Hugo created shortcodes to circumvent these limitations.

A shortcode is a simple snippet inside a content file that Hugo will render using a predefined template. Note that shortcodes will not work in template files. If you need the type of drop-in functionality that shortcodes provide but in a template, you most likely want a [partial template][partials] instead.

In addition to cleaner Markdown, shortcodes can be updated any time to reflect new classes, techniques, or standards. At the point of site generation, Hugo shortcodes will easily merge in your changes. You avoid a possibly complicated search and replace operation.

More details: https://gohugo.io/content-management/shortcodes/

English Creating a New Theme

Introduction

This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme.

This is a very long title This is a very long title This is a very long title This is a very long title This is a very long title

This is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long titleThis is a very long title

Creating a New Theme

Introduction This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme. We’ll start with creating a new site with a very basic template.