Enter in sudo user
sudo su
image: node:6-alpine | |
cache: | |
key: "$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME" | |
paths: | |
- node_modules/ | |
- yarn_cache/ | |
stages: | |
- setup |
/** UI element heights which used in message height calculation */ | |
textPaddingVertical: number = 7; | |
textPaddingHorizontal: number = 10; | |
timeHeight: number = 12; | |
timeTopMargin: number = 5; | |
messageContainerVerticalMargin: number = 7; | |
dateSeperatorVerticalMargin: number = 20; | |
dateSeperatorHeight: number = 15; | |
imageHeight: number = 170; | |
imageBottomMargin: number = 10; |
# rename.py | |
# usage: python3 rename.py ~/pics | |
import sys | |
from pathlib import Path | |
def print_usage(): | |
print('usage: python3 rename.py [target-dir]', file=sys.stderr) | |
""" | |
Mac 喝水提示 | |
crontab -e | |
*/30 8-22/1 * * * [your python] [script path] | |
- 8点到20点每半小时提示一次喝水 | |
""" |
# 生成 dhparam.pem 文件, 在命令行执行任一方法: | |
# 方法1: 很慢 | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | |
# 方法2: 较快 | |
# 与方法1无明显区别. 2048位也足够用, 4096更强 | |
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096 |
function useFormik(props) { | |
// useState to keep the same observable around without recreating it on each render | |
const [formik] = React.useState(() => | |
mobx.observable({ | |
values: props.initialValues || {}, | |
touched: {} | |
}) | |
) | |
// just mutate state, this function itself can be considered an action+reducer |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
WARNING: Parsing of this file by third-party apps is not supported. The | |
file, and the font files it refers to, will be renamed and/or moved out | |
from their respective location in the next Android release, and/or the | |
format or syntax of the file may change significantly. If you parse this | |
file for information about system fonts, do it at your own risk. Your | |
application will almost certainly break with the next major Android | |
release. |
rm -rf $HOME/Library/Developer/Xcode/DerivedData/* |
from functools import wraps | |
import inspect | |
from inspect import Parameter | |
from flask import Flask, request, jsonify | |
from typing import Optional | |
# noinspection PyUnresolvedReferences,PyProtectedMember | |
empty = inspect._empty |