npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-heart

v1.0.2

Published

[详细介绍:https://blog.csdn.net/l598465252/article/details/81100127](https://blog.csdn.net/l598465252/article/details/81100127)

Downloads

4

Readme

详细介绍:https://blog.csdn.net/l598465252/article/details/81100127

使用方法

将该项目下载到本地,本地需要使用Linux操作系统,直接放服务器上也可以。 下载完之后先删除.git文件夹

git clone [email protected]:YES-Lee/git_painter.git && cd git_painter && rm -rf .git // 可以直接下载zip在解压

重新初始化git

git init
git add .
git commit -m 'init'

然后执行loop脚本刷记录,等待结束

python loop.py

GitHub,将该项目推上去,然后就可以到GitHub上看效果啦

git remote add origin {仓库地址}
git push -u origin master

在服务器部署自动commit

crontab -e
#  输入以下代码,前两个参数分别是分钟和小时,该任务为每天12:00定时执行
# 00 12 * * * cd /home/git_heart && git pull && /usr/bin/python main.py

参数说明

main.py用于在服务端执行定时任务的脚本,loop.py用来刷之前的记录

#  loop.py
#  自定义图形
PATTEN = [  # 图形矩阵,可以通过修改该变量来设置不同的图形,行建议最多不超过7行
    [0, 1, 1, 0, 0, 0, 1, 1, 0, 0],
    [1, 1, 1, 1, 0, 1, 1, 1, 1, 0],
    [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
    [0, 1, 1, 1, 1, 1, 1, 1, 0, 0],
    [0, 0, 1, 1, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 1, 1, 1, 0, 0, 0, 0],
    [0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
]


# 修改提交次数,次数越多颜色越深,耗时也越长
def commit(flag):
    if flag:
        for n in range(39):
            with open('./record.txt', 'a') as record:
                record.write('.~^~')
                record.close()
                os.system('git commit -a -m \"HeartBeat\"')
...

# 开始日期,在GitHub主页查看左上角日期
START_DATE = '2017-7-16'  # 开始日期, 码云和git显示不一样, 建议从最左上角开始
...

才过的坑

  • GitHub将项目删除后记录也会随之消失,但是码云不会(码云已经被我弄的一团糟)
  • GitHub从上到下是周日到周六,码云是周一到周日,两个要分别重选时间commit

图形展示

  • 小心心❤️
[
  [0, 1, 1, 0, 0, 0, 1, 1, 0, 0],
  [1, 1, 1, 1, 0, 1, 1, 1, 1, 0],
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
  [0, 1, 1, 1, 1, 1, 1, 1, 0, 0],
  [0, 0, 1, 1, 1, 1, 1, 0, 0, 0],
  [0, 0, 0, 1, 1, 1, 0, 0, 0, 0],
  [0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
]

heart

  • X(原谅鄙人想象力不够丰富)
[
  [0, 0, 0, 0, 0],
  [1, 0, 0, 0, 1],
  [0, 1, 0, 1, 0],
  [0, 0, 1, 0, 0],
  [0, 1, 0, 1, 0],
  [1, 0, 0, 0, 1],
  [0, 0, 0, 0, 0]
]

heart

此项目始于无聊,终于装逼,仅供娱乐,请勿用于其他操作