This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<device> | |
<deviceProtocol>SIP</deviceProtocol> | |
<sshUserId>casio</sshUserId> | |
<sshPassword>casio</sshPassword> | |
<devicePool> | |
<dateTimeSetting> | |
<dateTemplate>D.M.Y</dateTemplate> | |
<timeZone>Central European Standard/Daylight Time</timeZone> | |
<olsonTimeZone>Europe/Berlin</olsonTimeZone> | |
<ntps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crypto from "node:crypto"; | |
/** | |
* Generates a compact key from a seed password | |
* @param {string} seed - The seed password used to generate the key | |
* @param {number} [length=16] - The desired length of the generated key | |
* @returns {string} A compact key derived from the seed | |
*/ | |
function generateCompactKey(seed, length = 16) { | |
// Use SHA-256 to generate a deterministic but unique key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { AudioLibrary } from './utils/Audios'; | |
function ExampleComponent() { | |
const handlePlaySiren = () => { | |
AudioLibrary.siren.play(); | |
}; | |
const handlePlayAlarm = () => { | |
AudioLibrary.alarm.play(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir transcoded; for i in *.mp4; do ffmpeg -i "$i" -vcodec mjpeg -q:v 2 -acodec pcm_s16be -q:a 0 -f mov "transcoded/${i%.*}.mov"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import useFormSubmit from './useFormSubmit'; | |
const FormComponent = () => { | |
const { formRef, handleSubmit } = useFormSubmit( | |
'http://localhost:3000', // Bazowy URL API | |
'submit', // 艢cie偶ka endpointu API | |
(data) => { console.log('Success:', data); }, | |
(error) => { console.error('Error:', error); } | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create your partition layout (using GPT) | |
# 1 - ESP (FAT32, 128M) | |
# 2 - Linux (luks, any size) | |
# Format your partitions | |
mkfs.fat -F32 /dev/sdx1 | |
cryptsetup luksFormat --key-size 512 --cipher aes-xts-plain64 /dev/sdx2 | |
# Open your luks partition | |
cryptsetup open /dev/sdx2 luks_root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pobierz obecn膮 dat臋 | |
const now = new Date(); | |
// Utw贸rz unikalny seed dla danego dnia | |
const seed = now.getFullYear() * 1000 + now.getMonth() * 100 + now.getDate(); | |
// Zainicjuj generator liczb pseudolosowych z seedem | |
const m = 0x80000000; | |
let a = 1103515245; | |
let c = 12345; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random from "random"; | |
import readline from "readline-sync"; | |
// Stw贸rz tablic臋 z dost臋pnymi s艂owami do wyboru | |
const words = ["s艂o艅ce", "deszcz", "drzewo", "samoch贸d", "komputer"]; | |
// Wybierz losowe s艂owo z tablicy | |
const targetWord = words[random.int(0, words.length - 1)]; | |
// Stw贸rz tablic臋 z gwiazdkami o d艂ugo艣ci s艂owa | |
const wordArray = new Array(targetWord.length).fill("*"); |
Here are the different signals that the Steam Controller will send for the different buttons, and what you need in your .emulationstation/es_input.cfg for EmulationStation to react to them.
Left D-PAD The left D-PAD will send "hat" signals when you just touch it, and "button" signals when you press hard enough to actually click. Use this for touch-sensitive up/down/left/right:
<input name="up" type="hat" id="0" value="1"/>
<input name="down" type="hat" id="0" value="4"/>
<input name="left" type="hat" id="0" value="8"/>
NewerOlder