Skip to content

Instantly share code, notes, and snippets.

View willerce's full-sized avatar

willerce

View GitHub Profile
Math.random().toString(36).substring(2, 15)
@willerce
willerce / ResLoader.js
Last active July 3, 2018 14:01
保存 Javascript 和 CSS 到 LocalStorage 中
var Loader = (function () {
function Loader(options) {
this.options = options;
if (resource.scripts && resource.baseUrl) {
for (var i = 0; i < this.options.scripts.length; i++) {
this.load('js', this.options.scripts[i]);
}
for (var i = 0; i < this.options.stylesheets.length; i++) {
this.load('css', this.options.stylesheets[i]);
}
@willerce
willerce / jquery.touchwipe.js
Created January 2, 2015 18:46
jQuery Touchwipe Plugin
/**
* jQuery Plugin to obtain touch gestures from iPhone, iPod Touch and iPad, should also work with Android mobile phones (not tested yet!)
* Common usage: wipe images (left and right to show the previous or next image)
*
* @author Andreas Waltl, netCU Internetagentur (http://www.netcu.de)
* @version 1.1.1 (9th December 2010) - fix bug (older IE's had problems)
* @version 1.1 (1st September 2010) - support wipe up and wipe down
* @version 1.0 (15th July 2010)
*/
(function($) {
@willerce
willerce / noderce-data.js
Created March 13, 2014 10:57
Noderce 数据导出脚本
//需要安装两个依赖包
// npm install mongoskin
// npm install moment
// 根目录建立一个 markdown 目录保存文章
var mongo = require('mongoskin');
var moment = require('moment');
var fs = require('fs');
//这里需要数据库连接串
var db = mongo.db("mongodb://", {native_parser: true});
@willerce
willerce / fontconfig.properties
Last active August 11, 2019 18:15
JAVA IDE 的字体配置
# %W% %E%
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Version
version=1
# Component Font Mappings