Skip to content

Instantly share code, notes, and snippets.

View YCF's full-sized avatar
🎯
Focusing

YouCanFly YCF

🎯
Focusing
View GitHub Profile
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@OhYee
OhYee / vim.ahk
Last active May 10, 2024 17:57
实现类Vim操作
;SpaceFn
#inputlevel,2
SetCapsLockState, AlwaysOff ; 设置大写锁定为永远为关闭状态(本脚未触发时不会起作用)
*Capslock::SetCapsLockState, AlwaysOff ; 按下 Capslock 的时候设置为永远为关闭状态
^Capslock:: ; Ctrl + Capslock 切换大写锁定状态
If GetKeyState("CapsLock", "T") = 1
SetCapsLockState, AlwaysOff
Else
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active June 29, 2024 10:22
crack activate Office on mac with license file
@jackhumbert
jackhumbert / keymap.c
Created March 16, 2018 22:45
preonic with encoder
/* Copyright 2015-2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@jackhumbert
jackhumbert / keymap.c
Created March 16, 2018 21:40
encoder
static uint8_t encoder_state = 0;
static int8_t encoder_value = 0;
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
void matrix_init_user(void) {
encoder_state = PIND & 0x3;
}
void matrix_scan_user(void) {
@jinyeow
jinyeow / bspwmrc
Last active November 7, 2022 13:30
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
@techimob
techimob / AAA
Created March 3, 2015 02:31
Test
AAA
@ccbikai
ccbikai / unsplash.py
Last active December 31, 2019 12:15
unsplash 全站下载脚本
# -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# unsplash 全站下载脚本
# 请先安装 requests ,BeautifulSoup
# pip install requests beautifulsoup4
# 运行 python unsplash.py
# 输入最小页数和最大页数
@kejun
kejun / gist:3f4851c7f3b3e209fcbb
Last active July 9, 2019 15:23
最近一次项目的总结

mathclub是最近做的一个个人项目,帮助考SAT的同学通过在线做题、回顾、问答提高成绩。用户功能有:计次/计时做题、成绩单、错题分布、错题回顾、提问、汇总以及注册登录。管理后台主要是题库管理、学员管理、成绩单管理、问题回复。怎么看都像学校里的课设,的确项目本身并不出奇,开发上选用的一些方案或许更有意思。

整个项目一个人从产品需求、原型设计、前后端开发到部署历时2周左右。可以从截图上感受一下:

image

技术选型上服务端是Node.js,应用框架选了老牌的Express(4.x变化挺大不少中间件都废了),数据服务用的是MongoLab(MongoDB的云服务平台),图片上传用的是又拍云,程序部署在Nodejitsu上。模板引擎没选主流的Jade或ejs,而是用Express React Views它实现了在服务端渲染React组件。前端框架是用React,这次有意想追求前后端全部组件化的组织。之前是用Webpack实现CommonJS模块打包,这次用Browserify配置更简单,它有丰富的transform很赞,其中的reactify转换React的JSX很完美。CSS用Sass+autoprefixer让人省心。将这一切串起来的自动构建工具是Gulp。我其实崇尚用最精简的工具组合开发,上述组合在我看来比较精简了。(帖纸留念)

![image](http://satexam.b0.upaiyu