Skip to content

Instantly share code, notes, and snippets.

Security Checklist (What can be done in CursorAI & software-level not infrastructure!)

Configuration Security

  • Detect secrets in code
  • Identify secrets committed to version control
  • Flag hardcoded credentials

Authentication & Authorization

  • Identify missing authentication checks
  • Detect improper authorization patterns
@passsy
passsy / advanced_overlay.dart
Last active October 21, 2024 03:57
A Flutter overlay implementation that allows alligning the overlay freely around the target (button)
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// Written by PHNTM GmbH
void main() {
runApp(const AdvancedOverlaySample());
}
@pabloko
pabloko / Edge WebView2 on D3D11.md
Last active April 1, 2025 09:14
Rendering offscreen Edge (WebView2) to D3D11 texture for overlays (C++/win32)

Using Edge WebView2 is really straightforward, but using the Composition controller is poorly documented and only discussed on few issues in the WebView2 repo.

The browser itself is rendered on a separate process using DirectComposition API wich does not directly interoperate with DirectX, but can be readed using GraphicsCaptureItem WinRT apis. This means that a capture session must be setup into the host visual root, and it will provide accelerated GPU texture capture of the browser (with transparency)

There are few extra steps to setup this pipeline under win32 apps, apart of usual WebView2 setup:

  1. A DispatcherQueueController need to be created in the hosting thread in order to be able to use the Visual interfaces
  2. Use CreateCoreWebView2CompositionController instead CreateCoreWebView2Controller or its WithConfig equivalent.
  3. Create a WinRT DirectComposition IContainerVisual and IVisual as in the example
  4. Create a WinRT Direct3D11CaptureFramePool and start the session using `GraphicsC
@Nidal-Bakir
Nidal-Bakir / notification_service.dart
Last active March 9, 2025 13:31
Flutter notification service
// MIT License
//
// Copyright (c) 2025 Nidal Bakir
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@venbrinoDev
venbrinoDev / README.md
Last active September 29, 2024 23:24
Implement Notification in flutter made easy by venbrinoDevs Team
  1. Make sure to initialize Firebase -
  2. Add dependency flutter pub add firebase_messaging
  3. Configure your app for ios/macos to receive notification (https://firebase.flutter.dev/docs/messaging/apple-integration/)

Usage

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
@BjornDCode
BjornDCode / gist:5cb836a6b23638d6d02f5cb6ed59a04a
Created February 3, 2020 11:58
Tailwind - Fixed sidebar, scrollable content
// Source: https://twitter.com/calebporzio/status/1151876736931549185
<div class="flex">
<aside class="h-screen sticky top-0">
// Fixed Sidebar
</aside>
<main>
// Content
</main>