| Action | tmux | screen |
|---|---|---|
| start a new session | tmux tmux new tmux new-session |
screen |
| start a new session with a name | tmux new -s name | screen -S name |
| re-attach a detached session | tmux attach tmux attach-session |
screen -r |
| re-attach a detached session with a name | tmux attach -t name tmux a -t name |
screen -r name |
| re-attach an attached session (detaching it from elsewhere) | tmux attach -dtmux attach-session -d | screen -dr |
This file contains hidden or 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
| # command: source | |
| # Allow autocomplete for conda environments | |
| _complete_source_activate_conda(){ | |
| if [ ${COMP_WORDS[COMP_CWORD-1]} != "activate" ] | |
| then | |
| return 0 | |
| fi | |
| local cur=${COMP_WORDS[COMP_CWORD]} | |
| COMPREPLY=($(ls ~/anaconda3/envs | xargs -I dirs bash -c "compgen -W dirs $cur")) |
This file contains hidden or 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
| # This functionality has been tested and a PR has been pulled with phyloseq here: | |
| # https://github.com/joey711/phyloseq/pull/854 | |
| # | |
| # While the function has been vetted, the maintainers are very busy and the PR has not | |
| # yet been added to the main package. Below i've added some detail to explain how to parse | |
| # your silva data. It's quite easy.... | |
| source("parse_silva_taxonomy_128") |
This file contains hidden or 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
| [[runners]] | |
| name = "gce-main-scal" | |
| url = "" | |
| token = "" | |
| executor = "docker+machine" | |
| # 最大伸缩量 | |
| limit = 3 | |
| [runners.docker] | |
| tls_verify = false | |
| image = "ubnutu:16.04" |
This file contains hidden or 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
| # Save this in ~/.screenrc | |
| # Use bash | |
| shell /bin/bash | |
| autodetach on | |
| # Big scrollback | |
| defscrollback 5000 |
This file contains hidden or 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 -e | |
| # see related issue: https://github.com/rundeck/rundeck/issues/357 | |
| # export required vars | |
| export RD_URL=http://localhost:4440 RD_USER=admin RD_PASSWORD=admin RD_HTTP_TIMEOUT=300 | |
| # make sure rd & jq commands are in the PATH | |
| which -- rd jq >/dev/null | |
| del_executions() { |
This file contains hidden or 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
| add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 ); | |
| function new_loop_shop_per_page( $cols ) { | |
| // $cols contains the current number of products per page based on the value stored on Options -> Reading | |
| // Return the number of products you wanna show per page. | |
| $cols = 9; | |
| return $cols; | |
| } |
This file contains hidden or 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 | |
| # Copyright © 2017 Google Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
| body { | |
| width: 100%; | |
| height: 100%; | |
| margin: 0; | |
| padding: 0; | |
| background-color: #FAFAFA; | |
| font: 12pt "Tahoma"; | |
| } | |
| * { | |
| box-sizing: border-box; |
Custom format for displaying bytes as kb, mb, gb or tb.
Response to a few places on the internet: https://productforums.google.com/forum/#!topic/docs/x_T_N-yRUYg And here: https://stackoverflow.com/questions/1533811/how-can-i-format-bytes-a-cell-in-excel-as-kb-mb-gb-etc
Here is one that I have been using:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
OlderNewer