Skip to content

Instantly share code, notes, and snippets.

View amfern's full-sized avatar
❄️

Ilya guterman amfern

❄️
  • WovenPlanet
  • Tokyo
View GitHub Profile
sudo nix profile install github:NixOS/nixpkgs#gnome.gnome-shell --show-trace --no-write-lock-file
installing new nix package, under a package
sudo nix profile install github:NixOS/nixpkgs#gnome.gnome-shell --show-trace --no-write-lock-file
nix profile install git+ssh://git@github.com/nix-community/fenix#latest.cargo
@amfern
amfern / gist:a14bed246250166063b21ec3989da741
Created December 26, 2022 06:19
Install mdatp endpoint security on Ubuntu 22.04
https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/linux-install-manually?view=o365-worldwide#ubuntu-and-debian-systems
wget https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/m/mde-netfilter/mde-netfilter_100.69.45.amd64.deb
apt install ./mde-netfilter_100.69.45.amd64.deb
apt install mdatp
apt-get install gpg curl apt-transport-https curl
curl -o microsoft.list https://packages.microsoft.com/config/ubuntu/22.04/prod.list
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt install gcc-10 g++-10 libgccjit0 libgccjit-11-dev libjansson4 libjansson-dev libmagickwand-dev
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
export CC=/usr/bin/gcc-10 CXX=/usr/bin/gcc-10
git clone git@github.com:emacs-mirror/emacs.git && cd emacs
./autogen.sh
./configure --prefix=/usr/local --with-gameuser=:games --with-sound=alsa --with-modules --without-libotf --without-m17n-flt --without-gconf --without-gsettings --with-native-compilation --with-xinput2 --with-pgtk --without-xaw3d --with-sound=no --without-gpm --without-compress-install --program-transform-name=s/\([ec]tags\)/\1.emacs/
make -j$(nproc)
sudo make install
source from host:
docker run --rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 -p 1935:1935 aler9/rtsp-simple-server
ffmpeg -re -stream_loop -1 -i Downloads/jellyfish-110-mbps-hd-h264.mkv -c copy -f rtsp rtsp://localhost:8554/mystream
receive from rpi4
gst-launch-1.0 rtspsrc location=rtsp://192.168.18.87:8554/mystream ! rtph264depay ! h264parse ! v4l2h264dec capture-io-mode=4 ! kmssink sync=false
@amfern
amfern / rpi4 camera module 2.1 stream
Last active July 5, 2021 13:12
rpi4 camera module 2.1 stream ubuntu 20.04
cat /boot/firmware/config.txt
```
[pi4]
max_framebuffers=2
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel
@amfern
amfern / .spacemacs
Created January 2, 2020 16:37
spacemacs config
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@amfern
amfern / ratbag_g502_no_rgb
Last active August 16, 2017 20:46
sudo ./ratbag-command --verbose=raw button 5 action set button 6 /dev/input/event2
ratbag debug: Logitech Gaming Mouse G502 is device '/dev/hidraw0'.
ratbag debug: Logitech Gaming Mouse G502 is device '/dev/hidraw1'.
ratbag debug: report ID 01
ratbag debug: report ID 03
ratbag debug: report ID 04
ratbag debug: report ID 10
ratbag debug: report ID 11
ratbag raw: hidpp write: 11 ff 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ratbag raw: hidpp read: 11 ff 00 18 04 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ratbag raw: hidpp write: 11 ff 00 08 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CFLAGS := -Wall
LOCAL_CPPFLAGS := -Wno-write-strings -Wall -std=c++11 -fexceptions -frtti
LOCAL_SRC_FILES := \
test.cpp