Giter VIP home page Giter VIP logo

little-green-hat's Introduction

little-green-hat

如果你有一台闲置的云主机或者vps或者你的电脑永远都不关机(滑稽),小绿帽可以帮助你每天定时向你的github提交代码,让你每天都被绿。

4d112dbd

status

这个状态是动态每天更新的,每次更新之前都会自动pull。

执行次数 工作天数 上次更新时间
$WORKS{330} $DAYS{316} $NOW{2019-08-04 01:01:30}

install

  • clone 本项目然后新建提交到你的仓库,不要fork
  • git clone [新建后的路径]
  • cd little-green-hat
  • npm i

运行前配置

1.git免密登陆

由于本程序需要使用到git,fork之后你要对本项目走一遍免密pull or push

  • 在命令行输入命令: git config --global credential.helper store
  • 随便更改下文件进行一次commit&push,git就会记住你的账号密码

2.pm2

更改 /pm2.jsoncwd路径

{
  "apps": [{
    "name": "little-green-hat",
    "script": "index.js",
    "cwd": "D:\workspace2\little-green-hat", // 改成你本地的路径
    "exec_mode": "fork",
    "max_memory_restart": "1G",
    "autorestart": true,
    "node_args": [],
    "args": [],
    "env": {

    }
  }]
}

3.重置配置

由于本地的运行历史是由程序动态更新的,请重置你的历史。 拷贝 cat.default.json 覆盖 cat.json

运行

  • pm2是一个守护你的nodejs程序让你的程序在后台运行的好工具,确保你已经安装了pm2 npm i -g pm2
  • pm2 start pm2.json

config

/config/index.js

  module.exports = {
    mode: 'more', // few | more  //每天运行的频率,高或者低
    rule: {
      few: '30 1 1 * * *', // 每天的凌晨1点1分30秒触发 == 1次
      more: '30 1 * * * *' // 每小时的1分30秒触发 == 24 次
    }
  }

little-green-hat's People

Contributors

jon-millent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

iorich

little-green-hat's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.