Skip to content

Instantly share code, notes, and snippets.

View Far-Se's full-sized avatar
🦝

Far Se Far-Se

🦝
  • Iasi
View GitHub Profile
@PlugFox
PlugFox / main.dart
Created June 8, 2022 08:14
Creating new isolate in dart and communicate with it
/// Creating new isolate and communicate with it
import 'dart:convert';
import 'dart:isolate';
import 'package:stream_transform/stream_transform.dart';
void main() => Future<void>(() async {
final receivePort = ReceivePort();
final stream = receivePort.asBroadcastStream();
@PlugFox
PlugFox / keyboard_observer.dart
Last active January 15, 2023 16:32
Dart Virtual Key Codes table and KeyboardObserver for win32 package, hotkey
import 'dart:async';
import 'dart:ffi' show Uint8, Uint8Pointer;
import 'package:ffi/ffi.dart' show calloc; // , malloc
import 'package:win32/win32.dart'
show GetKeyboardState, GetKeyState; // , GetAsyncKeyState;
import 'virtual_key_codes.dart';
/// Key - Virtual Key codes
@bob-ross27
bob-ross27 / Toggle-Webcam.ps1
Created January 16, 2021 04:14
Toggle the Windows device status for the provided webcam.
<#
.SYNOPSIS
Enable or Disable a webcam.
.DESCRIPTION
Toggle the Status of a Webcam by disabling the PnPDevice. Useful for completely disabling an unneeded device
without physically disconnecting it.
Can also be used to output the current status of the provided webcam.
Webcam name is sourced from the -WebcamName parameter, trying the WEBCAM_NAME env var if no parameter used.