Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View redblue9771's full-sized avatar
👀
Studying at freeCodeCamp

赤琦 redblue9771

👀
Studying at freeCodeCamp
View GitHub Profile
@redblue9771
redblue9771 / 📊 Weekly development breakdown
Last active October 29, 2020 00:34
📊 Weekly development breakdown
TypeScript 3 hrs 34 mins ████████████▋░░░░░░░░ 60.3%
Other 1 hr 51 mins ██████▌░░░░░░░░░░░░░░ 31.3%
Markdown 7 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.0%
Python 7 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.0%
JSON 3 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.1%
@redblue9771
redblue9771 / Conventional Commits.md
Last active November 17, 2020 07:44
约定式提交规范

1. 全局安装commitizen & cz-conventional-changelog

commitizen是一个撰写合格commit message的工具,用于代替git commit指令,而 cz-conventional-changelog 适配器提供 conventional-changelog 标准(约定式提交标准)。

基于不同需求,也可以使用不同适配器。

npm install -g commitizen cz-conventional-changelog
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
@redblue9771
redblue9771 / note.txt
Last active January 31, 2020 14:12
deepin-wine-tim
pacman -S gnome-settings-daemon //添加到自启
gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
### (5)TIM 需要的 Flash 的安装方法
1. 下载需要的 install_flash_player_ppapi.exe
2. 将下载的安装文件放入~/.deepinwine/Deepin-TIM/drive_c 下,即 TIM 所在 Wine C 盘根目录
3. 打开一个 Terminal ,执行:
@redblue9771
redblue9771 / git-clear-cache.sh
Created December 8, 2019 16:52 — forked from joemaffia/git-clear-cache.sh
Clear git cache
git rm -r --cached .
git add .
git commit -am 'git cache cleared'
git push
@redblue9771
redblue9771 / index.css
Last active December 1, 2019 22:07
Awesome Timeline
.main-timeline{
overflow: hidden;
position: relative;
padding: 60px 0;
}
.main-timeline:before{
content: "";
width: 1px;
height: 100%;
background: #cfcdcd;
@redblue9771
redblue9771 / stylus.json
Last active November 13, 2019 06:19
styles
[
{
"installDate": 1534259003610,
"enabled": true,
"updateUrl": "https://userstyles.org/styles/chrome/130739.json",
"md5Url": "https://update.userstyles.org/130739.md5",
"url": "http://userstyles.org/styles/130739",
"originalMd5": "dc4cddc4ac86caaac18a24e2eaea4255",
"sections": [
{
@redblue9771
redblue9771 / returnTime.js
Created July 12, 2019 14:18
JavaScript 中一些时间功能的实现 - 给一个时间戳,返回距离现在多久了
/**
* 给一个时间戳,返回距离现在多久了
* @param time 一个时间戳
* @returns {*} 时间差
*/
function returnTime(time) {
if (isNaN(time) === true)
return "Error!" + '"' + time + '"' + " is NaN";
if (time < 0) return "Error! 过去的时间大于现在的时间!";
else {
@redblue9771
redblue9771 / countDown.js
Created July 12, 2019 14:17
JavaScript 中一些时间功能的实现 - 倒计时
/**
* 倒计时
* @param now 现在的时间
* @param startTime 计时开始时间
* @param endTime 计时结束时间
* @returns {*} 计时标识
*/
function countDown(startTime, endTime) {
var now = Date.now();
if (now < startTime) {
@redblue9771
redblue9771 / checkTime.js
Created July 12, 2019 14:16
JavaScript 中一些时间功能的实现 - 检查平润年,返回正确月份的天数
/**
* 检查平润年,返回正确月份的天数
* @param year 年份
* @param month 月份
* @returns {number} 该月正确的天数
*/
function checkTime(year, month) {
if (month === 2) return (year % 4 === 0 && year % 100 !== 0 || year % 400) === 0 ? 29 : 28;
return '4;6;9;11'.indexOf(month + ';') === -1 ? 31 : 30;
}
@redblue9771
redblue9771 / formatTime.js
Created July 12, 2019 14:15
JavaScript中一些时间功能的实现 - 格式化时间戳(yy/mm/dd hh:MM)
/**
* 格式化时间戳 格式:yy/mm/dd hh:MM
* @param time 时间戳
* @returns {string} yy/mm/dd hh:MM
*/
function formatTime(time) {
var date = new Date(time);
var year = date.getFullYear();
var month = date.getMonth() + 1;
var days = date.getDate();