Skip to content

Instantly share code, notes, and snippets.

View jiangdi0924's full-sized avatar
:shipit:
yo

Jiangdi jiangdi0924

:shipit:
yo
View GitHub Profile
@jiangdi0924
jiangdi0924 / gist:25651a4f351e2c7cc6b445f9ac3dad59
Created February 11, 2023 10:22
chatGPT 编写的扫雷游戏
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
}
td {
width: 30px;
@jiangdi0924
jiangdi0924 / CameraAnchor.cs
Created August 3, 2022 02:33 — forked from fadookie/CameraAnchor.cs
Screen-relative anchoring component for Unity3D. Find more Unity code at http://www.eliotlash.com/2015/01/unity3d-components-and-code-snippets/
/***
* This script will anchor a GameObject to a relative screen position.
* This script is intended to be used with ViewportHandler.cs by Marcel Căşvan, available here: http://gamedev.stackexchange.com/a/89973/50623
* It is also copied in this gist below.
*
* Note: For performance reasons it's currently assumed that the game resolution will not change after the game starts.
* You could not make this assumption by periodically calling UpdateAnchor() in the Update() function or a coroutine, but is left as an exercise to the reader.
*/
/* The MIT License (MIT)
@jiangdi0924
jiangdi0924 / SheetPresentation.swift
Created April 1, 2022 15:01 — forked from tigi44/SheetPresentation.swift
Using a UISheetPresentationController on SwiftUI
import SwiftUI
// MARK: - SheetPresentation
public extension View {
func sheetPresentation<SheetView: View>(isPresented: Binding<Bool>, @ViewBuilder sheetView: @escaping () -> SheetView, onDismiss: SheetPresentationController<SheetView>.DefaultClosureType? = nil) -> some View {
self.background(
@jiangdi0924
jiangdi0924 / SwiftUI_Ad_Banner.swift
Created March 15, 2022 03:45 — forked from MichaelBarney/SwiftUI_Ad_Banner.swift
A google AdMob Banner implementation in SwiftUI
import SwiftUI
import GoogleMobileAds
import UIKit
final private class BannerVC: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
let view = GADBannerView(adSize: kGADAdSizeBanner)
let viewController = UIViewController()
@jiangdi0924
jiangdi0924 / feeds_unique.txt
Created December 29, 2021 02:41 — forked from eteubert/feeds_unique.txt
List of Podcast RSS Feeds, extracted via iTunes API
This file has been truncated, but you can view the full file.
<http://sailortalk.podOmatic.com/rss2.xml>
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml
Http://feeds.feedburner.com/fridgeandhbomb
Http://feeds.feedburner.com/wfodicks
Http://ravenc-taouf.podomatic.com/rss2.xml
Http://www.calvaryonline.org/podcasts/podcast.xml
Http://www.changkhui.com/XML/teemateepai.xml
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss
http://-myantioch.sermon.tv/rss/main
http://004.podOmatic.com/rss2.xml
//
// BottomSheetView.swift
//
// Created by Majid Jabrayilov
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
fileprivate enum Constants {
static let radius: CGFloat = 16
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);
@jiangdi0924
jiangdi0924 / gist:2f0f4a6e226bcd3d621e20c3212bf2ba
Created July 24, 2020 10:39
windows server 部署pm2时, 报错pm2 not found
## 最近在维护几个Windows server部署pm2遇到问题
###解决方案:
确认环境变量PATH里面是否包含: C:\Users\当前的用户名\AppData\Roaming\npm
### 如果包含npm环境变量还是not found怎么办?
粗暴的解决办法, 除了 “C:\Users\当前的用户名\AppData\Roaming\npm” 这条以外的环境变量全都删除。(对我来说这是有效的)
@jiangdi0924
jiangdi0924 / gist:0e4942a6aa5b2eae9ab7f703dc4a82c6
Last active July 15, 2020 01:39
Nodejs Error on Window, ERROR: Port 3000 is already in use

Solution

netstat -ano | findstr :3000 tskill "node port in list"

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',