Skip to content

Instantly share code, notes, and snippets.

@dahaha-365
dahaha-365 / lazy_script.js
Last active November 15, 2024 15:04
Clash Verge Rev 全局扩展脚本(懒人脚本配置)
/***
* Clash Verge Rev 全局扩展脚本(懒人配置)/ Mihomo Party 覆写脚本
* URL: https://gist.github.com/dahaha-365/0b8beb613f8d1ee656fe1f21e1a07959
*/
/**
* 整个脚本的总开关,在Mihomo Party使用的话,请保持为true
* true = 启用
* false = 禁用
*/
@xinzhi
xinzhi / content.js
Created April 12, 2023 15:20
自动展开显示 Twitter 图片 ALT 文本的扩展脚本,推荐搭配 Arc 浏览器使用
// 1. 打开 Arc 浏览器访问 Twitter 网站;
// 2. 左侧面板右下角点击 New Boost - Inject - A specific website(确认应用范围是 twitter.com)
// 3. 请空默认代码,粘贴本页面代码即可。
// 效果测试地址: https://twitter.com/ciguleva/status/1637233764656107520?s=20
const tweetSelector = 'article[data-testid="tweet"]';
const tweetTextSelector = 'div[data-testid="tweetText"]';
const tweetPhotoSelector = 'div[data-testid^="tweetPhoto"]';
const appendAltText = (tweet, altText) => {
@Julien-Marcou
Julien-Marcou / ecmascript.md
Last active October 15, 2024 16:55
ECMAScript Support

ECMAScript Support (as of October 29, 2022)

Global support of es2023 since:

  • Chrome v97 (January 4, 2022)
  • Edge v97 (December 1, 2021)
  • Safari v15.4 (March 14, 2022)
  • Safari on iOS v15.4 (March 14, 2022)
  • Opera v83 (January 19, 2022)
  • Firefox v104 (June 23, 2022)
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active May 12, 2024 14:24
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@sh3l6orrr
sh3l6orrr / TCA_zh.md
Last active October 9, 2024 03:22
TCA

The Composable Architecture (可组装架构)

The Composable Architecture (简写为TCA) 让你用统一、便于理解的方式来搭建应用程序,它兼顾了组装,测试,以及功效。你可以在 SwiftUI,UIKit,以及其他框架,和任何苹果的平台(iOS、macOS、tvOS、和 watchOS)上使用 TCA。

@brennanMKE
brennanMKE / IDETemplateMacros.plist
Last active October 27, 2024 01:19
Xcode File Header Templates
<?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>FILEHEADER</key>
<string>
// Copyright © ___YEAR___ ___ORGANIZATIONNAME___.
// All Rights Reserved.
</string>
<key>ORGANIZATIONNAME</key>
@zsajjad
zsajjad / lefthook.yml
Last active August 21, 2024 10:56
Lefthook for React/ReactNative apps
// cSpell:word commitlint typecheck
pre-commit:
parallel: true
commands:
type-check:
glob: '*.{ts,tsx}'
run: yarn typecheck
lint:
glob: '*.{js,ts,jsx,tsx}'
<?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>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleIdentifier</key>
<string>com.YourName.YourAppName</string>
<key>CFBundleVersion</key>
<string>1</string>
@davidteren
davidteren / nerd_fonts.md
Last active November 13, 2024 19:26
Install Nerd Fonts via Homebrew [updated & fixed]
@hdsenevi
hdsenevi / Podfile
Created January 22, 2019 19:17
Podfile that has an issue in it
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
install! 'cocoapods', :deterministic_uuids => false
target 'OUR_PROJECT_NAME' do
pod 'AppCenter/Crashes', '~> 1.9.0'
pod 'AppCenter/Analytics', '~> 1.9.0'
pod 'AppCenterReactNativeShared', '~> 1.8.1'
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks