Skip to content

Instantly share code, notes, and snippets.

View ancabilloni's full-sized avatar

An Nguyen ancabilloni

View GitHub Profile
Lookup text within files in directory:
grep -Rw /path/to/directory/ -e 'text'
Check ssh status:
sudo systemctl status sshd.service
Find a directory:
find /place/to/find -type d -name Find_me
Ways to copy vector in C++:
# Instruction reference: https://www.tensorflow.org/install/gpu
# Add NVIDIA package repositories
# Add HTTPS support for apt-key
sudo apt-get install gnupg-curl
cd ~/Downloads
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_10.1.243-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo dpkg -i cuda-repo-ubuntu1604_10.1.243-1_amd64.deb
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
# Instruction reference: https://www.tensorflow.org/install/gpu
# Add NVIDIA package repositories
cd ~/Downloads
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo dpkg -i cuda-repo-ubuntu1804_10.1.243-1_amd64.deb
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update
# Create new github repo, not initiate Readme.md if one already exists
# Open terminal and access to working directory
git init
git add .
git commit -m "first commit"
git remote add origin -repo URL-
# If return error "fatal: remote origin already exists"
git remote rm origin > git remote add origin -repo URL-
git push -u origin master
@ancabilloni
ancabilloni / gist:33cd9f3875edafc50e9c9b64bec5ce54
Created May 21, 2017 22:16
PID uWebSockets & Dependencies Installation
sudo apt-get install openssl
sudo apt-get install zlibc
sudo apt-get install libuv1-dev
git clone https://github.com/uWebSockets/uWebSockets
cd uWebSockets
git checkout e94b6e1
mkdir build
cd build
cmake ..
make