| Run model | Language servers run | Extensions run | Extension tech | Everything in container? | Other security-relevant notes |
|---|---|---|---|---|---|
| Plain Zed on host | Host (native binary, spawned with user privileges) | Host (in WASM sandbox via wasmtime); spawning of LSP/native binaries prompts user | WASM (Component Model + WIT), Rust-compiled | No — GUI + LSPs touch host filesystem and creds | Curated extension registry; smaller ecosystem (less to vet); pure Rust core (no V8/Node); GPL-licensed; auto-update behavior depends on settings |
| Plain Lapce on host | Host (native binary) | Host (in WASM sandbox via wasmtime, WASI Preview 1) | WASI WASM (Rust, C, AssemblyScript) | No | Smallest plugin ecosystem (least attack surface, but also least battle-testing); small team / slow security response; pre-1.0; Apache 2.0; no formal marketplace moderation |
| Plain VSCode on host | Host (separa |
This file contains hidden or 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
| use std::path::Path; | |
| use core::marker::PhantomData; | |
| use core::borrow::Borrow; | |
| use chrono::{DateTime, Utc, Days}; | |
| use rusqlite::{named_params, Connection, Statement}; | |
| use serde::{Serialize, Deserialize}; | |
| use thiserror::Error; | |
| pub type Result<T, E = Error> = core::result::Result<T, E>; |
This file contains hidden or 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
| #include <srtp2/auth.h> | |
| #include <srtp2/cipher.h> | |
| #include <srtp2/crypto_types.h> | |
| #include <srtp2/srtp.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| char SKEL_RTP_PACKET[17] = {0x80, 0x60, 0x69, 0x8f, 0xd9, 0xc2, 0x93, 0xda, 0x1c, 0x64, 0x27, 0x82, 0x98, 0x36, 0xbe, 0x88, 0x9e}; |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
This file contains hidden or 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
| #!/bin/bash | |
| NET_INT="eth0" | |
| CURL_TIMEOUT=3 | |
| echo -n "Setting floating IP as the default gateway: " | |
| # Check there's a floating IP attached to this droplet | |
| if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then | |
| echo "Error: this droplet doesn't have a floating IP assigned to it." |
This file contains hidden or 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
| # http://duckdns.org | |
| # https://github.com/RSATom/janus-gateway-snap | |
| snap install janus-gateway | |
| systemctl status snap.janus-gateway.janus-gateway.service | |
| sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https | |
| curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg | |
| curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list | |
| sudo apt update |
This file contains hidden or 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
| #include <mach/port.h> /* mach_port_t */ | |
| #include <mach/mach.h> /* mach_port_allocate(), mach_task_self(), mach_port_insert_member(), MACH_PORT_RIGHT_PORT_SET */ | |
| #include <sys/event.h> /* kqueue(), kevent64(), struct kevent64_s, EVFILT_MACHPORT, EV_SET64, EV_ADD */ | |
| #include <sys/time.h> /* struct timespec */ | |
| //#include <dispatch/private.h> | |
| extern mach_port_t _dispatch_get_main_queue_port_4CF(void); | |
| extern void _dispatch_main_queue_callback_4CF(void); | |
| #include <stdio.h> |
A very simple example of using a map of channels for pub/sub in go.
To run it go here http://play.golang.org/p/eXwppMgHR3
This file contains hidden or 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
| docker kill (docker ps -q) | |
| docker rm (docker ps -a -q) | |
| docker rmi (docker images -q) | |
| # three commands above do | |
| # stop all containers: | |
| # remove all containers | |
| # remove all docker images |
NewerOlder