Skip to content

Instantly share code, notes, and snippets.

View dsseng's full-sized avatar

Dmitry Sharshakov dsseng

  • Austria
  • 06:01 (UTC +02:00)
View GitHub Profile
@javierarques
javierarques / jsdom-helper.js
Last active January 12, 2022 00:51
Simulate window resize event in jsdom
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const dom = new JSDOM('<!DOCTYPE html><html><head></head><body></body></html>');
global.window = dom.window;
global.document = dom.window.document;
// Simulate window resize event
const resizeEvent = document.createEvent('Event');
@njh
njh / aes67_wishlist.md
Last active January 22, 2025 16:11
AES67 Open Source Software Wishlist

AES67 (an open standard for high quality audio over IP) is becoming mainstream in the world of broadcast and professional audio industries, however there is a very limited amount of open source software available to interoperate with it. As a result we are often just replacing XLRs with Ethernet, without taking advantage of the possibilites the software give. While Virtual Soundcards enable some of this, native network implementations would allow greater flexibility.

This is my wishlist of things that would help change that. Hopefully one day it can be turned into a AES67 Awesome List.

As open source has resulted in very rapid evolution of the web, I believe the same is possible for professional/broadcast audio.

It is possible that some of this already exists and I just havn't found it yet. Please add a comment below if you know of something!

@bloc97
bloc97 / TwoMethods.md
Last active March 2, 2025 10:14
Two Fast Methods of Generating True Random Numbers on the Arduino

Two Fast Methods of Generating True Random Numbers on the Arduino

Arduino true random number generator

B. Peng

December 2017

Abstract

The AVR series microcontrollers are a collection of cheap and versatile chips that are used in many applications ranging from hobbist projects to commercial infrastructure. One major problem for some hobbists is the lack of secure random number generation on the Arduino platform. The included pseudo-random number generator (PRNG) is very easy to defeat and is useless for any crypto-related uses. One recommendation from the Arduino Reference Manual is to use atmospheric noise from the chip's analog sensor pins as seed data[6].
Unfortunately this method is extremely weak and should not be used to emulate a true random number generator (TRNG). Existing methods such as using the internal timer drift or using a dedicated generator are either too slow, requires extensive external hardware or modifications to the microcontroller's internal mech

@johnleider
johnleider / bash
Last active November 19, 2018 18:52
Docs next
# Fork vuetify https://github.com/vuetifyjs/vuetify
git clone your-fork
cd vuetify
git checkout feat/docs-next
yarn
yarn build
lerna run dev --scope vuetifyjs.com --stream
@MajesticPotatoe
MajesticPotatoe / SCSS_Structuring
Last active January 3, 2019 05:37
SCSS_Structuring
Legend
> Folder
- file
* note
Folder Structures
> scss
> base
* resets, global defaults
> components
@edrex
edrex / README.md
Last active February 6, 2025 09:19
Streaming screen capture under Wayland

Recipes

kmsgrab capture with ffmpeg

sudo LIBVA_DRIVER_NAME=iHD ffmpeg -crtc_id 69  -framerate 60 -f kmsgrab -i - -vaapi_device /dev/dri/renderD128 -filter:v hwmap,scale_vaapi=w=1920:h=1200:format=nv12 -c:v h264_vaapi -profile:v constrained_baseline -level:v 3.1 -b:v 20000k test.mp4

LIBVA_DRIVER_NAME=iHD ffmpeg -device /dev/dri/card0 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi -vstats output.mp4

@sebastianrothbucher
sebastianrothbucher / README.md
Created March 16, 2019 16:27
Vuejs guide as ebook (epub / Kindle)

This is how you can conver the vuejs guide to a .ePub / Kindle (.mobi) file to read in an eReader (or eReader app):

echo '' > toc
for i in *.md
do 
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@ikester
ikester / uvc-gadget-configfs.sh
Last active June 12, 2023 18:30
Linux USB UVC gadget driver setup script.
#!/bin/bash
# set -e
cd /sys/kernel/config/usb_gadget/
mkdir -p g1
cd g1
echo 0x1d6b > idVendor # Linux Foundation