Skip to content

Instantly share code, notes, and snippets.

View YCF's full-sized avatar
🎯
Focusing

YouCanFly YCF

🎯
Focusing
View GitHub Profile
@YCF
YCF / board.dts
Created September 1, 2021 14:09 — forked from petejohanson/board.dts
Zephyr level shifter GPIO abstraction
/dts-v1/
/ {
shifter: 74hc595a@0 {
compatible = "ti,xx74hc595a";
a-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
b-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
c-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
@YCF
YCF / auto_gray.html
Last active February 8, 2020 14:37
<style>
body.grayDay {
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(100%); }
</style>
<script>
window.onload = function() {
var grayDay = [108, 207, 219, 404, 420, 512, 815, 909, 918, 1213];
var today = new Date();
var d = (today.getMonth() + 1) * 100 + today.getDate();
@YCF
YCF / shift.c
Created March 29, 2018 13:00
按下shift ,某一键变为其他键
//shift + enter = " 来自:https://github.com/qmk/qmk_firmware/blob/e899cb8940da04fa2610604f0aab417db7fac119/keyboards/mitosis/keymaps/datagrok/keymap.c
bool comm_shifted = false;
bool ques_shifted = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint8_t shifted;
uint16_t s_keycode;
bool *k_shifted;
switch (keycode) {
//特殊 shift
@YCF
YCF / listen.py
Created January 20, 2018 13:35 — forked from l1905/listen.py
头脑王者答题辅助(https://github.com/chxj1992/hortor_cheater, 将作者的listen.py替换即可)
import re
import json
from mitmproxy import ctx
from urllib.parse import quote
import string
import requests
def response(flow):
path = flow.request.path
if path == '/question/bat/findQuiz':
@YCF
YCF / main.go
Created October 20, 2017 02:34
qmk complier - golang
package main
import (
"Goose/conf"
"Goose/router"
"bytes"
"database/sql"
"fmt"
"html/template"
"io/ioutil"
@YCF
YCF / sxhkd
Last active December 30, 2020 17:15
通过快捷键快速缩放窗口,实现窗口的伪造平铺
#伪平铺特性
#
# q w e LeftTop Max RightTop
# super + shift +: a s d ===> Left Center Right
# z x c LeftBottom unMax RightBottom
#
super + shift + {q,w,e,a,s,d,z,x,c}
sh -c "~/.config/sxhkd/window.sh {LT,M,RT,L,C,R,LB,U,RB}"
@YCF
YCF / sqlite2json.go
Created March 2, 2017 11:49
查询数据库输出为json的例子
package main
import (
"database/sql"
"encoding/json"
"fmt"
"net/http"
"strings"
"github.com/go-ini/ini"
@YCF
YCF / v2ex_daily.py
Created April 24, 2016 23:29
20160420 匹配新登陆方式。
# coding:utf-8
import re
import requests
session = requests.Session()
# 领取 X 铜币
# 每日登录奖励已领取
@YCF
YCF / 17wo_daily.py
Last active April 20, 2016 06:48
联通 一起沃 17wo 自动签到领流量
#/usr/bin/env python
#coding:utf-8
import requests
import re
import time
import datetime
import sys
import json
reload(sys)
@YCF
YCF / v2ex_daily.go
Last active April 19, 2016 07:45 — forked from yinheli/v2ex_daily.go
领取 v2ex 每日奖励。命令行参数1=用户名,命令行参数2=密码。 %v2ex_dialy username pwd
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"regexp"
"strings"