Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

zheng fuchao2012

🎯
Focusing
Block or report user

Report or block fuchao2012

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
View fetchbaidu.js
// ==UserScript==
// @name 百度网盘直接下载助手
// @namespace undefined
// @version 0.9.24
// @description 直接下载百度网盘和百度网盘分享的文件,避免下载文件时调用百度网盘客户端,获取网盘文件的直接下载地址
// @author ivesjay
// @match *://pan.baidu.com/disk/home*
// @match *://yun.baidu.com/disk/home*
// @match *://pan.baidu.com/s/*
// @match *://yun.baidu.com/s/*
View 生成保险费.vbs
Sub 保险费()
'
' 宏5 宏
'
selectionColumnCount = Selection.Count
For i = 1 To selectionColumnCount
ActiveCell.Value = "保险费、车船税来票-售后回租 专" & ActiveCell.Value
ActiveCell.Offset(1, 0).Range("A1").Select
Next
View 制作工资条.vbs
Sub 制作工资条()
'
' 制作工资条
'
ActiveWindow.SmallScroll Down:=-3
'选择当前激活单元格所在的行
ActiveCell.Rows("1:1").EntireRow.Select
@fuchao2012
fuchao2012 / getCurrentSheetData.vbs
Created Apr 10, 2018
从固定的表里找到需要的数据粘贴到目标表中
View getCurrentSheetData.vbs
Sub getCurrentSheetData()
Application.EnableEvents = False
Application.ScreenUpdating = False
Dim dataCount As Integer, currentSheetName As String
If ActiveSheet.Name <> "result" Then
currentSheetName = ActiveSheet.Name
Application.StatusBar = "处理工作表" & currentSheetName & "中, 老婆大人请稍后..."
If ActiveSheet.Range("K1").Value <> "加险" Then ' 正常数据
ActiveSheet.Range("A3").Select
If Range("A4").Value <> "" Then
View gist:5a21cdddb5ad8ee35ee501182ca3ea88
chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.set({
log: ""
})
});
chrome.runtime.onInstalled.addListener(function (a) {
var b = {
log: ""
};
b.site_manifest = {
View gist:264ed6269a8483301c5940915de1c8f8
chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.set({
log: ""
})
});
chrome.runtime.onInstalled.addListener(function (a) {
var b = {
log: ""
};
b.site_manifest = {
@fuchao2012
fuchao2012 / webpack.js
Created Nov 8, 2017
great export function
View webpack.js
exports = module.exports = webpack
const exportsFn = (obj, mappings)=>{
Object.keys(mappings).forEach(prop=>{
Object.defineProperty(obj, prop, {
configurable: false,
enumerable: true,
get: mappings[prop]
})
})
}
@fuchao2012
fuchao2012 / webpack.build.config.js
Created Nov 8, 2017
Webpack builded file chunk-hash changed every time
View webpack.build.config.js
const path = require('path');
const fs = require('fs-extra');
const os = require('os');
const DefinePlugin = require('webpack/lib/DefinePlugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const HappyPack = require('happypack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ngtools = require('@ngtools/webpack');
@fuchao2012
fuchao2012 / diff.md
Created Apr 10, 2017
bind apply call 的区别
View diff.md

相同点

apply 、 call 、bind 三者都是用来改变函数的this对象的指向的; apply 、 call 、bind 三者第一个参数都是this要指向的对象,也就是想指定的上下文; apply 、 call 、bind 三者都可以利用后续参数传参;

不同点

bind 是返回对应函数,便于稍后调用;

You can’t perform that action at this time.