Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View godcheese's full-sized avatar
💪
Focusing

godcheese godcheese

💪
Focusing
View GitHub Profile
@godcheese
godcheese / git-push.sh
Last active June 29, 2017 09:27
Linux platform bash file be used to git push code
#!/usr/bin/env bash
# Linux platform bash file
echo "正在添加文件..."
git add .
echo -n "正在提交备注...,请填写备注(可空):"
read remarks
if [ ! -n "$remarks" ];then
remarks="常规提交"
fi
git commit -m "$remarks"
@godcheese
godcheese / dateFormat.js
Last active July 15, 2017 02:29
JavaScript 时间戳格式化函数
/**
* 和PHP一样的时间戳格式化函数
* @param {string} format 格式
* @param {int} timestamp 要格式化的时间 默认为当前时间
* @return {string} 格式化的时间字符串
*/
function date(format, timestamp) {
var a, jsdate = ((timestamp) ? new Date(timestamp * 1000) : new Date());
var pad = function (n, c) {
if ((n = n + "").length < c) {
@godcheese
godcheese / migrate.cmd
Last active August 19, 2017 07:49
MYSQL数据库迁移脚本
chcp 65001
@REM Author:godcheese@qq.com
@REM Description:MYSQL数据库迁移脚本
@REM Platform:Windows
@echo off
set "MYSQL_HOME=D:\dev\mysql\mysql5.7.14"
set "HOST=localhost"
@godcheese
godcheese / dbseed.cmd
Created August 19, 2017 07:50
MYSQL数据库填充脚本
chcp 65001
@REM Author:godcheese@qq.com
@REM Description:MYSQL数据库填充脚本
@REM Platform:Windows
@echo off
set "MYSQL_HOME=D:\dev\mysql\mysql5.7.14"
set "HOST=localhost"
@godcheese
godcheese / logback-spring.xml
Created July 26, 2019 03:17
logback-spring.xml
<!-- /Volumes/office/dev/IdeaProjects/nimrod-backend/src/main/resources/logback-spring.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!--
<pattern>
%d{yyyy-MM-dd HH:mm:ss} [%level] - %msg%n
Logger: %logger
Class: %class
File: %file
Caller: %caller