Skip to content

Instantly share code, notes, and snippets.

View yzgyyang's full-sized avatar

Guangyuan Yang yzgyyang

View GitHub Profile
@yzgyyang
yzgyyang / destroy.sh
Created January 28, 2019 23:45
Docker stop and delete all
# Stop all running containers
docker stop $(docker ps -aq)
# Remove all containers
docker rm $(docker ps -aq)
# Remove all images
docker rmi $(docker images -q)
@yzgyyang
yzgyyang / streaming_server.sh
Last active July 16, 2020 21:19
How to start a streaming service on Vultr?
# Restream is another choice
# This guide is based on:
# https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/
sudo apt update
sudo apt upgrade -y
sudo apt install -y unzip build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev
wget http://nginx.org/download/nginx-1.15.1.tar.gz
sudo apt update
sudo apt upgrade -y
# ubuntu: tasksel
sudo apt install kali-desktop-xfce -y
sudo apt install xrdp -y
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
sudo service xrdp start
#!/bin/sh -e
DOC_TREE="/usr/home/guangyuan/fbrepo/freebsd-doc/zh_TW.UTF-8" #/zh_CN.UTF-8
echo "Doc tree defined as ${DOC_TREE}."
cd ${DOC_TREE}
FILES_CVT=$(ag --files-with-matches "Original [Rr]evision: r[0-9]*\s")
echo $(echo ${FILES_CVT} | wc -w) files

Understanding FreeBSD UMA from a Safety Prospective

Author: wzt @ kernsec https://mp.weixin.qq.com/s/20ACZFyQiUWZf5cIm_ZW-w
Translated by: ygy

Disclaimer: I translated this at 1 am in 15 minutes, hopefully it is still readable...

1.1 Introduction

FreeBSD's kernel object allocator is called UMA (Universal Memory Allocator). This article only discusses its security features, please refer to other articles for general functionality. Its security feature set is a lot smaller than that in XNU, NT and Linux, along with some security flaws from the design and architecture, as we will discuss below.

diff --git a/x11-toolkits/mauikit-filebrowsing/Makefile b/x11-toolkits/mauikit-filebrowsing/Makefile
new file mode 100644
index 000000000000..d4d11d39401c
--- /dev/null
+++ b/x11-toolkits/mauikit-filebrowsing/Makefile
@@ -0,0 +1,31 @@
+# Created by: Guangyuan Yang <[email protected]>
+
+PORTNAME= filebrowsing
+DISTVERSIONPREFIX= v