Skip to content

Instantly share code, notes, and snippets.

View minlaxz's full-sized avatar
:octocat:
👻

Min Min Latt minlaxz

:octocat:
👻
View GitHub Profile
@minlaxz
minlaxz / expo-reactnative-gh-pages.md
Last active May 23, 2021 19:39
Developing React native app with `Expo` CLI.

Developing React native app with Expo CLI.

  • To get started, install expo -> npm install -g expo-cli
  • Login Expo with expo login
  • Generate a test app with expo init MyApp
  • Edit App.js file and start project with expo start This will start up Metro Server in your development machine.
  • To start and run on android expo start --android.

Deploying to GitHub Pages:

@minlaxz
minlaxz / minlaxz-tf-gpu-jupyter.md
Last active May 23, 2021 19:40
reCompiling TensorFlow

in your host --

cd ~ && mkdir tf && cd $_
curl -fsSL https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/dockerfiles/dockerfiles/devel-gpu-jupyter.Dockerfile -o ./Dockerfile
git clone tensorflow
curl -fsSL https://raw.githubusercontent.com/minlaxz/scripts/master/laxz.bashrc -o ./bash.bashrc
docker build -f ./Dockerfile -t yourRepo/repo:tag .

this Dockerfile will download a bunch of cuda11.0 and cudnn8 libs includes jupyter

@minlaxz
minlaxz / build-tensorflow-from-source.md
Created November 18, 2020 14:34 — forked from Brainiarc7/build-tensorflow-from-source.md
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@minlaxz
minlaxz / Find all .mp4 file from multiple dir.md
Last active August 19, 2021 07:54
Linux find given name in depth of N.
find . -maxdepth 2 -name "*.mp4" -exec cp {} . \;
@minlaxz
minlaxz / Openssl-Encrypt-RSA-AES.md
Last active May 23, 2021 09:45
RSA and AES encryption with OpenSSL

AES-ENCRYPTIONS

AES with PASSWORD:

ENCRYPTION AND DECRYPTION USING PASSWORD:

  • encrypt FILE using PASSWORD:

    • $ openssl aes-256-cbc -salt -pbkdf2 -in inkyung.zip -out inkyung.zip.aes
  • encrypt STRING using PASSWORD:

    • $ echo "a_string" | openssl enc -e -aes-256-cbc -a -salt -pbkdf2
@minlaxz
minlaxz / parallel-compressed-tars.md
Last active May 23, 2021 09:44
How to parallel compress tarballs.

Parallel Compressed Tarballs

Compressing a Dir

Pipe method =>

tar cvf - ./videos | pixz > oneFile.tpxz
  • c --create
  • v --verbose
@minlaxz
minlaxz / ovpn-pihole-docker.md
Last active March 14, 2021 16:14
OVPN-PiHole-Docker

SSH into AWS ec2/ Digitalocean droplet/ or else other PAAS, linux machine

  1. Install Docker
$ curl -sS get.docker.com | sh
$ sudo usermod -aG docker $USER
@minlaxz
minlaxz / dockerized-pihole-openvpn.md
Last active May 23, 2021 09:43
Dockerizing OpenVPN with PiHole.

__This setup is working correctly on Ubuntu20-Server __ Assumming All These Commands are ran by Root User

  1. Git Clone Kylemanna/docker-openvpn git clone https://github.com/kylemanna/docker-openvpn.git && cd docker-openvpn

  2. Build OpenVPN docker image docker build -t IMAGE_NAME .

  3. Generate Config for OpenVPN

@minlaxz
minlaxz / renew-gpgkey.md
Last active March 23, 2021 13:53 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@minlaxz
minlaxz / emulator-install-using-avdmanager.md
Created May 1, 2021 09:20 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"