Skip to content

Instantly share code, notes, and snippets.

@minwe
minwe / ysp-base.less
Created July 29, 2013 12:26
云适配移动网站重置样式表
/*---------------------------------------------------
Yunshipei Base Style
--------------------
@author : Minwe Luo
@email : [email protected]
@update : 2013.07.29
---------------------------------------------------*/
article,
aside,
/*
* UIKit Grid System
* - 10列网格,基于浮动的布局
* - Mobile first
* - Breakpoint: <768px | 768px - 960px | >960px
*
========================================================================== */
/* Component
@minwe
minwe / grid-foundation.less
Created October 29, 2013 07:15
Foundation 5 Grid System
// New grid containing medium styles
/**
* Foundation grid system
* - 12列网格,基于浮动布局;相对定位实现push/pull
* - Mobile first
* - Breakpoint:640px | 768px - 1024px | >1024px
*/
/* Grid HTML Classes */
.row {
@minwe
minwe / grid-bs.less
Created October 29, 2013 07:18
bootstrap 3 grid system
/**
* Bootstrap Grid System
* - 12列网格,基于浮动的布局
* - Mobile first
* - Breakpoint: Phones (<768px) | Tablets (≥768px) | Desktops (≥992px) | Large Desktops (≥1200px)
*/
.row {
margin-right: -15px;
@minwe
minwe / grid-yui.less
Created October 29, 2013 07:21
Pure CSS grid
/**
* YUI Grids
* g - row, c - column
*/
/*responsive*/
.am-g {
letter-spacing: -0.31em;
*letter-spacing: normal;
word-spacing: -0.43em;
@minwe
minwe / json.format.js
Created November 16, 2013 09:19
JSON formater
var JSONFormat = (function(){
var _toString = Object.prototype.toString;
function format(object, indent_count){
var html_fragment = '';
switch(_typeof(object)){
case 'Null' :0
html_fragment = _format_null(object);
break;
case 'Boolean' :
html_fragment = _format_boolean(object);
@minwe
minwe / menu.js
Created November 28, 2013 03:28
maybe
define(function (require, exports, module) {
var $ = Zepto;
/**
* slideToggle
* @param element
* @param display
*/
var slideToggleTrans = function (element, display, callback) { // display表示默认更多展开元素是显示状态还是隐藏
element.on("click", function () {
/*Here’s a way that’s more readable … (I think anyway)
Look how the syntax reads …
=====================================
{{#compare Database.Tables.Count ">" 5}}
There are more than 5 tables
{{/compare}}
// Usage: $(element).scrollToTop([position])
;(function($){
// only allow one scroll to top operation to be in progress at a time,
// which is probably what you want
var scrollToTopInProgress = false
$.fn.scrollToTop = function(position){
var $this = this,
targetY = position || 0,

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: