Skip to content

Instantly share code, notes, and snippets.

@beci
beci / sudo_without_password
Last active October 7, 2015 12:00 — forked from etissieres/sudo_without_password
Sudo without password
my_name ALL = (ALL) NOPASSWD: ALL
@beci
beci / VMWare Tools Client linux
Last active April 4, 2021 23:38
Install vmware client linux
sudo apt-get update
sudo apt-get upgrade
sudo mkdir -p /media/cdrom
sudo mount /dev/cdrom /media/cdrom
cd /media/cdrom
sudo cp VM*.tar.gz /tmp
sudo apt-get install linux-headers-server build-essential
//(for desktop is "sudo apt-get install linux-headers-$(uname -r) build-essential")
cd /tmp
@beci
beci / gcc 5 on ubuntu 14.04
Created October 15, 2015 07:18
use gcc 5.x on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
dnf install @development-tools
dnf install rpm-build
#where installed:
python -c 'import os; import inspect; import tensorflow; print(os.path.dirname(inspect.getfile(tensorflow)))'
#test:
python -m tensorflow.models.image.mnist.convolutional
@beci
beci / ubuntu_after_install.sh
Created April 20, 2016 12:51
The after insall steps on ubuntu
# Disable screen lock
gsettings set org.gnome.desktop.screensaver lock-enabled false
Problem:
linux (ubuntu) nvidia driver not able to detect dell 30" screen, and use it in 2560x1600.
Solution:
to tell Xorg to ignore EDID checksum on particular output. Added this to my "device" section:
Option "IgnoreEDIDChecksum" "DFP-0"
@beci
beci / installall.txt
Created June 1, 2017 19:42
tensorflow in aws
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install tmux htop p7zip-full build-essential gcc g++ make binutils
sudo apt-get --assume-yes install software-properties-common
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb
wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb
@beci
beci / gist:44984070d1dad2b4ba683d6085cf9b48
Created September 19, 2017 14:57
python scripts in windows
assoc .py=py_auto_file
ftype py_auto_file="C:\path_to_python\python.exe" "%1" %*
@beci
beci / mka2flac
Last active May 29, 2018 20:32
Fish commands to extract track (flac files) from multiple mka file
# List all tracks from all mka files in Downloads
for fname in (find ~/Downloads -type f -name '*.mka'); mkvmerge -i $fname| grep 'Track ID'; end
# Extract second (number 1) track from all mka files in Downloads
for fname in (find ~/Downloads -type f -name '*.mka'); mkvextract $fname tracks 1:(basename (dirname $fname)).flac; end
gci -inc bin,obj -rec | rm -rec -force
# without alias: Get-ChildItem -inc bin,obj -rec | Remove-Item -rec -force