天津社保增员操作流程

分为新参统,即之前没有在天津参过保的,和转入操作,新参和转入的区分在前面。

新参统的,需要员工自行在天津公共就业服务网https://job.hrss.tj.gov.cn/注册一个个人帐号,并且将个人信息进行完善好。

等完善好后,公司需要用法人登录,然后进行单位就业登记,也就是社保说的用工备案。备案完成后,到社保公司经办平台进行增员操作。

转入的,同上进行用工备案后,再到社保公司经办平台进行增加操作。

减员的话,需要先进行单位用工登记注销,也叫退工备案,操作完成后,再到社保公司经办平台进行减员操作。

使用GitLab Runner为基于Laravel的PHP项目进行部署

当使用GitLab Runner为基于Laravel的PHP项目进行部署时,你可以创建一个.gitlab-ci.yml文件来配置CI/CD流水线。下面是一个示例配置,你可以根据你的项目需求进行适当的修改:

stages:
  - build
  - deploy

variables:
  APP_ENV: production
  DB_HOST: your_database_host
  DB_DATABASE: your_database_name
  DB_USERNAME: your_database_username
  DB_PASSWORD: your_database_password

cache:
  paths:
    - vendor/

before_script:
  - apt-get update
  - apt-get install -y unzip
  - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  - cp .env.example .env
  - composer install --no-interaction --prefer-dist --no-suggest
  - php artisan key:generate
  - php artisan config:cache

build:
  stage: build
  script:
    - php artisan route:cache
    - php artisan view:cache
    - php artisan optimize

deploy_production:
  stage: deploy
  script:
    - ssh deploy@your_server 'cd /var/www/html && git pull origin master'
    - ssh deploy@your_server 'cd /var/www/html && composer install --no-dev --optimize-autoloader'
    - ssh deploy@your_server 'cd /var/www/html && php artisan migrate --force'
    - ssh deploy@your_server 'cd /var/www/html && php artisan config:cache'
    - ssh deploy@your_server 'cd /var/www/html && php artisan route:cache'
    - ssh deploy@your_server 'cd /var/www/html && php artisan view:cache'

请注意,上述配置假设你已经在服务器上设置了适当的部署用户(deploy)和相关权限。确保将your_database_hostyour_database_nameyour_database_usernameyour_database_password替换为实际的数据库连接信息。

此配置文件的关键点如下:

  1. before_script阶段,我们安装依赖、生成密钥并进行配置缓存。
  2. build阶段用于优化Laravel项目。
  3. deploy_production阶段连接到你的服务器,执行必要的操作,例如从Git拉取代码、安装依赖、运行数据库迁移,并缓存配置、路由和视图。

请根据你的具体要求进行适当的调整和自定义。

装个服务器

yum install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-9.rpm

yum install php81-php php81-php-process supervisor tar unzip php81-php-pecl-zip php81-php-gd redis php81-php-mysqlnd php81-php-pecl-redis5

systemctl start redis

/usr/bin/python3 /usr/bin/supervisord -c /etc/supervisord.conf

php81 -r “copy(‘https://install.phpcomposer.com/installer’, ‘composer-setup.php’);”

php81 composer-setup.php

mv composer.phar /usr/local/bin/composer

* * * * * cd /data/isseymiyake-main && php81 artisan schedule:run >> /dev/null 2>&1

python -m ensurepip –upgrade

python -m pip install –upgrade pip

pip install requests

pip install beautifulsoup4

docker-compose up -d –build

主题手册

Welcome to the WordPress Theme Developer Handbook, your resource for learning all about the exciting world of WordPress themes. 

欢迎来到WordPress主题开发人员手册,这是您学习WordPress主题令人兴奋的世界的资源。

The Theme Developer Handbook is a repository for all things WordPress themes. Whether you’re new to WordPress themes, or you’re an experienced theme developer, you should be able to find the answer to many of your theme-related questions right here.

主题开发手册是WordPress主题的所有内容的存储库。无论您是WordPress主题的新手,还是经验丰富的主题开发人员,您都应该能够在这里找到许多主题相关问题的答案。

In this section, you can learn how to build the classic or block themes. The classic theme is the original theme that primarily uses PHP. The block theme is a newer theme that is built mainly using HTML. The block theme is composed entirely of blocks allowing users to take full advantage of the full site editor.

在本节中,您可以学习如何构建经典主题或块主题。经典主题是主要使用PHP的原始主题。块主题是主要使用HTML构建的较新主题。块主题完全由块组成,允许用户充分利用完整的站点编辑器。

Head over to the Block Editor Handbook if you are interested in learning about the block theme.

如果您有兴趣了解块主题,请参阅块编辑器手册。

Continue reading if you are interested in building the classic theme.

如果您对构建经典主题感兴趣,请继续阅读。

  1. If you’re new to developing WordPress themes, start with section 1, where you can find out what a theme is, learn about WordPress’ licenseset up your development environment, and build your first theme.
  2. Once you’re through the introduction, the Theme Basics section will introduce you to the building blocks of a WordPress theme.
  3. The Theme Functionality section will show you all of the different types of functionality you can make use of in your theme.
  4. If you’re looking to give flexibility and yet protect your users, head over to the Customizer and Security sections
  5. If you’ve got to grips with the basics of themes, check out the Advanced Theme Topics to learn about child themes, best UI practices, theme testing and more.
  6. Once you’ve got your theme ready for the world, the final section will cover releasing your theme, teaching you some best practices for theme distribution, and for getting it ready for the WordPress.org theme directory.

Tip:If you want to learn about block themes go to the Block Editor Handbook.

The WordPress Theme Developer Handbook is created by the WordPress community, for the WordPress community. We are always looking for more contributors; if you’re interested stop by the docs team blog to find out more about getting involved.

使用Let’s Encrypt的acme.sh申请泛域名证书

自已的网站如果使用https的话,要不然用阿里的一年免费证书,但是只能一个一个的申请没有办法用泛域名,如果申请收费的话,太贵了,我们这次用Let’s Encrypt的acme.sh来处理泛域名的https证书的问题

acme的github地址是https://github.com/acmesh-official/acme.sh,安装说明有中文版,所以以实例说明

背景:常用的一个开发域名hidev.cn,里面有code,sonar,还有和小程序对接的api等,这些都需要https的证书,哪么我们需要这么干

一、安装acme

curl https://get.acme.sh | sh

安装的时候,经会干这么几件事:

1、安装acme

2、创建一个crontabe,每天0点执行检查

二、DNSPOD配置域名

在dnspod的管理界面,右上角的头象,点一下,然后点击密钥管理(2020年11月11日版本),然后创建一个密钥出来,保存一下

三、配置证书

export DP_Id=”11111″

export DP_Key=”11111″

.acme.sh/acme.sh –issue –dns dns_dp -d *.haoxiaokai.com -d haoxiaokai.com

.acme.sh/acme.sh –install-cert -d *.haoxiaokai.com –key-file /etc/nginx/conf.d/haoxiaokaifull.key –fullchain-file /etc/nginx/conf.d/haoxiaokaifull.cer –reloadcmd “service nginx force-reload”

acme会自动的记录下来你执行的命令,然后每天判断证书有没有过期,如果有过期,就会帮你执行

Git 默认不区分大小写

Git默认是不区分大小写的,造成了不同环境对于大小写区分/不区分造成了问题。

可以通过git config –get core.ignorecase 查看默认配置

通过git config core.ignorecase false设置为区分大小写

然后git status 就可以看到变动

然后push到远程服务器