Skip to content

Instantly share code, notes, and snippets.

View leibnizli's full-sized avatar

Leibniz Li leibnizli

View GitHub Profile
anonymous
anonymous / iOS-7-icons-with-pure-CSS.markdown
Created November 7, 2014 09:05
A Pen by Péter Schmíz.

iOS 7 icons with pure CSS

I tried to make almost all the iOS 7 icons with html + css. They aren't pixel perfect and there are bugs, but it was fun :) (made in 1 day... :D)

A Pen by Péter Schmíz on CodePen.

License.

@jaredatch
jaredatch / gist:8f834669a50aafc87415
Created June 14, 2014 22:11
Add past-event and allday-event classes to FullCalendar2 events
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
events: 'YOUR-GOOGLE-XML-FEED-URL',
eventClick: function(event) {
window.open(event.url, 'gcalevent', 'width=900,height=600');
@yisibl
yisibl / HTML-tags.md
Last active September 15, 2024 14:09
常用的 HTML 头部标签

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
module.exports = function(grunt) {
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
options: {
paths: ['public/assets/modules'],
compress: true,
yuicompress: true,
;
(function() {
$.extend({
unparam: function(param) {
if (param[0] === '?') param = param.slice(1)
var re = {}
for (var i = 0, arr = param.split('&'), kv; kv = arr[i]; i++) {
kv = kv.split('=')
re[kv[0]] = kv[1]
}
@justjavac
justjavac / img2txt.js
Last active December 9, 2021 06:46
img2txt:基于canvas的图片转字符画工具
var cv = document.getElementById('cv');
var c = cv.getContext('2d');
var txtDiv = document.getElementById('txt');
var fileBtn = document.getElementById("up-button");
var img = new Image();
img.src = 'a.jpg';
img.onload = init; // 图片加载完开始转换
fileBtn.onchange = getImg;
// 根据灰度生成相应字符