Skip to content

Instantly share code, notes, and snippets.

@Haerezis
Haerezis / VModelProxy.vue
Last active July 4, 2023 09:00
VModelProxy.vue (vuejs 3)
<template>
<label>
VModelProxy
<input type="text" v-model="localValue">
</label>
</template>
<script setup>
import { ref, computed, watch } from 'vue'
const props = defineProps({
@Haerezis
Haerezis / VModelProxy.vue
Created June 21, 2023 14:35
Custom Input or v-model proxy component
<template>
<label>
VModelProxy
<input type="text" v-model="localValue">
</label>
</template>
<script setup>
import { ref, computed, watch } from 'vue'
@Haerezis
Haerezis / _service.md
Created November 24, 2021 18:35 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
<iq xmlns="jabber:client" to="tes@conference.jitmeet.example.com/7d6f8a3e" type="set" id="1:sendIQ">
<jingle xmlns="urn:xmpp:jingle:1" action="session-accept" initiator="tes@conference.jitmeet.example.com/7d6f8a3e" responder="ead7fe02-211f-4f58-9ca1-d4c90757deaa@jitmeet.example.com/4b87562e-3ae8-4d43-b425-dbe609d3eebe" sid="udynjyxxecjw">
<content creator="responder" name="audio" senders="both">
<description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio" ssrc="1360099725">
<payload-type id="111" name="opus" clockrate="48000" channels="2" />
<payload-type id="103" name="ISAC" clockrate="16000" channels="1" />
<payload-type id="104" name="ISAC" clockrate="32000" channels="1" />
</description>
<transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" ufrag="I+CEopgcl0Q+Y6Uf" pwd="ucRGPzurNFM0gi4jDi2dSNtg">
<fingerprint xmlns="urn:xmpp:tmp:jingle:apps:dtls:0" hash="sha-256" setup="active">50:E0:CD:58:5F:74:5D:DC:65:1A:2C:49:FA:46:47:8D:A0:C6:83:C4:05:AF:A2:9
<iq xmlns="jabber:client" to="tes@conference.jitmeet.example.com/ead7fe02" type="set" id="3:sendIQ">
<jingle xmlns="urn:xmpp:jingle:1" action="session-initiate" initiator="7d6f8a3e-1195-4346-974f-775679f577e3@jitmeet.example.com/e02e6d6b-e0cb-4ae3-85a8-7b56fe18d851" sid="udynjyxxecjw">
<content creator="initiator" name="audio" senders="both">
<description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio" ssrc="1836446403">
<payload-type id="111" name="opus" clockrate="48000" channels="2">
<parameter name="minptime" value="10" />
</payload-type>
<payload-type id="103" name="ISAC" clockrate="16000" channels="1" />
<payload-type id="104" name="ISAC" clockrate="32000" channels="1" />
</description>
@Haerezis
Haerezis / libjitsi_bundle_streams.java
Last active September 13, 2016 16:52
An example to show how to bundle RTP streams with ice4j and libjitsi
LibJitsi.start();
MediaService mediaService = LibJitsi.getMediaService();
//I assume that I have a working video and audio MediaDevice
MediaDevice randomVideoDevice = createVideoDevice();
MediaDevice randomAudioDevice = createAudioDevice();
//I create the MediaFormat for each stream
MediaFormat videoFormat
@Haerezis
Haerezis / rtpdump_file_format
Created June 26, 2014 12:08
rtpdump file format backup
rtpdump format :
dump in binary format, suitable for rtpplay. The format is as follows: The file starts with
#!rtpplay1.0 address/port\n
The version number indicates the file format version, not the version of RTP tools used to generate the file. The current file format version is 1.0.
This is followed by one binary header (RD_hdr_t) and one RD_packet_t structure for each received packet. All fields are in network byte order. The RTP and RTCP packets are recorded as-is.
typedef struct {
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)