Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / takeshiba_webmeeting.rst
Last active February 15, 2024 13:00
WebRTC SFU Sora の紹介と WebRTC と WebTransport の現状について
@voluntas
voluntas / webrtc_now.rst
Last active May 6, 2022 06:29
WebRTC の今
@smoser
smoser / .gitignore
Last active April 1, 2024 07:38
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@linw1995
linw1995 / tasks.json
Created August 4, 2017 05:45
VSCode Task.json for Python Traceback.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [{
"taskName": "Run Python",
"group": {
"kind": "build",
"isDefault": true
},
@DavidGriffith
DavidGriffith / bootable-flash.txt
Created March 17, 2017 04:21
Debian installer on a USB key with a writable file system.
Debian installer on a USB key with a writable file system.
I couldn't find a concise article about creating a Debian installer USB
key with a writable file system, so here is my take. This assumes you
have an available Linux system. Note that some old BIOSes might not
happily boot USB drives created in this way.
* Install the packages syslinux dosfstools mbr
* Insert the thumb drive and find the device using dmesg
* Install a Master Boot Record to the drive (install-mbr /dev/sdX)
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 3, 2025 08:56
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active May 11, 2025 03:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@maartenbreddels
maartenbreddels / qt_and_tornado.py
Created October 1, 2015 10:57
Combining Qt and tornado, both which want to have their own event loop.
__author__ = 'breddels'
"""
Demonstrates combining Qt and tornado, both which want to have their own event loop.
The solution is to run tornado in a thread, the issue is that callbacks will then also be executed in this thread, and Qt doesn't like that.
To fix this, I show how to use execute the callback in the main thread, using a Qt signal/event in combination with Promises.
The output of the program is:
fetch page, we are in thread <_MainThread(MainThread, started 47200787479520)>
response is 191548 bytes, we are in thread <Thread(Thread-1, started daemon 47201018689280)>
the other thread should fulfil the result to this promise, we are in thread <Thread(Thread-1, started daemon 47201018689280)>
@voluntas
voluntas / webrtc.rst
Last active March 28, 2025 06:01
WebRTC コトハジメ
anonymous
anonymous / test.lua
Created April 12, 2015 16:08
require 'nn'
input = torch.DoubleTensor{4} --input word index
target = torch.DoubleTensor{6,5,4,2} --target word indices. So we have 1 true context ("6") and 3 negative contexts ("5,4,2")
label = torch.DoubleTensor({1,0,0,0}) --the first label is true sample, rest are neg samples
model1 = nn.Sequential()
model1:add(nn.LookupTable(1000,4)) -- word embedding layer, vocab size is 1000 and each word is 50 dimensional
model2 = nn.Sequential()
model2:add(nn.LookupTable(1000,4)) -- context embedding layer, this will be dot producted with an element of the word embedding layer