This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum MachineState { | |
Normal, | |
Comment, | |
Upper, | |
Lower, | |
} | |
fn machine_cycle(state: &MachineState, character: char) -> (Option<char>, MachineState) { | |
use std::ascii::AsciiExt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to sign your custom RPM package with GPG key | |
# Step: 1 | |
# Generate gpg key pair (public key and private key) | |
# | |
# You will be prompted with a series of questions about encryption. | |
# Simply select the default values presented. You will also be asked | |
# to create a Real Name, Email Address and Comment (comment optional). | |
# | |
# If you get the following response: |
-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export VERSION=26.2 | |
yum install gcc make ncurses-devel giflib-devel libjpeg-devel libtiff-devel gnutls-devel | |
curl -O http://ftp.gnu.org/gnu/emacs/emacs-$VERSION.tar.xz > emacs.tar.xz | |
tar xJf emacs.tar.xz | |
cd emacs-$VERSION | |
./configure --without-x --without-selinux | |
make && sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for line in yourString:gmatch("([^\n]*)\n?") do | |
-- do something | |
end |
ERR_NVGPUCTRPERM: Permission issue with Performance Counters
NVIDIA has a page that addresses the issue. Unfortunately, the instructions didn't solve the problem for me. However, I found a solution from rameshgunjal in the NVIDIA forums.
You might have noticed that sudo nv-nsight-cu
results in an error. Instead, you have to provide the path: sudo /usr/local/cuda/bin/nv-nsight-cu
. The same applies for other applications as well: sudo /usr/local/cuda/bin/nsight-sys
.