GOAT
戒
30个半马
驾驶证
车
戒
30个半马
驾驶证
车
Date | Time | Distance | Avg. Pace |
---|---|---|---|
2023-10-11 | 05:58-06:24 | 5KM | 5'07'' |
2023-10-13 | 06:05-06:30 | 5KM | 4'51'' |
2023-10-14 | 06:19-06:42 | 5KM | 4'45'' |
2023-10-15 | 06:44-07:59 | 15KM | 4'57'' |
2023-10-17 | 06:12-06:36 | 5KM | 4'50'' |
2023-10-19 | 06:37-07:02 | 5KM | 4'52'' |
2023-10-20 | 06:18-06:42 | 5KM | 4'54'' |
2023-10-23 | 06:00-06:24 | 5KM | 4'52'' |
2023-10-26 | 06:02-06:26 | 5KM | 4'46'' |
2023-10-30 | 06:12-06:36 | 5KM | 4'48'' |
2023-11-3 | 05:28-05:53 | 5KM | 5'00'' |
2023-11-5 | 08:04-09:50 | 21KM | 5'00'' |
修改主题下的index.php
将如下代码放在$this->need('header.php');后
/** 文章置顶 */
$sticky = '1'; //置顶的文章id,多个用|隔开
if($sticky){
$sticky_cids = explode('|',$sticky); //分割文本
$sticky_html = "<span style='color:red'>[置顶] </span>"; //置顶标题的 html
$db = Typecho_Db::get();
$pageSize = $this->options->pageSize;
$select1 = $this->select()->where('type = ?', 'post');
$select2 = $this->select()->where('type = ? && status = ? && created < ?', 'post','publish',time());
//清空原有文章的列队
$this->row = [];
$this->stack = [];
$this->length = 0;
$order = '';
foreach($sticky_cids as $i => $cid) {
if($i == 0) $select1->where('cid = ?', $cid);
else $select1->orWhere('cid = ?', $cid);
$order .= " when $cid then $i";
$select2->where('table.contents.cid != ?', $cid); //避免重复
}
if ($order) $select1->order('', "(case cid$order end)"); //置顶文章的顺序 按 $sticky 中 文章ID顺序
if ($this->_currentPage == 1) foreach($db->fetchAll($select1) as $sticky_post){ //首页第一页才显示
$sticky_post['sticky'] = $sticky_html;
$this->push($sticky_post); //压入列队
}
$uid = $this->user->uid; //登录时,显示用户各自的私密文章
if($uid) $select2->orWhere('authorId = ? && status = ?',$uid,'private');
$sticky_posts = $db->fetchAll($select2->order('table.contents.created', Typecho_Db::SORT_DESC)->page($this->_currentPage, $this->parameter->pageSize));
foreach($sticky_posts as $sticky_post) $this->push($sticky_post); //压入列队
$this->setTotal($this->getTotal()-count($sticky_cids)); //置顶文章不计算在所有文章内
}
修改私钥密码:ssh-keygen -f private_key -p
LNMP环境IP访问网站:/usr/local/nginx/conf/vhost/host.conf server_name 添加IP地址
awk printf 不会插入换行符
获取WiFi连接设备MAC:hostapd_cli list_sta | awk 'NR>1{print $1}'
Read-only file system:mount -o remount,rw /
网络adb:adb connect ip_address:port
#include <stdio.h>
#include <string.h>
//867897040644636
#define IMEI "86789704064463"
int getIMEICheckDigit(char *imei)
{
int i, sum1 = 0, sum2 = 0, temp, result = 0;
for (i = 0; i < strlen(imei); i++) {
if (i % 2 == 0) {
sum1 += imei[i] - '0';
} else {
temp = (imei[i] - '0') * 2;
sum2 += temp;
if (temp >= 10) {
sum2 -= 9;
}
}
}
temp = (sum1 + sum2) % 10;
if (temp != 0) {
result = 10 - temp;
}
return result;
}
int main(int argc, char *agrv[])
{
printf("IMEI %s check digit is %d\n", IMEI, getIMEICheckDigit(IMEI));
return 0;
}
计算->实例->实例详细信息->附加的VNIC->VNIC详细信息->IPv4地址->编辑->临时公共IP->更新
查看centos版本:cat /etc/redhat-release
设置时区:timedatectl set-timezone Asia/Shanghai
启动时间:date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"system boot:%Y-%m-%d %H:%M:%S"
运行时间:cat /proc/uptime | awk -F. '{run_days = $1 / 86400; run_hour = ($1 % 86400) / 3600; run_minute = ($1 % 3600) / 60; run_second = $1 % 60; printf("系统已运行:%d天%d时%d分%d秒\n", run_days, run_hour, run_minute, run_second)}'
切换至上次目录:cd -
清空至行首:Ctrl+U
清空至行尾:Ctrl+K
移动至行首:Ctrl+A
移动至行尾:Ctrl+E