Skip to content

Instantly share code, notes, and snippets.

View tienthanh2509's full-sized avatar

Phạm Tiến Thành tienthanh2509

View GitHub Profile
@mwaskom
mwaskom / replacing_seaborn_distplot.ipynb
Last active June 23, 2024 09:03
A guide to replacing the deprecated `seaborn.distplot` function.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iffa
iffa / ax201-hostapd.conf
Created June 1, 2021 10:29
hostapd config for Intel WiFi6 AX201 (5Ghz)
# Config for Intel WiFi6 AX201
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
ssid=AwesomeWifi
@aw
aw / explain.md
Last active April 28, 2024 10:05
[SOLVED] Proxmox VE and cloud-init snippets etc

Proxmox VE 6.x release includes a feature to add custom cloud-init configs. Unfortunately there is poor documentation, so I had to figure this out by adding pieces of information together.

The custom cloud-init files (user-data, meta-data, network-config)

The cloud-init files need to be stored in a snippet. This is not very well documented:

  1. Go to Storage View -> Storage -> Add -> Directory
  2. Give it an ID such as snippets, and specify any path on your host such as /snippets
  3. Under Content choose Snippets and de-select Disk image (optional)
  4. Upload (scp/rsync/whatever) your user-data, meta-data, network-config files to your proxmox server in /snippets/snippets/ (the directory should be there if you followed steps 1-3)
@extremecoders-re
extremecoders-re / vmware-no-vmem.md
Last active April 6, 2024 08:09
Boost VMWare Performance by disabling vmem files.

Prevent creation of vmmem files in VMware (Windows)

Issue

VMWare creates .vmem files to back the guest RAM. On the host this causes disk thrashing especially during powering on and off the guest.

Solution

Add the following lines to the .vmx file to prevent creation of .vmem files. This will reduce disk IO and VM performance will improve especially on non-SSD disks.

@ppoffice
ppoffice / 01_Android_LXC_Note.md
Last active June 6, 2024 03:01
LXC for Android 9.0.0 r18 Goldfish

Steps to build Android kernel and system for LXC:

  1. Download Android SDK, NDK, system and kernel source code;
  2. Download modified lxc and libcap source code (ppoffiec/lxc-android, ppoffice/libcap-android)
  3. Build Android system from source first so that we can link to its shared library when we build lxc (or maybe we don't have to);
  4. Modify Android kernel config and make sure lxc-checkconfig does not report any missing features. Then build kernel;
  5. Modify Android system/core/rootdir/init.rc according to init.rc.diff. Make sure you mount all the cgroup subsystems needed (cpu, cpuacct, cpuset, memory, pids, devices, freezer, blkio) under /sys/fs/cgruop, otherwise lxc won't find them;
  6. Rebuilt the Android system image so that the modified init.rc is in the image;
  7. Fire up the emulator with custom kernel (emulator -kernel kernel-file-path) and use adb shell and dmesg to check if everything is doing ok.
@ugurerkan
ugurerkan / zimbra-letsencrypt-renew.md
Last active September 9, 2023 13:19
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.
@dknr
dknr / rndis_config.txt
Created October 27, 2016 19:32
android rndis config
svc usb setFunction rndis
ip addr add 192.168.137.2/24 dev rndis0
ip link set dev rndis0 up
ip route add default via 192.168.137.1 dev rndis0
ndc resolver setnetdns rndis0 local 8.8.8.8 8.8.4.4
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active May 25, 2024 06:37
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@int128
int128 / README.md
Last active January 17, 2024 07:55
Transparent proxy for Docker containers

Transparent proxy for Docker containers

If the Docker host is placed inside a proxy server, it needs to add the proxy configuration to each Dockerfile such as ENV http_proxy.

Following allows transparent access from the container to outside without any proxy configuration.

  1. Set up the transparent proxy
  2. Apply iptables rule for the transparent proxy