View colors.sh
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
#!/bin/bash | |
# origin: https://unix.stackexchange.com/questions/269077/tput-setaf-color-table-how-to-determine-color-codes | |
color(){ | |
for c; do | |
printf '\e[48;5;%dm%03d ' $c $c # adding one more space in the end to seperate the numbers | |
done | |
printf '\e[0m \n' | |
} |
View nvhpc-link-libs.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
-lacchost -laccdevaux -laccdevice -ldl -lcudadevice -lnvomp -ldl --as-needed -lnvhpcatm -latomic --no-as-needed -lpthread --start-group -lnvcpumath -lnvc --end-group -lm -lgcc -lc -lgcc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o /usr/lib/x86_64-linux-gnu/crtn.o |
View sample.cc
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
typedef struct Outer { | |
int *data, w, h; | |
#pragma acc policy<dpmove> copy(data[:w]) | |
// Outer(int *data = nullptr, int w = 0, int h = 0): data(data) {} | |
} Outer; | |
Outer init_outer(int *data, int w, int h) { | |
Outer r = {data, w, h}; | |
return r; | |
} |
View .tmux.conf
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
# enable colors in tmux | |
set -g default-terminal "xterm-256color" | |
# changing prefix from 'Ctrl+b' to 'Ctrl+b' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# enable mouse scrolling | |
set -g mouse on |
View .rustfmt.toml
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
brace_style = "PreferSameLine" |
View cleanup.sh
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
echo -n $PATH | awk 'NF && !seen[$0]++ {printf "%s:", $0}' RS=':' |
View TUTORIAL.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
# Moving short-cuts | |
C-v next page | |
M-v previous page | |
C-l make cursor middle | |
Number means how many lines above this line | |
C-n next line | |
C-p previous line | |
C-f one character forward | |
C-b one character backward |
View .bashrc
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
View cmake-test-vendor.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
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | |
# using GCC | |
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | |
# using Clang | |
#elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") | |
# using Intel C++ | |
#elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") | |
# using Visual Studio C++ | |
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") | |
# using PGI |
View custom_lib_setting.sh
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
# Custom lib home | |
export LIB_HOME=/home/lisanhu/mine/lib; | |
# Normal lib config | |
export PATH=$LIB_HOME/bin:$PATH; | |
export CPATH=$LIB_HOME/include:$CPATH; | |
export MANPATH=$MANPATH:$LIB_HOME/share/man; | |
export LIBRARY_PATH=$LIB_HOME/lib:$LIBRARY_PATH; # for static libraries | |
export LD_LIBRARY_PATH=$LIB_HOME/lib:$LD_LIBRARY_PATH; # for dynamic libraries |
NewerOlder