- 声明变量都加
$
- 调用类 a 的方法b 使用
$a->b
php 执行文件需要写:
<? php
echo "hello"
?>
FROM golang:1.6 as builder | |
RUN mkdir -p /home/filex | |
RUN mkdir -p /disk/ssd1 | |
WORKDIR /home/filex | |
ARG project | |
COPY ./filex/$project . | |
FROM builder as job | |
# 注意,如果 stage 中想要使用 ARG 需要重新在此重新定义 |
# delete images that contains none. | |
docker images|grep none|awk '{print $3}'|xargs -n1 -I{} docker rmi {} |
# clean the same relative path in echo disk. the disk name like /disk/sata01, /disk/sata02 | |
for i in {1..12};do | |
if [ $i -lt 10 ]; then | |
i=0$i | |
fi | |
rm -rf /disk/sata$i/<filepath> | |
done |
# run command: hdfs dfs -ls /cdn-logs/<pvdName>/raw/*/*/*|awk -f ./clean.awk | |
BEGIN{ | |
# file expiration date | |
remaining = 25 * 24 * 3600 | |
} | |
{ | |
# $8 is filepath, get datetime from filepath |
#!/usr/bin/env bash | |
# sync src to git repository. | |
# src is file | |
src=$1 | |
# dest is dir | |
dest=$2 | |
cp $src $dest |
# === Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated February 2021 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
-- scan whole keys in redis by key_pattern and filter | |
-- key_pattern: key regexp | |
-- count: match count for once scan | |
-- filter: one function that accepts the value of key as param. | |
local scan=function(key_pattern, count, filter) | |
local start = "-1" | |
local lst = {} | |
while (start ~= "0") do | |
if (start == "-1") then |
#!/usr/bin/env bash | |
function exitIfEmpty() { | |
if [ -z "$2" ]; then | |
echo "$1 is empty" | |
exit 1 | |
fi | |
} | |
function initJob() { |
cmake_minimum_required(VERSION 3.15) | |
project(run_curl C) | |
set(CMAKE_C_STANDARD 99) | |
# 设置头文件 | |
set(INC_DIR ./curl/include) | |
# 设置源码 | |
set(LINK_DIR ./curl/lib) |
$
$a->b
php 执行文件需要写:
<? php
echo "hello"
?>