mirror of
https://github.com/ksyasuda/rice.git
synced 2024-11-22 03:19:58 -08:00
updates
This commit is contained in:
parent
1403358380
commit
dfea492d15
@ -21,12 +21,13 @@
|
|||||||
;; font string. You generally only need these two:
|
;; font string. You generally only need these two:
|
||||||
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
||||||
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
||||||
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 24))
|
;; (setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14))
|
||||||
|
(setq doom-font (font-spec :family "mononoki Nerd Font Mono" :size 16))
|
||||||
|
|
||||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||||
;; `load-theme' function. This is the default:
|
;; `load-theme' function. This is the default:
|
||||||
(setq doom-theme 'doom-material)
|
(setq doom-theme 'doom-one)
|
||||||
|
|
||||||
;; If you use `org' and don't want your org files in the default location below,
|
;; If you use `org' and don't want your org files in the default location below,
|
||||||
;; change `org-directory'. It must be set before org loads!
|
;; change `org-directory'. It must be set before org loads!
|
||||||
@ -36,6 +37,18 @@
|
|||||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||||
(setq display-line-numbers-type t)
|
(setq display-line-numbers-type t)
|
||||||
|
|
||||||
|
(setq rainbow-delimiters-mode t)
|
||||||
|
(setq rainbow-mode t)
|
||||||
|
(setq confirm-kill-emacs nil)
|
||||||
|
(setq prettify-symbols-mode nil)
|
||||||
|
(setq global-prettify-symbols-mode nil)
|
||||||
|
|
||||||
|
(setq browse-url-browser-function 'browse-url-firefox)
|
||||||
|
|
||||||
|
(use-package wakatime-mode :ensure t)
|
||||||
|
|
||||||
|
|
||||||
|
(global-wakatime-mode)
|
||||||
|
|
||||||
;; Here are some additional functions/macros that could help you configure Doom:
|
;; Here are some additional functions/macros that could help you configure Doom:
|
||||||
;;
|
;;
|
||||||
@ -53,22 +66,51 @@
|
|||||||
;;
|
;;
|
||||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||||
;; they are implemented.
|
;; they are implemented.
|
||||||
(use-package wakatime-mode :ensure t)
|
(after! company
|
||||||
|
(setq +lsp-company-backends '(company-tabnine :separate company-capf company-yasnippet))
|
||||||
(global-wakatime-mode)
|
(setq company-show-quick-access t)
|
||||||
|
(setq company-idle-delay 0)
|
||||||
(require 'org-bullets)
|
)
|
||||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
|
||||||
|
|
||||||
;; enable japanese input in emacs i think
|
|
||||||
;; (require 'mozc)
|
|
||||||
(setq default-input-method "japanese-mozc")
|
|
||||||
(setq mozc-candidate-style 'overlay)
|
|
||||||
|
|
||||||
(use-package! lsp
|
(use-package! lsp
|
||||||
:init
|
:init
|
||||||
(setq lsp-pyls-plugins-pylint-enabled t)
|
(setq lsp-pyls-plugins-pylint-enabled t)
|
||||||
(setq lsp-pyls-plugins-autopep8-enabled nil)
|
(setq lsp-pyls-plugins-autopep8-enabled t)
|
||||||
(setq lsp-pyls-plugins-yapf-enabled t)
|
(setq lsp-pyls-plugins-yapf-enabled t)
|
||||||
(setq lsp-pyls-plugins-pyflakes-enabled nil)
|
(setq lsp-pyls-plugins-pyflakes-enabled t)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook #'org-bullets-mode)
|
||||||
|
|
||||||
|
(add-hook 'before-save-hook 'py-isort-before-save)
|
||||||
|
|
||||||
|
(setq python-shell-interpreter "ipython"
|
||||||
|
python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True")
|
||||||
|
|
||||||
|
(flycheck-define-checker python-pycoverage
|
||||||
|
"A Python test coverage checker using the pycoverage tool.
|
||||||
|
|
||||||
|
See `https://github.com/mattharrison/pycoverage.el'.
|
||||||
|
|
||||||
|
This works after pytest has run by marking lines missing
|
||||||
|
coverage (as reported by pytest) as flycheck issues. If the code
|
||||||
|
was updated after pytest was run then nothing is reported.
|
||||||
|
"
|
||||||
|
:command
|
||||||
|
("python" "-c"
|
||||||
|
(eval
|
||||||
|
(mapconcat 'identity
|
||||||
|
(list
|
||||||
|
"import sys"
|
||||||
|
(format "sys.path.insert(0, '%scov2emacs')" (file-name-directory (locate-library "pycoverage")))
|
||||||
|
"from cov2emacslib.__init__ import main"
|
||||||
|
"main(sys.argv[1:])")
|
||||||
|
";"))
|
||||||
|
"--compile-mode" "--python-file" source-original)
|
||||||
|
:error-patterns ((warning line-start (file-name) ":" line ":" (message) line-end))
|
||||||
|
:modes (python-mode))
|
||||||
|
|
||||||
|
(org-babel-do-load-languages
|
||||||
|
'org-babel-load-languages
|
||||||
|
'((python . t)))
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(package-selected-packages '(w3m wakatime-mode)))
|
'(package-selected-packages '(wakatime-mode)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
58
doom/init.el
58
doom/init.el
@ -16,14 +16,15 @@
|
|||||||
|
|
||||||
(doom! :input
|
(doom! :input
|
||||||
;;chinese
|
;;chinese
|
||||||
japanese
|
;;japanese
|
||||||
;;layout ; auie,ctsrnm is the superior home row
|
;;layout ; auie,ctsrnm is the superior home row
|
||||||
|
|
||||||
:completion
|
:completion
|
||||||
company ; the ultimate code completion backend
|
company ; the ultimate code completion backend
|
||||||
;;helm ; the *other* search engine for love and life
|
;;helm ; the *other* search engine for love and life
|
||||||
;;ido ; the other *other* search engine...
|
;;ido ; the other *other* search engine...
|
||||||
ivy ; a search engine for love and life
|
;;ivy ; a search engine for love and life
|
||||||
|
vertico ; the search engine of the future
|
||||||
|
|
||||||
:ui
|
:ui
|
||||||
;;deft ; notational velocity for Emacs
|
;;deft ; notational velocity for Emacs
|
||||||
@ -31,15 +32,14 @@
|
|||||||
doom-dashboard ; a nifty splash screen for Emacs
|
doom-dashboard ; a nifty splash screen for Emacs
|
||||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||||
(emoji +unicode) ; 🙂
|
(emoji +unicode) ; 🙂
|
||||||
;;fill-column ; a `fill-column' indicator
|
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
;;hydra
|
;;hydra
|
||||||
;;indent-guides ; highlighted indent columns
|
;;indent-guides ; highlighted indent columns
|
||||||
ligatures ; ligatures and symbols to make your code pretty again
|
;;ligatures ; ligatures and symbols to make your code pretty again
|
||||||
minimap ; show a map of the code on the side
|
minimap ; show a map of the code on the side
|
||||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||||
;;nav-flash ; blink cursor line after big motions
|
;;nav-flash ; blink cursor line after big motions
|
||||||
neotree ; a project drawer, like NERDTree for vim
|
;;neotree ; a project drawer, like NERDTree for vim
|
||||||
ophints ; highlight the region an operation acts on
|
ophints ; highlight the region an operation acts on
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
;;tabs ; a tab bar for Emacs
|
;;tabs ; a tab bar for Emacs
|
||||||
@ -56,7 +56,6 @@
|
|||||||
file-templates ; auto-snippets for empty files
|
file-templates ; auto-snippets for empty files
|
||||||
fold ; (nigh) universal code folding
|
fold ; (nigh) universal code folding
|
||||||
(format +onsave) ; automated prettiness
|
(format +onsave) ; automated prettiness
|
||||||
(global-wakatime-mode)
|
|
||||||
;;god ; run Emacs commands without modifier keys
|
;;god ; run Emacs commands without modifier keys
|
||||||
;;lispy ; vim for lisp, for people who don't like vim
|
;;lispy ; vim for lisp, for people who don't like vim
|
||||||
multiple-cursors ; editing in many places at once
|
multiple-cursors ; editing in many places at once
|
||||||
@ -81,20 +80,20 @@
|
|||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
syntax ; tasing you for every semicolon you forget
|
||||||
spell ; tasing you for misspelling mispelling
|
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||||
;;grammar ; tasing grammar mistake every you make
|
;;grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
;;ansible
|
;;ansible
|
||||||
debugger ; FIXME stepping through code, to help you add bugs
|
debugger ; FIXME stepping through code, to help you add bugs
|
||||||
;;direnv
|
direnv
|
||||||
;;docker
|
docker
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
;;ein ; tame Jupyter notebooks with emacs
|
;;ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
gist ; interacting with github gists
|
gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
;;lsp
|
lsp ; M-x vscode
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
make ; run make tasks from Emacs
|
make ; run make tasks from Emacs
|
||||||
;;pass ; password manager for nerds
|
;;pass ; password manager for nerds
|
||||||
@ -104,7 +103,7 @@
|
|||||||
;;taskrunner ; taskrunner for all your projects
|
;;taskrunner ; taskrunner for all your projects
|
||||||
;;terraform ; infrastructure as code
|
;;terraform ; infrastructure as code
|
||||||
;;tmux ; an API for interacting with tmux
|
;;tmux ; an API for interacting with tmux
|
||||||
;;upload ; map local to remote projects via ssh/ftp
|
upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
:os
|
:os
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||||
@ -112,38 +111,39 @@
|
|||||||
|
|
||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
cc ; C/C++/Obj-C madness
|
;;beancount ; mind the GAAP
|
||||||
|
cc ; C > C++ == 1
|
||||||
;;clojure ; java with a lisp
|
;;clojure ; java with a lisp
|
||||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||||
;;coq ; proofs-as-programs
|
;;coq ; proofs-as-programs
|
||||||
;;crystal ; ruby at the speed of c
|
;;crystal ; ruby at the speed of c
|
||||||
;;csharp ; unity, .NET, and mono shenanigans
|
;;csharp ; unity, .NET, and mono shenanigans
|
||||||
;;data ; config/data formats
|
data ; config/data formats
|
||||||
;;(dart +flutter) ; paint ui and not much else
|
;;(dart +flutter) ; paint ui and not much else
|
||||||
|
;;dhall
|
||||||
;;elixir ; erlang done right
|
;;elixir ; erlang done right
|
||||||
;;elm ; care for a cup of TEA?
|
;;elm ; care for a cup of TEA?
|
||||||
emacs-lisp ; drown in parentheses
|
emacs-lisp ; drown in parentheses
|
||||||
;;erlang ; an elegant language for a more civilized age
|
;;erlang ; an elegant language for a more civilized age
|
||||||
;;ess ; emacs speaks statistics
|
;;ess ; emacs speaks statistics
|
||||||
|
;;factor
|
||||||
;;faust ; dsp, but you get to keep your soul
|
;;faust ; dsp, but you get to keep your soul
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
;;fsharp ; ML stands for Microsoft's Language
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
;;gdscript ; the language you waited for
|
;;gdscript ; the language you waited for
|
||||||
;;(go +lsp) ; the hipster dialect
|
;;(go +lsp) ; the hipster dialect
|
||||||
;;(haskell +dante) ; a language that's lazier than I am
|
;;(haskell +lsp) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ; a language you can depend on
|
;;idris ; a language you can depend on
|
||||||
json ; At least it ain't XML
|
json ; At least it ain't XML
|
||||||
(java +meghanada) ; the poster child for carpal tunnel syndrome
|
(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||||
javascript ; all(hope(abandon(ye(who(enter(here))))))
|
javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;(java +lsp)
|
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
latex ; writing papers in Emacs has never been so fun
|
;;latex ; writing papers in Emacs has never been so fun
|
||||||
;;lean
|
;;lean ; for folks with too much to prove
|
||||||
;;factor
|
;;ledger ; be audit you can be
|
||||||
;;ledger ; an accounting system in Emacs
|
;;lua ; one-based indices? one-based indices
|
||||||
lua ; one-based indices? one-based indices
|
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
nix ; I hereby declare "nix geht mehr!"
|
nix ; I hereby declare "nix geht mehr!"
|
||||||
@ -151,37 +151,39 @@
|
|||||||
org ; organize your plain life in plain text
|
org ; organize your plain life in plain text
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
python ; beautiful is better than ugly
|
(python +lsp) ; beautiful is better than ugly
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
;;racket ; a DSL for DSLs
|
;;racket ; a DSL for DSLs
|
||||||
;;raku ; the artist formerly known as perl6
|
;;raku ; the artist formerly known as perl6
|
||||||
rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
;;scheme ; a fully conniving family of lisps
|
;;(scheme +guile) ; a fully conniving family of lisps
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
;;sml
|
;;sml
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
;;terra ; Earth and Moon in alignment for performance.
|
||||||
web ; the tubes
|
;;web ; the tubes
|
||||||
;;yaml ; JSON, but readable
|
;;yaml ; JSON, but readable
|
||||||
|
;;zig ; C, but simpler
|
||||||
|
|
||||||
:email
|
:email
|
||||||
(mu4e +gmail)
|
(mu4e +org +gmail)
|
||||||
;;notmuch
|
;;notmuch
|
||||||
;;(wanderlust +gmail)
|
;;(wanderlust +gmail)
|
||||||
|
|
||||||
:app
|
:app
|
||||||
calendar
|
calendar
|
||||||
|
;;emms
|
||||||
|
;;everywhere ; *leave* Emacs!? You must be joking
|
||||||
;;irc ; how neckbeards socialize
|
;;irc ; how neckbeards socialize
|
||||||
;;(rss +org) ; emacs as an RSS reader
|
;;(rss +org) ; emacs as an RSS reader
|
||||||
;;twitter ; twitter client https://twitter.com/vnought
|
twitter ; twitter client https://twitter.com/vnought
|
||||||
|
|
||||||
:config
|
:config
|
||||||
;;literate
|
;;literate
|
||||||
(default +bindings +smartparens))
|
(default +bindings +smartparens))
|
||||||
(python +lsp)
|
|
||||||
|
@ -48,8 +48,13 @@
|
|||||||
;(unpin! pinned-package another-pinned-package)
|
;(unpin! pinned-package another-pinned-package)
|
||||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||||
;(unpin! t)
|
;(unpin! t)
|
||||||
(package! wakatime-mode)
|
(package! company-tabnine :recipe (:host github :repo "TommyX12/company-tabnine"))
|
||||||
(package! org-bullets)
|
(package! org-bullets)
|
||||||
(package! markdown-mode)
|
|
||||||
(package! auto-complete)
|
(package! wakatime-mode)
|
||||||
(package! mozc)
|
|
||||||
|
(package! py-isort)
|
||||||
|
(package! python-pytest)
|
||||||
|
(package! ein)
|
||||||
|
(package! python-docstring)
|
||||||
|
(package! py-autopep8)
|
||||||
|
@ -1,299 +1,331 @@
|
|||||||
# Help / Useful commands
|
# Help / Useful commands
|
||||||
|
|
||||||
## tmux
|
## tmux
|
||||||
tmux new -s [name] # start new session named [name]
|
|
||||||
tmux a -t [name] # attatch to session named [name]
|
tmux new -s [name] # start new session named [name]
|
||||||
tmux ls # list tmux sessions
|
tmux a -t [name] # attatch to session named [name]
|
||||||
tmux kill-ses -t [name] # kill tmux session named [name]
|
tmux ls # list tmux sessions
|
||||||
|
tmux kill-ses -t [name] # kill tmux session named [name]
|
||||||
|
|
||||||
### tmux keybindings
|
### tmux keybindings
|
||||||
C+b $ # rename session
|
|
||||||
C+b % # vertical split
|
C+b $ # rename session
|
||||||
C+b " # horizontal split
|
C+b % # vertical split
|
||||||
C+b d # detach from session
|
C+b " # horizontal split
|
||||||
C+b c # create new tab
|
C+b d # detach from session
|
||||||
C+b n # next tab
|
C+b c # create new tab
|
||||||
|
C+b n # next tab
|
||||||
|
|
||||||
## sybmolic links
|
## sybmolic links
|
||||||
ln -s [file] [symbolic link] # creates a symbolic link for [file]
|
|
||||||
ln -sr [file] [path_to_sym_file] # creates symlink in a diff directory
|
ln -s [file] [symbolic link] # creates a symbolic link for [file]
|
||||||
|
ln -sr [file] [path_to_sym_file] # creates symlink in a diff directory
|
||||||
|
|
||||||
## yarn
|
## yarn
|
||||||
yarn global add [package] # adds a package globally
|
|
||||||
yard add [package] # add a package
|
yarn global add [package] # adds a package globally
|
||||||
yarn create react-app [name] # create-react-app with yarn
|
yard add [package] # add a package
|
||||||
|
yarn create react-app [name] # create-react-app with yarn
|
||||||
|
|
||||||
## firebase
|
## firebase
|
||||||
firebase deploy # deploy code to firebase
|
|
||||||
firebase serve # run local server through firebase
|
firebase deploy # deploy code to firebase
|
||||||
firebase projects:list # list all projects
|
firebase serve # run local server through firebase
|
||||||
|
firebase projects:list # list all projects
|
||||||
|
|
||||||
## curl
|
## curl
|
||||||
curl [web_address] # dump a webpage to the terminal
|
|
||||||
curl -L [address] # follow a link and dump the results
|
curl [web_address] # dump a webpage to the terminal
|
||||||
curl --verbose probably also -v # run with verbose
|
curl -L [address] # follow a link and dump the results
|
||||||
|
curl --verbose probably also -v # run with verbose
|
||||||
|
|
||||||
## nmap
|
## nmap
|
||||||
nmap [web-address] # see what ports are open at address
|
|
||||||
sudo lsof -i -P -n | grep LISTEN # listen for stuff on ports
|
nmap [web-address] # see what ports are open at address
|
||||||
|
sudo lsof -i -P -n | grep LISTEN # listen for stuff on ports
|
||||||
|
|
||||||
## pip
|
## pip
|
||||||
pip list # list pip packages installed
|
|
||||||
|
pip list # list pip packages installed
|
||||||
|
|
||||||
## python virtual env
|
## python virtual env
|
||||||
python3 -m venv env # create the env directory
|
|
||||||
source env/bin/activate # activate the virtual environment
|
python3 -m venv env # create the env directory
|
||||||
or . env/bin/activate
|
source env/bin/activate # activate the virtual environment
|
||||||
echo $VIRTUAL_ENV # prints the path to the virtual env
|
or . env/bin/activate
|
||||||
which -a python # lists the install locations of python
|
echo $VIRTUAL_ENV # prints the path to the virtual env
|
||||||
deactivate # when in a virtual session deactivates it
|
which -a python # lists the install locations of python
|
||||||
|
deactivate # when in a virtual session deactivates it
|
||||||
|
|
||||||
## tar
|
## tar
|
||||||
tar [address] # download a file from address
|
|
||||||
|
tar [address] # download a file from address
|
||||||
|
|
||||||
## vim
|
## vim
|
||||||
|
|
||||||
:sp [filename] - Opens a new file and splits your screen horizontally to show more than one buffer
|
:sp [filename] - Opens a new file and splits your screen horizontally to show more than one buffer
|
||||||
|
|
||||||
:vsp [filename] - Opens a new file and splits your screen vertically to show more than one buffer
|
:vsp [filename] - Opens a new file and splits your screen vertically to show more than one buffer
|
||||||
set nonumber # remove line numbers from file
|
set nonumber # remove line numbers from file
|
||||||
Ctrl+w h # shift focus left pane
|
Ctrl+w h # shift focus left pane
|
||||||
Ctrl+w l # shift fous right pane
|
Ctrl+w l # shift fous right pane
|
||||||
:nohls # remove search hilighting until next search
|
:nohls # remove search hilighting until next search
|
||||||
cw # delete word and enter insert mode
|
cw # delete word and enter insert mode
|
||||||
^u # go up half a page
|
^u # go up half a page
|
||||||
^d # go down half a page
|
^d # go down half a page
|
||||||
s/<pattern>/<replace> # search and replace for pattern
|
s/<pattern>/<replace> # search and replace for pattern
|
||||||
V [select line] # Use visual line to select multiple lines
|
V [select line] # Use visual line to select multiple lines
|
||||||
:g/^$/d # Remove all blank lines from a file
|
:g/^$/d # Remove all blank lines from a file
|
||||||
"xyy # Yank line to register x
|
"xyy # Yank line to register x
|
||||||
"xp # Paste line from register x
|
"xp # Paste line from register x
|
||||||
"+y # yank into the system clipboard register
|
"+y # yank into the system clipboard register
|
||||||
"+p # paste from the system clipboard register
|
"+p # paste from the system clipboard register
|
||||||
zg # add word to local dictionary (spellcheck)
|
zg # add word to local dictionary (spellcheck)
|
||||||
|
|
||||||
## markdown
|
## markdown
|
||||||
grip <markdown file> # open a live-server for markdown file
|
|
||||||
**<>** # bold
|
grip <markdown file> # open a live-server for markdown file
|
||||||
--- # line
|
**<>** # bold
|
||||||
[...](link) # inline-style link
|
--- # line
|
||||||
[desc](link "hover title") # inline-style link with hover title
|
[...](link) # inline-style link
|
||||||
|
[desc](link "hover title") # inline-style link with hover title
|
||||||
|
|
||||||
## pacman
|
## pacman
|
||||||
|
|
||||||
pacman -Syu --ignore=[package name] # update/upgrade all but packages in ignore
|
pacman -Syu --ignore=[package name] # update/upgrade all but packages in ignore
|
||||||
pacman -Rs package_name # remove a package and all deps not needed
|
pacman -Rs package_name # remove a package and all deps not needed
|
||||||
pacman -Rsu package_name # if above command does not work
|
pacman -Rsu package_name # if above command does not work
|
||||||
pacman -Qtdq # check for orphaned packages
|
pacman -Qtdq # check for orphaned packages
|
||||||
pacman -Rns $(pacman -Qtdq) # remove orphaned packages
|
pacman -Rns $(pacman -Qtdq) # remove orphaned packages
|
||||||
rm /var/lib/pacman/db.lck # remove the lock file for pacman
|
rm /var/lib/pacman/db.lck # remove the lock file for pacman
|
||||||
pacman -U /var/cache/pacman/pkg/package-old_version.pkg.tar.type # downgrade package
|
pacman -U /var/cache/pacman/pkg/package-old_version.pkg.tar.type # downgrade package
|
||||||
|
|
||||||
## ctags
|
## ctags
|
||||||
|
|
||||||
ctags -R . # index the current directory with ctags
|
ctags -R . # index the current directory with ctags
|
||||||
|
|
||||||
## ssh
|
## ssh
|
||||||
|
|
||||||
ssh -i eecs485deploy.pem ubuntu@ec2-3-137-139-85.us-east-2.compute.amazonaws.com
|
ssh -i eecs485deploy.pem ubuntu@ec2-3-137-139-85.us-east-2.compute.amazonaws.com
|
||||||
ssh -p [port] user@ip
|
ssh -p [port] user@ip
|
||||||
~/.ssh/config # file to change configuration for ssh
|
~/.ssh/config # file to change configuration for ssh
|
||||||
|
|
||||||
## insta485 server-side
|
## insta485 server-side
|
||||||
gunicorn -b localhost:8000 -w 2 -D insta485:app # Start the server
|
|
||||||
pgrep -af gunicorn # list running guinicorn jobs
|
gunicorn -b localhost:8000 -w 2 -D insta485:app # Start the server
|
||||||
pkill -f gunicorn # stop the gunicorn server
|
pgrep -af gunicorn # list running guinicorn jobs
|
||||||
|
pkill -f gunicorn # stop the gunicorn server
|
||||||
|
|
||||||
## wget
|
## wget
|
||||||
|
|
||||||
wget [address] # download a file/files
|
wget [address] # download a file/files
|
||||||
-P # specify a directory
|
-P # specify a directory
|
||||||
-c # allow to save location on INT
|
-c # allow to save location on INT
|
||||||
|
|
||||||
## unzip
|
## unzip
|
||||||
|
|
||||||
unzip (file) # unzips zip file
|
unzip (file) # unzips zip file
|
||||||
|
|
||||||
## wine
|
## wine
|
||||||
|
|
||||||
wine (file) # install a windows file
|
wine (file) # install a windows file
|
||||||
winefile # opens the windows file system
|
winefile # opens the windows file system
|
||||||
|
|
||||||
## onedrive
|
## onedrive
|
||||||
|
|
||||||
onedrive --synchronize # sync the onedrive folder to the cloud
|
onedrive --synchronize # sync the onedrive folder to the cloud
|
||||||
|
|
||||||
## text2pdf
|
## text2pdf
|
||||||
|
|
||||||
text2pdf [input file] > [output] # convert input file to pdf named output
|
text2pdf [input file] > [output] # convert input file to pdf named output
|
||||||
|
|
||||||
## netstat
|
## netstat
|
||||||
|
|
||||||
netstat -ltnp | grep -w ':PORT' # show process running on port PORT
|
netstat -ltnp | grep -w ':PORT' # show process running on port PORT
|
||||||
l - only show lisening sockets
|
l - only show lisening sockets
|
||||||
t - display tcp connections
|
t - display tcp connections
|
||||||
n - show numerical addresses
|
n - show numerical addresses
|
||||||
p - show PID and process name
|
p - show PID and process name
|
||||||
grep -w - matching of exact string
|
grep -w - matching of exact string
|
||||||
netstat -tupan
|
netstat -tupan
|
||||||
|
|
||||||
## japanese keyboard
|
## japanese keyboard
|
||||||
|
|
||||||
ibus-setup # start daemon and launch config
|
ibus-setup # start daemon and launch config
|
||||||
Ctrl+Alt+Shift # switch between languages
|
Ctrl+Alt+Shift # switch between languages
|
||||||
|
|
||||||
## httpie
|
## httpie
|
||||||
|
|
||||||
http [url] # send get request with pretty printing/colors
|
http [url] # send get request with pretty printing/colors
|
||||||
|
|
||||||
## tcm - Typed CSS Modules # generate styles.css.d.ts file
|
## tcm - Typed CSS Modules # generate styles.css.d.ts file
|
||||||
|
|
||||||
tsm [directory or file] # generate styles.d.ts for each file or specific file
|
tsm [directory or file] # generate styles.d.ts for each file or specific file
|
||||||
|
|
||||||
ranger
|
ranger
|
||||||
|
|
||||||
ranger # open text-based file-manage
|
ranger # open text-based file-manage
|
||||||
|
|
||||||
## nmcli # netwrok manager command line interface
|
## nmcli # netwrok manager command line interface
|
||||||
|
|
||||||
nmcli device # lists all device
|
nmcli device # lists all device
|
||||||
nmcli device wifi # list wifi networks
|
nmcli device wifi # list wifi networks
|
||||||
nmcli device connct wlp1s0 -ask # connect to wifi and enter password
|
nmcli device connct wlp1s0 -ask # connect to wifi and enter password
|
||||||
|
|
||||||
## picom # to blur stuff
|
## picom # to blur stuff
|
||||||
|
|
||||||
picom & # run picom in background
|
picom & # run picom in background
|
||||||
|
|
||||||
## i3-gaps
|
## i3-gaps
|
||||||
|
|
||||||
Alt+Shift+G # open up the gap manager
|
Alt+Shift+G # open up the gap manager
|
||||||
|
|
||||||
## feg # set background image
|
## feg # set background image
|
||||||
|
|
||||||
feh --bg-scale ~/OneDrive/Pictures/what\ are\ the\ chances.jpg
|
feh --bg-scale ~/OneDrive/Pictures/what\ are\ the\ chances.jpg
|
||||||
|
|
||||||
## xprop # run xprops
|
## xprop # run xprops
|
||||||
|
|
||||||
Click on window and get information from the Window Manager about it
|
Click on window and get information from the Window Manager about it
|
||||||
|
|
||||||
## Linux keybindings
|
## Linux keybindings
|
||||||
|
|
||||||
Alt+Shift+g to go into gap mode and press i for inner gap and + 4 times
|
Alt+Shift+g to go into gap mode and press i for inner gap and + 4 times
|
||||||
|
|
||||||
redirect stderr
|
redirect stderr
|
||||||
|
|
||||||
append 2>/dev/null to redirect filehandle 2 (STDERR) to /dev/null, which is
|
append 2>/dev/null to redirect filehandle 2 (STDERR) to /dev/null, which is
|
||||||
|
|
||||||
## network-manager
|
## network-manager
|
||||||
|
|
||||||
nmtui # launch network manager gui
|
nmtui # launch network manager gui
|
||||||
nmcli # network manager cli
|
nmcli # network manager cli
|
||||||
|
|
||||||
## disown # remove a job from table of active jobs
|
## disown # remove a job from table of active jobs
|
||||||
|
|
||||||
disown %[jobnumber] # removes active job [jobnumber]
|
disown %[jobnumber] # removes active job [jobnumber]
|
||||||
|
|
||||||
## jobs
|
## jobs
|
||||||
|
|
||||||
jobs -l # list all active jobs
|
jobs -l # list all active jobs
|
||||||
|
|
||||||
ps
|
ps
|
||||||
ps -l # list active processes
|
ps -l # list active processes
|
||||||
|
|
||||||
## doom emacs
|
## doom emacs
|
||||||
Meta=SPACE
|
|
||||||
Meta+. # open file search
|
Meta=SPACE
|
||||||
Meta+b # open buffer settings
|
Meta+. # open file search
|
||||||
Meta+b+m # set bookmark
|
Meta+b # open buffer settings
|
||||||
Meta+Return # open bookmark selector
|
Meta+b+m # set bookmark
|
||||||
Meta+h # help
|
Meta+Return # open bookmark selector
|
||||||
Meta+t # toggle menu
|
Meta+h # help
|
||||||
Meta+o+p # toggle nerdtree like thing
|
Meta+t # toggle menu
|
||||||
|
Meta+o+p # toggle nerdtree like thing
|
||||||
|
|
||||||
## bpytop
|
## bpytop
|
||||||
New and improved bashtop written in python
|
|
||||||
|
New and improved bashtop written in python
|
||||||
|
|
||||||
## w3m
|
## w3m
|
||||||
w3m www.google.com # terminal web browswer
|
|
||||||
|
w3m www.google.com # terminal web browswer
|
||||||
|
|
||||||
## bluetoothctl
|
## bluetoothctl
|
||||||
scan on # turn on scan
|
|
||||||
pair [device id] # connect to device
|
scan on # turn on scan
|
||||||
|
pair [device id] # connect to device
|
||||||
|
|
||||||
## locate
|
## locate
|
||||||
locate [filename] # return path to file
|
|
||||||
locate -b [filename] # search for file/dir in basename
|
locate [filename] # return path to file
|
||||||
suda updatedb -v # update the db with new files
|
locate -b [filename] # search for file/dir in basename
|
||||||
|
suda updatedb -v # update the db with new files
|
||||||
|
|
||||||
## md2pdf
|
## md2pdf
|
||||||
md2pdf <markdown file> # convert markdown file to pdf
|
|
||||||
|
md2pdf <markdown file> # convert markdown file to pdf
|
||||||
|
|
||||||
## glow
|
## glow
|
||||||
# Read from file
|
|
||||||
glow README.md
|
# Read from file
|
||||||
# Read from stdin
|
glow README.md
|
||||||
glow -
|
# Read from stdin
|
||||||
# Fetch README from GitHub / GitLab
|
glow -
|
||||||
glow github.com/charmbracelet/glow
|
# Fetch README from GitHub / GitLab
|
||||||
# Fetch markdown from HTTP
|
glow github.com/charmbracelet/glow
|
||||||
glow https://host.tld/file.md
|
# Fetch markdown from HTTP
|
||||||
# stash document from cli
|
glow https://host.tld/file.md
|
||||||
glow stash README.md
|
# stash document from cli
|
||||||
|
glow stash README.md
|
||||||
|
|
||||||
## Notifications
|
## Notifications
|
||||||
/usr/share/dbus-1/services
|
|
||||||
|
/usr/share/dbus-1/services
|
||||||
|
|
||||||
## crontab
|
## crontab
|
||||||
crontab -e # edit the cronjobs for user
|
|
||||||
crontab -l # list all cronjobs
|
crontab -e # edit the cronjobs for user
|
||||||
|
crontab -l # list all cronjobs
|
||||||
|
|
||||||
## youtube-dl
|
## youtube-dl
|
||||||
youtube-dl [url] # download a video from youtube
|
|
||||||
|
youtube-dl [url] # download a video from youtube
|
||||||
|
|
||||||
## pgrep
|
## pgrep
|
||||||
pgrep -af [name] # searches for all process with name [name]
|
|
||||||
pgrep -x [name] # searches for name with exact matching
|
pgrep -af [name] # searches for all process with name [name]
|
||||||
pgrep -l [name] # return pid and process name
|
pgrep -x [name] # searches for name with exact matching
|
||||||
|
pgrep -l [name] # return pid and process name
|
||||||
|
|
||||||
## pidof
|
## pidof
|
||||||
pidof [name] # gets the pid of the process with [name]
|
|
||||||
|
pidof [name] # gets the pid of the process with [name]
|
||||||
|
|
||||||
## gparted
|
## gparted
|
||||||
|
|
||||||
Use application gparted to format USB drive
|
Use application gparted to format USB drive
|
||||||
|
|
||||||
## getopts
|
## getopts
|
||||||
while getopts "vk" arg; do
|
|
||||||
case $arg in
|
while getopts "vk" arg; do
|
||||||
v) verbose=1;;
|
case $arg in
|
||||||
k) justKillIt=1;;
|
v) verbose=1;;
|
||||||
esac
|
k) justKillIt=1;;
|
||||||
done
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
## tor
|
## tor
|
||||||
ahmia.fi # dark web search engine
|
|
||||||
|
ahmia.fi # dark web search engine
|
||||||
|
|
||||||
## github api
|
## github api
|
||||||
curl -i -u your_username:your_token https://api.github.com/user
|
|
||||||
curl -i -H "Authorization: token <access token>" \
|
curl -i -u your_username:your_token https://api.github.com/user
|
||||||
https://api.github.com/user/repos
|
curl -i -H "Authorization: token <access token>" \
|
||||||
|
https://api.github.com/user/repos
|
||||||
|
|
||||||
## conky
|
## conky
|
||||||
Ctrl+Mod(alt)+c # toggle conky
|
|
||||||
Ctrl+Mod+PgUp # next conky
|
Ctrl+Mod(alt)+c # toggle conky
|
||||||
Ctrl+Mod+PgDn # prev conky
|
Ctrl+Mod+PgUp # next conky
|
||||||
# launch conky set up by Arcolinux team
|
Ctrl+Mod+PgDn # prev conky
|
||||||
conky -c /home/sudacode/.config/conky/AUR-ArcoLinux-Plasma.conkyrc
|
# launch conky set up by Arcolinux team
|
||||||
conky -c ~/.config/conky/AUR-Nemesis-Plasma.conkyrc
|
conky -c /home/sudacode/.config/conky/AUR-ArcoLinux-Plasma.conkyrc
|
||||||
|
conky -c ~/.config/conky/AUR-Nemesis-Plasma.conkyrc
|
||||||
|
|
||||||
## Chiaki
|
## Chiaki
|
||||||
|
|
||||||
ps4 remtote play application for linux
|
ps4 remtote play application for linux
|
||||||
|
|
||||||
## Arch not booting
|
## Arch not booting
|
||||||
|
|
||||||
Ctrl+Alt+F5 to get to tty5
|
Ctrl+Alt+F5 to get to tty5
|
||||||
may need to press FN key
|
may need to press FN key
|
||||||
check /var/log/pacman.log
|
check /var/log/pacman.log
|
||||||
|
|
||||||
## systemctl
|
## systemctl
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
systemctl start [name] Starts service
|
systemctl start [name] Starts service
|
||||||
systemctl stop [name] Stops service
|
systemctl stop [name] Stops service
|
||||||
@ -303,52 +335,64 @@ systemctl status [name] Get status of service
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Fix Spotify Not Working Well
|
## Fix Spotify Not Working Well
|
||||||
|
|
||||||
rm /usr/share/dbus-1/services/org.kde.plasma.Notifications.service
|
rm /usr/share/dbus-1/services/org.kde.plasma.Notifications.service
|
||||||
|
|
||||||
## heroku
|
## heroku
|
||||||
heroku git:remote -a [project name] Connect repository to the heroku remote
|
|
||||||
|
heroku git:remote -a [project name] Connect repository to the heroku remote
|
||||||
|
|
||||||
## tokei
|
## tokei
|
||||||
tokei show programming languages in use in current directory
|
|
||||||
|
tokei show programming languages in use in current directory
|
||||||
|
|
||||||
## ncmpcpp
|
## ncmpcpp
|
||||||
|
|
||||||
audio player
|
audio player
|
||||||
|
|
||||||
## pulsemixer
|
## pulsemixer
|
||||||
|
|
||||||
command line pulseaudio
|
command line pulseaudio
|
||||||
|
|
||||||
## psql
|
## psql
|
||||||
|
|
||||||
connect to a postgresql db on another machine
|
connect to a postgresql db on another machine
|
||||||
psql postgresql://[username]@[addr]:[port]/[DBname]
|
psql postgresql://[username]@[addr]:[port]/[DBname]
|
||||||
|
|
||||||
## udisksctl
|
## udisksctl
|
||||||
|
|
||||||
### mount/unmount sd card
|
### mount/unmount sd card
|
||||||
|
|
||||||
udisksctl mount -b /dev/mmcblk0p1
|
udisksctl mount -b /dev/mmcblk0p1
|
||||||
udisksctl unmount -b /dev/mmcblk0p1
|
udisksctl unmount -b /dev/mmcblk0p1
|
||||||
|
|
||||||
## dunst
|
## dunst
|
||||||
dunstify "notification" display a desktop notification
|
|
||||||
|
dunstify "notification" display a desktop notification
|
||||||
dunstify "Progress: " -h int:value:60 display progress bar starting at 60
|
dunstify "Progress: " -h int:value:60 display progress bar starting at 60
|
||||||
|
|
||||||
## Jupyter Notebook
|
## Jupyter Notebook
|
||||||
|
|
||||||
### Add a Virtual Environment to JN
|
### Add a Virtual Environment to JN
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python -m ipykernel install --user --name=[env_name]
|
python -m ipykernel install --user --name=[env_name]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Uninstall venv from JN
|
### Uninstall venv from JN
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
jupyter kernelspec uninstall [env_name]
|
jupyter kernelspec uninstall [env_name]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### sacad: download album artwork
|
### sacad: download album artwork
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sacad [artist] [album name] [size] [output_file_name]
|
sacad [artist] [album name] [size] [output_file_name]
|
||||||
```
|
```
|
||||||
|
|
||||||
### ifuse: connect to iphone filesystem
|
### ifuse: connect to iphone filesystem
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mkdir -p /tmp/phone/
|
$ mkdir -p /tmp/phone/
|
||||||
# mount the filesystem
|
# mount the filesystem
|
||||||
@ -358,111 +402,106 @@ $ ifuse /tmp/phone/
|
|||||||
```
|
```
|
||||||
|
|
||||||
### mdr: markdown render in the terminal
|
### mdr: markdown render in the terminal
|
||||||
|
|
||||||
:MarkdownRender right
|
:MarkdownRender right
|
||||||
|
|
||||||
### ipython: interactive python with history, dynamic object introsepction, easier configuration, command completion, access to system shell, and integration with numerical and sientific computing tools
|
### ipython: interactive python with history, dynamic object introsepction, easier configuration, command completion, access to system shell, and integration with numerical and sientific computing tools
|
||||||
|
|
||||||
## nvtop
|
## nvtop
|
||||||
|
|
||||||
top for graphics card
|
top for graphics card
|
||||||
|
|
||||||
## rofi-mpd
|
## rofi-mpd
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rofi-mpd -h
|
rofi-mpd -h
|
||||||
```
|
```
|
||||||
|
|
||||||
## UMICH Caen
|
## UMICH Caen
|
||||||
|
|
||||||
rsync -rtv path_to_your_local_file_name your_uniqname@login.engin.umich.edu:path_to_your_remote_folder
|
rsync -rtv path_to_your_local_file_name your_uniqname@login.engin.umich.edu:path_to_your_remote_folder
|
||||||
|
|
||||||
## Edit files as superuser (sudo)
|
## Edit files as superuser (sudo)
|
||||||
|
|
||||||
sudo -e or sudoedit
|
sudo -e or sudoedit
|
||||||
|
|
||||||
## nftables: firewall
|
## nftables: firewall
|
||||||
|
|
||||||
nft -s list ruleset | tee [filename]
|
nft -s list ruleset | tee [filename]
|
||||||
systemctl status nftables
|
systemctl status nftables
|
||||||
|
|
||||||
|
|
||||||
## i3-help-log
|
## i3-help-log
|
||||||
|
|
||||||
|
|
||||||
## lscpu
|
## lscpu
|
||||||
|
|
||||||
lscpu # display info about the CPU
|
lscpu # display info about the CPU
|
||||||
|
|
||||||
|
|
||||||
## ps
|
## ps
|
||||||
|
|
||||||
ps -aux # list stats about processes running including cpu and memory
|
|
||||||
ps -aux --sort=%mem/%cpu # sort by memory or cpu
|
|
||||||
ps -aux --sort=-%mem # sort by memory in ascending order
|
|
||||||
|
|
||||||
|
ps -aux # list stats about processes running including cpu and memory
|
||||||
|
ps -aux --sort=%mem/%cpu # sort by memory or cpu
|
||||||
|
ps -aux --sort=-%mem # sort by memory in ascending order
|
||||||
|
|
||||||
## kill
|
## kill
|
||||||
|
|
||||||
kill -l # list all kill signals
|
kill -l # list all kill signals
|
||||||
|
|
||||||
## ip
|
## ip
|
||||||
|
|
||||||
ip a # show all
|
ip a # show all
|
||||||
ip -4 addr # show ipv4 addresses
|
ip -4 addr # show ipv4 addresses
|
||||||
ip -6 addr # show ipv6 addresses
|
ip -6 addr # show ipv6 addresses
|
||||||
|
|
||||||
|
|
||||||
## sqlplus
|
## sqlplus
|
||||||
|
|
||||||
select * from user_sequences; # list user defined sequences
|
select * from user_sequences; # list user defined sequences
|
||||||
select table_name from user_tables; # list user defined tables
|
select table_name from user_tables; # list user defined tables
|
||||||
|
|
||||||
|
|
||||||
## qemu
|
## qemu
|
||||||
|
|
||||||
# create image
|
# create image
|
||||||
qemu-img create -f qcow2 Image.img 10G
|
qemu-img create -f qcow2 Image.img 10G
|
||||||
# create vm with 4G of memory with X.iso and boots directly into dvd drive
|
# create vm with 4G of memory with X.iso and boots directly into dvd drive
|
||||||
qemu-system-x86_64 -enable-kvm -cdrom manjaro-awesome-20.0-200428-linux56.iso -boot order=d -drive file=Image.img -m 4G -cpu host -smp 4 -vga virtio -display sdl,gl=on
|
qemu-system-x86_64 -enable-kvm -cdrom manjaro-awesome-20.0-200428-linux56.iso -boot order=d -drive file=Image.img -m 4G -cpu host -smp 4 -vga virtio -display sdl,gl=on
|
||||||
# boots into menu
|
# boots into menu
|
||||||
qemu-system-x86_64 -enable-kvm -cdrom manjaro-awesome-20.0-200428-linux56.iso -boot menu=on -drive file=Image.img -m 4G -cpu host -smp 4 -vga virtio -display sdl,gl=on
|
qemu-system-x86_64 -enable-kvm -cdrom manjaro-awesome-20.0-200428-linux56.iso -boot menu=on -drive file=Image.img -m 4G -cpu host -smp 4 -vga virtio -display sdl,gl=on
|
||||||
|
|
||||||
## scp: secure cp
|
## scp: secure cp
|
||||||
|
|
||||||
# copy file to remote
|
# copy file to remote
|
||||||
scp -P 88 [file] user@host:path-to-file
|
scp -P 88 [file] user@host:path-to-file
|
||||||
# copy directory to remote
|
# copy directory to remote
|
||||||
scp -rp -P 88 [directory] user@host:path-to-directory
|
scp -rp -P 88 [directory] user@host:path-to-directory
|
||||||
# copy from remote to local
|
# copy from remote to local
|
||||||
scp remote-user@remote-host:file path-to-file
|
scp remote-user@remote-host:file path-to-file
|
||||||
|
|
||||||
|
|
||||||
## rsync
|
## rsync
|
||||||
|
|
||||||
# copied files in archive mode (recursively run on directories)
|
|
||||||
# add --delete option to have destination delete files when deleted in src
|
|
||||||
rsync -av --delete [source] [destiation]
|
|
||||||
# exclude files with --exclude='pattern' or --exclude-from='exclude_file'
|
|
||||||
|
|
||||||
# rsync over the network
|
# copied files in archive mode (recursively run on directories)
|
||||||
|
# add --delete option to have destination delete files when deleted in src
|
||||||
|
rsync -av --delete [source] [destiation]
|
||||||
|
# exclude files with --exclude='pattern' or --exclude-from='exclude_file'
|
||||||
|
|
||||||
|
# rsync over the network
|
||||||
|
|
||||||
## wget
|
## wget
|
||||||
|
|
||||||
# add -c argument to allow to interrupt download and resume later with -c
|
# add -c argument to allow to interrupt download and resume later with -c
|
||||||
# -P to set local download path
|
# -P to set local download path
|
||||||
|
|
||||||
|
|
||||||
## send key to server
|
## send key to server
|
||||||
|
|
||||||
ssh-copy-id user@host
|
ssh-copy-id user@host
|
||||||
|
|
||||||
## CAEN VNC
|
## CAEN VNC
|
||||||
|
|
||||||
ssh -f -L 5951:localhost:5951 uniqname@login-course.engin.umich.edu "sleep 30"
|
ssh -f -L 5951:localhost:5951 uniqname@login-course.engin.umich.edu "sleep 30"
|
||||||
vncviewer localhost:5951
|
vncviewer localhost:5951
|
||||||
|
|
||||||
## Anaconda
|
## Anaconda
|
||||||
|
|
||||||
source /opt/anaconda/bin/activate /home/sudacode/anaconda3
|
source /opt/anaconda/bin/activate /home/sudacode/anaconda3
|
||||||
anaconda-navigator
|
anaconda-navigator
|
||||||
|
|
||||||
PostgreSQL: postgresql://scott:tiger@localhost/mydatabase
|
PostgreSQL: postgresql://scott:tiger@localhost/mydatabase
|
||||||
MySQL: mysql://scott:tiger@localhost/foo
|
MySQL: mysql://scott:tiger@localhost/foo
|
||||||
@ -472,56 +511,68 @@ rofi-mpd -h
|
|||||||
|
|
||||||
## Create new Application Entry
|
## Create new Application Entry
|
||||||
|
|
||||||
/usr/share/applications/
|
/usr/share/applications/
|
||||||
/usr/local/share/applications/
|
/usr/local/share/applications/
|
||||||
~/.local/share/applications/
|
~/.local/share/applications/
|
||||||
|
|
||||||
create desktop entry like others
|
create desktop entry like others
|
||||||
|
|
||||||
## mysql
|
## mysql
|
||||||
|
|
||||||
sudo mysql # connect to mysql as root
|
sudo mysql # connect to mysql as root
|
||||||
create database [db_name];
|
create database [db_name];
|
||||||
grant all privileges on mydb.* to user@localhost;
|
grant all privileges on mydb.* to user@localhost;
|
||||||
grant all privileges on mysql.* to user@localhost;
|
grant all privileges on mysql.* to user@localhost;
|
||||||
flush priviliges;
|
flush priviliges;
|
||||||
|
|
||||||
## ncdu: disk usage
|
## ncdu: disk usage
|
||||||
|
|
||||||
|
|
||||||
## baloo
|
## baloo
|
||||||
|
|
||||||
balooctl # control baloo
|
balooctl # control baloo
|
||||||
baloosewarch [search] #search for files/folders
|
baloosewarch [search] #search for files/folders
|
||||||
|
|
||||||
## nbfc: Fan Control
|
## nbfc: Fan Control
|
||||||
|
|
||||||
## thermald: CPU Frequency Scaling
|
## thermald: CPU Frequency Scaling
|
||||||
|
|
||||||
|
|
||||||
## Vim-Plug
|
## Vim-Plug
|
||||||
|
|
||||||
:PlugInstall # install plugins
|
:PlugInstall # install plugins
|
||||||
:PlugClean # clean .vim/plugged directory
|
:PlugClean # clean .vim/plugged directory
|
||||||
|
|
||||||
## remoteit
|
## remoteit
|
||||||
|
|
||||||
|
|
||||||
# screen
|
# screen
|
||||||
|
|
||||||
screen -S [session_name] start named screen session
|
screen -S [session_name] start named screen session
|
||||||
screen -S [session_name/pid] reattach
|
screen -S [session_name/pid] reattach
|
||||||
screen -S [session_name] -d -m [command] run command in detached session
|
screen -S [session_name] -d -m [command] run command in detached session
|
||||||
screen -ls list screens
|
screen -ls list screens
|
||||||
ctrl+a d detach from session
|
ctrl+a d detach from session
|
||||||
|
|
||||||
## mpc
|
## mpc
|
||||||
|
|
||||||
mpc add http://host:port add stream
|
mpc add http://host:port add stream
|
||||||
mpc del [num] (0 indexed) delete from queue
|
mpc del [num] (0 indexed) delete from queue
|
||||||
mpc play play (lol)
|
mpc play play (lol)
|
||||||
mpc toggle
|
mpc toggle
|
||||||
|
|
||||||
## pdfjam
|
## pdfjam
|
||||||
|
|
||||||
pdfjam [files] --outfile [file]
|
pdfjam [files] --outfile [file]
|
||||||
|
|
||||||
|
## nvidia-smi
|
||||||
|
|
||||||
|
nvidia-smi reads temps directly from GPU without need for X server
|
||||||
|
|
||||||
|
## mycli
|
||||||
|
|
||||||
|
mycli -h <host> -u <user> mysql command-line client with autocompletion
|
||||||
|
|
||||||
|
## Editing remote files in Vim with SSH
|
||||||
|
|
||||||
|
[github gist](https://gist.github.com/sloanlance/f481b7b8ffc0bfa3f46a1c942c7e7b78)
|
||||||
|
|
||||||
|
ssh -MNv kyasuda@dc1vsjobrunner03.westlakefinancial.com
|
||||||
|
vim scp://kyasuda@dc1vsjobrunner03.westlakefinancial.com//home/kyasuda/modules/logger.py
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
## ncmpcpp.
|
## ncmpcpp.
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
#ncmpcpp_directory = ~/.config/ncmpcpp
|
ncmpcpp_directory = ~/.config/ncmpcpp
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other
|
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other
|
||||||
|
@ -8,14 +8,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
configuration {
|
configuration {
|
||||||
font: "FantasqueSansMono Nerd Font 40";
|
font: "FantasqueSansMono Nerd Font 10";
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
icon-theme: "Papirus";
|
icon-theme: "Flattery-Dark";
|
||||||
display-drun: "";
|
display-drun: "";
|
||||||
drun-display-format: "{name}";
|
drun-display-format: "{name}";
|
||||||
disable-history: false;
|
disable-history: false;
|
||||||
sidebar-mode: false;
|
sidebar-mode: false;
|
||||||
markup: true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@import "styles/colors.rasi"
|
@import "styles/colors.rasi"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
configuration {
|
configuration {
|
||||||
font: "FantasqueSansMono Nerd Font 10";
|
font: "FantasqueSansMono Nerd Font 8";
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
icon-theme: "Papirus";
|
icon-theme: "Papirus";
|
||||||
display-drun: "";
|
display-drun: "";
|
||||||
@ -35,7 +35,7 @@ prompt {
|
|||||||
padding: 0% 1% 0% 0%;
|
padding: 0% 1% 0% 0%;
|
||||||
background-color: @background;
|
background-color: @background;
|
||||||
text-color: @foreground;
|
text-color: @foreground;
|
||||||
font: "FantasqueSansMono Nerd Font 12";
|
font: "FantasqueSansMono Nerd Font 10";
|
||||||
}
|
}
|
||||||
|
|
||||||
entry {
|
entry {
|
||||||
|
@ -9,4 +9,4 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@import "Cyan.rasi"
|
@import "Black.rasi"
|
||||||
|
@ -19,7 +19,8 @@ updates="$((updates_arch + updates_aur))"
|
|||||||
|
|
||||||
if [ "$updates" -gt 0 ]; then
|
if [ "$updates" -gt 0 ]; then
|
||||||
#echo " ($(format $updates_arch)/$(format $updates_aur))"
|
#echo " ($(format $updates_arch)/$(format $updates_aur))"
|
||||||
echo " ($(format $updates_arch)/$(format $updates_aur))"
|
# echo " ($(format $updates_arch)/$(format $updates_aur))"
|
||||||
|
dunstify " Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user