Skip to content

Instantly share code, notes, and snippets.

View rikumi's full-sized avatar
🐠
绝赞摸鱼中

Rikumi rikumi

🐠
绝赞摸鱼中
View GitHub Profile
@rikumi
rikumi / flexy.css
Created September 9, 2017 10:46
A DSL for CSS3 flexbox
/*
32 Combinations of CSS3 flexbox
Usage Example: <div flex="↖-↗~"/> (row, wrap, align=flex-start + justify=space-between)
<div flex="|·"> (column, center + center)
<p flex="!"/> (flex-grow: 1)
</div>
1. row: - (ALIGN JUSTIFY)
import json, urllib
import tornado.web
import tornado.gen
from datetime import date, timedelta
from tornado.httpclient import AsyncHTTPClient, HTTPRequest
class NewNewHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
@tornado.gen.engine
@rikumi
rikumi / SnapKitExtension.swift
Last active July 13, 2017 06:49
SnapKit 扩展插件
//
// Created by Vhyme on 2017/7/13.
//
/* Usage Example:
func layoutCourseData() {
coursePage.removeAllSubviews()
// 遍历课程数据
@rikumi
rikumi / fab.css
Last active August 7, 2018 12:52
微信小程序仿 Material Design 风格的浮动动作按钮
/*
Material Design 风格的浮动动作按钮(Floating Action Button)
用法:
<fab catchtap="someAction"/>
<fab class="close" catchtap="someAction"/>
<fab class="confirm" catchtap="someAction"/>
<fab class="{{ canPublish ? '' : 'hidden' }}" catchtap="someAction"/>
在上述几个class做动态切换时,会有动画效果。
*/
fab {
@rikumi
rikumi / sliderTest.js
Last active May 5, 2017 04:59
微信小程序缩放式轮播图实现
Page({
data:{
curIndex: 1 // 此处可指定初始状态显示第几个页面
},
onSwiperChange: function(event) {
this.setData({ curIndex: event.detail.current })
}
})