Skip to content

Instantly share code, notes, and snippets.

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

Rikumi rikumi

🐠
绝赞摸鱼中
View GitHub Profile
@rikumi
rikumi / sliderTest.js
Last active May 5, 2017 04:59
微信小程序缩放式轮播图实现
Page({
data:{
curIndex: 1 // 此处可指定初始状态显示第几个页面
},
onSwiperChange: function(event) {
this.setData({ curIndex: event.detail.current })
}
})
@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 / SnapKitExtension.swift
Last active July 13, 2017 06:49
SnapKit 扩展插件
//
// Created by Vhyme on 2017/7/13.
//
/* Usage Example:
func layoutCourseData() {
coursePage.removeAllSubviews()
// 遍历课程数据
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 / 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)
@rikumi
rikumi / seulogin.js
Created September 14, 2017 01:15
seu-wlan 自动登录/轮询登录脚本
const axios = require('axios');
const read = require('readline-sync');
const program = require('commander');
program
.version('1.0.0')
.option('-u, --username [username]', '设置用户名')
.option('-p, --password [password]', '设置密码')
.option('-d, --daemon [seconds]', '每隔数秒轮询网络状态,一旦退出自动重新登录', '0')
.parse(process.argv);
@rikumi
rikumi / herald-monitor.coffee
Created January 3, 2018 09:03
Slacklet for Monitoring Herald API
monitoring = true
main = ->
send '监控程序已上线'
loop
if not monitoring
send '监控程序已退出'
break
downCount = 0
@rikumi
rikumi / scraper.js
Last active January 10, 2018 01:27
微机原理与接口技术 答案抓取器
/*
微机原理与接口技术 答案抓取器
用法:
1. 使用 Chrome 浏览器;
2. 登录进入作业列表页面,要求所有作业都为已完成、且可查看答案的状态;
3. 地址栏输入地址进入框架内部:223.3.65.249/student/Home_Management/Show_All_Homework_CN.aspx;
4. 打开 F12 控制台,复制粘贴执行下列代码,待显示结果后,保存页面为 PDF。
*/
@rikumi
rikumi / Wallpaper.html
Last active July 15, 2018 05:49
iOS11 简易桌面歌词 / 请先安装 XenHTML、XenInfo / 文件路径 /var/mobile/Library/SBHTML/Rikumi/Wallpaper.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=375, height=667, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<style>
:root {
font-family: 'PingFang SC';
color: #fff;
text-shadow: 0 1px 5px rgba(0, 0, 0, .2);
@rikumi
rikumi / iconsur.sh
Last active October 24, 2023 06:46
My personal iconsur setup
# See https://github.com/rikumi/iconsur
yarn global add iconsur
sudo iconsur set /Applications/Android\ File\ Transfer.app -k Airdroid
sudo iconsur set /Applications/Android\ Studio.app/ -l -c 7a5 -s 0.8
sudo iconsur set /Applications/DaisyDisk.app/ -l
sudo iconsur set /Applications/Decompressor.app/ -l
sudo iconsur set /Applications/Discord.app/
sudo iconsur set /Applications/Google\ Chrome.app/
sudo iconsur set /Applications/IINA.app/ -l -c 161d22