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 / 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 / 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"
@YCF
YCF / module.js
Last active August 29, 2015 14:06 — forked from mikaelkaron/module.js
Async jquery multi ajax
define([ "when/parallel", "jquery" ], function (parallel, $) {
var tasks = [ "url1", "url2", "url3" ].map(function (url) {
return function () {
return $.get(url);
};
});
parallel(tasks)
.then(function (results) {
# coding: utf-8
from flask import request, g
from functools import wraps
from flask import abort, session, redirect, url_for, flash
from .models import Topic, Attachment
from . import roles
def require_visitor(func):
"""仅允许非登陆用户访问,如signin页面"""