Skip to content

Instantly share code, notes, and snippets.

View notzheng's full-sized avatar
🤓
闷声大发财

不郑 notzheng

🤓
闷声大发财
  • Hangzhou
View GitHub Profile
@notzheng
notzheng / app.styles.ts
Created April 19, 2023 06:58
`useStyles` for Ant Design V5
import createStyles from '@/styles/create-styles';
export const useStyles = createStyles((token) => ({
container: {
backgroundColor: token.colorBgBase,
borderRadius: token.borderRadius,
border: `1px solid ${token.colorBorderSecondary}`,
color: token.colorText,
},
@notzheng
notzheng / index.html
Created August 19, 2022 21:34
mdxvMLK
<div id="square-spinner">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
@notzheng
notzheng / main.js
Created August 6, 2022 14:56
Javascript Range Syntax
const checkValidRangeSyntax = (arr) => {
if (arr.length !== 4) {
return false;
}
if (Object.keys(arr).length !== 2) {
return false;
}
const start = arr[0];
const end = arr[3];
if (!Number.isInteger(start) || !Number.isInteger(end)) {
@notzheng
notzheng / README.md
Last active April 5, 2023 15:17
✈️机场剩余流量显示 Widget (Scriptable App)

Untitled 001

使用

  1. 下载 Scriptable https://scriptable.app/ , macOS 从此处下载 https://scriptable.app/mac-beta/
  2. 打开 Scriptable App ,新建脚本,输入 TrafficDisplay.js 中的内容
  3. 从机场复制 Shadowsocks 订阅地址 ,将脚本内容中 “<API_URL>” 更换为复制的 URL,更改 BUY_DAY 为你服务开始的日期(每月的几号),SERVICE_NAME 可以填写为服务提供商名称
  4. 在 iOS 桌面新建小组件(macOS 为通知栏),选择 Scriptable App,尺寸选择 small,选择第二步新建的脚本即可

关于重置日期

目前仅支持按月重置

@notzheng
notzheng / .Cloud.md
Created July 15, 2022 16:32 — forked from imba-tjd/.Cloud.md
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@notzheng
notzheng / a-pure-css-game-you-must-build-a-lighthouse.markdown
Created October 25, 2020 03:44
A Pure CSS Game - You Must Build a Lighthouse.
@notzheng
notzheng / podcast-ratings.php
Created December 6, 2019 06:18 — forked from sgmurphy/podcast-ratings.php
Scrape ratings from iTunes store
<?php
/**
* Scrape the number of podcast reviews from iTunes for all country specific storefronts.
*
* @author Sean Murphy <[email protected]>
*/
$podcast_id = '366931951'; // Startups For the Rest of Us
//$podcast_id = '318567721'; // techzing
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>includeDeprecatedInProductGroups</key>
<false/>
<key>pkginfoPrefillVersion</key>
<true/>
<key>pkginfoPrefillDisplayName</key>
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'<style>* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\