Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@cgfarmer4
cgfarmer4 / AudioSessionManager.swift
Last active September 16, 2024 05:38
Poor mans streaming using AVCaptureSession
class AudioSessionManager: NSObject, ObservableObject {
@Published var microphones: [AVCaptureDevice] = []
var captureSession: AVCaptureSession = .init()
var audioOutput: AVCaptureAudioDataOutput?
var configured: Bool = false
private var audioInput: AVCaptureDeviceInput?
let dataOutputQueue = DispatchQueue(label: "audio_queue",
qos: .userInteractive,

Assuming you are using the official PHP Docker image...

# ---------------------------------------------------------------
# PHP Extension: Gearman
# Download Gearman PECL extension for Gearman supporting PHP 7
RUN apt-get -y --allow-unauthenticated install \
    libgearman-dev
RUN cd /tmp \
 && git clone https://github.com/wcgallego/pecl-gearman.git \
// html 中引入 ga
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//static.wdjimg.com/misc/javascripts/analytics.js','ga');ga('create', 'UA-15790641-69', 'auto');
// 把 pageview 放到 js 中
ga('send', 'pageview');
// 用户触发动作时,js 中记录示例
ga('send', 'event', 'yilan', 'share', 'wechat-timeline');
ga('send', 'event', 'yilan', 'install', '这里写对应的包名');
'use strict';
var React = require('react-native');
var {
Bundler,
StyleSheet,
Text,
TouchableHighlight,
View,
ScrollView,