Skip to content

Instantly share code, notes, and snippets.

View rikka0w0's full-sized avatar

Rikka0_0小六花 rikka0w0

  • UNSW
  • Sydney
View GitHub Profile
@rikka0w0
rikka0w0 / multiplenetwork.md
Last active June 24, 2018 14:48
ss-server with multiple network interface (is there a way to set the outgoing of a ss-server)

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

shadowsocks-libev 3.1.3

What operating system are you using?

@rikka0w0
rikka0w0 / vsftpd_setup_anonymous_upload_download.md
Last active April 2, 2024 19:17
[vsftpd]Setup anonymous upload and download FTP server

Install vsftpd

# Install
sudo apt update
sudo apt install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig

# Firwall rules
sudo ufw allow ftp-data
sudo ufw allow ftp
@rikka0w0
rikka0w0 / VirtualBox_Linux_Headless_Run_Windows10.md
Last active February 7, 2024 10:52
[VirtualBox] Run Windows10 Headlessly on Linux

https://redplus.me/post/set-up-headless-windows-10-virtual-machine-on-remote-linux-server/ https://www.ostechnix.com/install-oracle-virtualbox-ubuntu-16-04-headless-server/ https://www.howtoforge.com/tutorial/running-virtual-machines-with-virtualbox-5.1-on-a-headless-ubuntu-16.04-lts-server/

Installation

$ sudo nano /etc/apt/sources.list
      deb http://download.virtualbox.org/virtualbox/debian stretch contrib
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ sudo apt-get update
@rikka0w0
rikka0w0 / unfs.md
Last active September 16, 2018 16:46
Usermode NFS Server

unfsd

Server: unfsd -t -n2050 -m2050
Debian:\

apt install nfs-common rpcbind
systemctl start rpcbind

/etc/exports\

@rikka0w0
rikka0w0 / wsl_sshd.md
Created December 7, 2018 06:32
Setup SSH server (SSHD) on WSL

Setup a RSA key only root login SSHD server on WSL

  1. sudo apt-get purge openssh-server
  2. sudo apt-get install openssh-server
  3. sudo nano /etc/ssh/sshd_config PermitRootLogin yes UsePrivilegeSeparation no Port RSAAuthentication yes PubkeyAuthentication yes
@rikka0w0
rikka0w0 / libmicrohttpd_compile.md
Created January 17, 2019 17:29
Compile Libmicrohttpd examples in Linux
apt install libmicrohttpd-dev
pkg-config --list-all | grep libmicrohttpd
gcc hellobrowser.c -o hellobrowser `pkg-config --cflags --libs libmicrohttpd`
@rikka0w0
rikka0w0 / ft2232_to_digilent_jtag.md
Last active April 23, 2024 14:05
FT2232 to Digilent JTag for Xilinx FPGAs (ISE/Vivado)

The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.

DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.

Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado

  1. Install softwares: sudo apt-get install libftdi1 ftdi-eeprom
  2. Create a file "flash_digilent.conf" with the following content:
@rikka0w0
rikka0w0 / Dockerfile.ubuntu_wine.md
Created February 9, 2019 12:20
Dockerfile-Ubuntu+Wine

For those who need to run a Windows-only game server on a linux server with docker. Build with sudo docker build --rm -t ubuntu_wine:latest .. Run it with sudo docker run -ti ubuntu_wine.

Util scripts are in the root's home folder. setvnc.sh is for setting up a VNC server (runs forever) and XVFB environment, this works on servers without a graphic card. explorer_wine.sh launches a file explorer on that deskop. This Dockerfile installs nano wget xfce4-terminal by default, if you don't need the graphical terminal emulator or the utilities, you can remove them.

@rikka0w0
rikka0w0 / KernelModule_Armbian_4.19.20.md
Last active January 18, 2024 00:16
Build kernel module for Armbian with 4.19.20 kernel
  1. Get the kernel headers from https://apt.armbian.com/pool/main/l/linux-4.19.20-sunxi/
  2. Download and unzip the linux-headers-next-sunxi_5.75_armhf.deb file and then unzip the data.tar.xz
  3. Extract /./usr/src/linux-headers-4.19.20-sunxi to any location
  4. Goto that folder, execute ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make scripts. Athough it throws tons of error, it should be able to build the necessary scripts.
  5. Makefile:
export ARCH:=arm
export CROSS_COMPILE:=arm-linux-gnueabihf-
@rikka0w0
rikka0w0 / STM32_GCC_Conflicting_CPU_Architectures.md
Created April 30, 2019 06:52
STM32 GCC Conflicting CPU architectures

Error Message: arm-none-eabi/lib/crt0.o: Conflicting CPU architectures

Due to a bug in Ubuntu Bionic, libnewlib-arm-none-eabi 2.4.0.20160527-4 is a broken version

  1. Download latest package from: https://packages.ubuntu.com/cosmic/all/libnewlib-dev/download and https://packages.ubuntu.com/cosmic/all/libnewlib-arm-none-eabi/download
  2. Install them with sudo dpkg -i libnewlib-*.deb

Ref: https://github.com/bbcmicrobit/micropython/issues/514