I have a problem with it when i use Powerlevel10k which is a theme for ZSH? - oh-my-zsh

I have a problem with it when i use Powerlevel10k which is a theme for ZSH?

From the Powerlevel10k FAQ:
Q: What do different symbols in Git status mean?
When using Lean, Classic or Rainbow style, Git status may look like this:
feature:master ⇣42⇡42 *42 merge ~42 +42 !42 ?42
Legend:
| Symbol | Meaning | Source |
| --------| ------------------------------------------------------------------| ---------------------------------------------------- |
| feature | current branch; replaced with #tag or #commit if not on a branch | git status |
| master | remote tracking branch; only shown if different from local branch | git rev-parse --abbrev-ref --symbolic-full-name #{u} |
| ⇣42 | this many commits behind the remote | git status |
| ⇡42 | this many commits ahead of the remote | git status |
| *42 | this many stashes | git stash list |
| merge | repository state | git status |
| ~42 | this many merge conflicts | git status |
| +42 | this many staged changes | git status |
| !42 | this many unstaged changes | git status |
| ?42 | this many untracked files | git status |
See also: How do I change the format of Git status?
If you've created a Git repository at the root of your home directory to store dotfiles, you probably want to ignore untracked files in it. You can achieve this by executing the following command:
git -C ~ config status.showuntrackedfiles no
This will have several effects:
git status will be faster.
git status won't list 171 untracked files.
?171 will disappear from your prompt.
You can undo the above command with the following command:
git -C ~ config --unset status.showuntrackedfiles
if you don't want to see Git status in your prompt while in home directory, add this parameter to ~/.p10k.zsh:
# Don't display Git status in prompt for Git repositories whose workdir matches
# this pattern.
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
If you don't want to see Git status in your prompt at all, remove vcs from POWERLEVEL9K_LEFT_PROMPT_ELEMENTS array in ~/.p10k.zsh.

Related

Understanding rabbitmqadmin output

I execute rabbitmqadmin -V my_host list bindings command and get besides other the following line:
+-----------------+------------------------------+------------------------------+
| source | destination | routing_key |
+-----------------+------------------------------+------------------------------+
| | my_queque | my_queque |
+-----------------+------------------------------+------------------------------+
How to understand it, is there a binding without a source?

Action 'firebase_app_distribution' not available, run `fastlane actions` to get a full list

❯ bundle exec fastlane run firebase_app_distribution
[✔] 🚀
+------------------------------------+---------+----------------------------------------------------+
| Used plugins |
+------------------------------------+---------+----------------------------------------------------+
| Plugin | Version | Action |
+------------------------------------+---------+----------------------------------------------------+
| fastlane-plugin-badge | 1.1.0 | add_badge |
| fastlane-plugin-versioning_android | 0.1.0 | android_get_version_name android_set_version_code |
| | | android_set_version_name android_get_version_code |
| fastlane-plugin-android_sdk_update | 1.0.0 | android_sdk_update |
+------------------------------------+---------+----------------------------------------------------+
[!] Action 'firebase_app_distribution' not available, run `fastlane actions` to get a full list
I had no problems until 2 weeks ago. I could not find what affect it. does not appear in the list of "Used plugins" I can see the error with this command.
❯ bundle exec fastlane run fenter code hereirebase_app_distribution
I have this in fastlane/Pluginfile >>> gem 'fastlane-plugin-firebase_app_distribution'
and i can see the plugin in tmp-fastlane-ci-bundle/gems/fastlane-plugin-firebase_app_distribution
I have tried the following solutions
❯ sudo gem uninstall fastlane-plugin-firebase_app_distribution
❯ gem install fastlane-plugin-firebase_app_distribution --user-install
these doesn't work
❯ sudo chmod -R a+r /Library/Ruby/Gems/2.6.0/gems/fastlane-plugin-firebase_app_distribution-
0.1.4
chmod: /Library/Ruby/Gems/2.6.0/gems/fastlane-plugin-firebase_app_distribution-0.1.4:
No such file or directory
❯ bundle exec fassudo chmod -R a+r /Library/Ruby/Gems/2.6.0/gems/fastlane-plugin-
firebase_app_distribution-0.1.4
bundler: command not found: fassudo
Install missing gem executables with `bundle install`
A little late but for others that run into this issue: run fastlane add_plugin firebase_app_distribution to add that plugin to fastlane

Generate HTML report with zap-cli

I would like to get a HTML report from the zap-cli. I am able to run these commands, but is there a way to run both in single command
[sb#company.local#sb-test-vm ~]$ zap-cli quick-scan -s xss,sqli --spider -r -e "some_regex_pattern" http://demo.testfire.net/
[INFO] Running a quick scan for http://demo.testfire.net/
[INFO] Issues found: 6
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
| Alert | Risk | CWE ID | URL |
+==================================+========+==========+==================================================================================================================+
| Cross Site Scripting (Reflected) | High | 79 | http://demo.testfire.net/bank/login.aspx |
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
| Cross Site Scripting (Reflected) | High | 79 | http://demo.testfire.net/comment.aspx |
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
| Cross Site Scripting (Reflected) | High | 79 | http://demo.testfire.net/notfound.aspx?aspxerrorpath=%3C%2Fb%3E%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E%3Cb%3E |
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
| Cross Site Scripting (Reflected) | High | 79 | http://demo.testfire.net/search.aspx?txtSearch=%3C%2Fspan%3E%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E%3Cspan%3E |
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
| SQL Injection | High | 89 | http://demo.testfire.net/bank/login.aspx |
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
| SQL Injection | High | 89 | http://demo.testfire.net/bank/login.aspx |
+----------------------------------+--------+----------+------------------------------------------------------------------------------------------------------------------+
[sb#company.local#sb-test-vm ~]$ zap-cli report -o abc.html -f html
[INFO] Report saved to "abc.html"
[sb#company.local#sb-test-vm ~]$ ls -l abc.html
-rw-rw-r--. 1 sb#company.local sb#company.local 58659 Sep 25 16:39 abc.html
[sb#company.local#sb-test-vm ~]$ date
Tue Sep 25 16:39:16 EDT 2018
[sb#company.local#sb-test-vm ~]$
I tried the switches provided but unable to execuete the scan and get the report in a single liner. I am willing to use zap.sh even however I didn't see the option to generate the report in HTML, only XML. any insight on this is appreciated
zap-cli --help
Usage: zap-cli [OPTIONS] COMMAND [ARGS]...
ZAP CLI v0.9.0 - A simple commandline tool for OWASP ZAP.
Options:
--boring Remove color from console output.
-v, --verbose Add more verbose debugging output.
--zap-path TEXT Path to the ZAP daemon. Defaults to /zap or the value
of
the environment variable ZAP_PATH.
-p, --port INTEGER Port of the ZAP proxy. Defaults to 8090 or the value
of
the environment variable ZAP_PORT.
--zap-url TEXT The URL of the ZAP proxy. Defaults to http://127.0.0.1
or the value of the environment variable ZAP_URL.
--api-key TEXT The API key for using the ZAP API if required. Defaults
to the value of the environment variable ZAP_API_KEY.
--help Show this message and exit.
Commands:
active-scan Run an Active Scan.
ajax-spider Run the AJAX Spider against a URL.
alerts Show alerts at the given alert level.
context Manage contexts for the current session.
exclude Exclude a pattern from all scanners.
open-url Open a URL using the ZAP proxy.
policies Enable or list a set of policies.
quick-scan Run a quick scan.
report Generate XML, MD or HTML report.
scanners Enable, disable, or list a set of scanners.
scripts Manage scripts.
session Manage sessions.
shutdown Shutdown the ZAP daemon.
spider Run the spider against a URL.
start Start the ZAP daemon.
status Check if ZAP is running.
EDIT:
I tried this command but the abc.html file wasn't there in the current dir. I did a find but couldn't find abc.html anywhere
zap-cli quick-scan -s xss,sqli --spider -r -e "some_regex_pattern" http://demo.testfire.net/ && zap-cli report -o abc.html -f html
So, next I tried to out these 2 commands in a zap-run.sh script and chmod +x the script and ran it, that DID create the abc.html file. So, thank you
If the big goal is a "single liner", why not just chain the commands?
zap-cli quick-scan -s xss,sqli --spider -r -e "some_regex_pattern" http://demo.testfire.net/ && zap-cli report -o abc.html -f html
If that doesn't suit you then put both commands in a batch file (or shell script) and call that instead.

What is the difference between running npm dedupe in npm2 versus using npm3?

In npm3, it tries to install dependancies in a maximally flat way. But in npm2, we already have the npm dedupe command which seems to also flatten dependancies. If I am already doing npm dedupe with npm2, is there any advantage to using npm3?
I did some research and installed npm3 and it turns out that it seems there is no difference between the two in terms of the dedupe command. The main difference is that when modules are installed in npm3, they will tend to be installed "flat", whereas in npm2 and earlier, they will go below the dependent module in a node_modules directory.
An series of illustrative ASCII diagrams follow.
In npm2 (module A depends on B and C, which both depend on D):
+----A----B----D
|
\
-C----D
After dedupe in both npm2 and npm3, D is moved up to the top level:
+----A----B
| |
| \
| -C
D
In npm3, after npm install, we will see that B and C are also moved up to the top level:
+----A
|
|
|
D
|
|
|
B
|
|
|
C

vir-install virtual machine hang on Probbing EDD

I'm using vir-stall virtual machine, and my command is
virt-install --name=gust --vcpus=4 --ram=8192 --network bridge:br0 --cdrom=/opt/rhel-server-6.2-x86_64-dvd.iso --disk path=/opt/as1/as1.img,size=50 --accelerate
After running the command, it hangs on probing EDD,
- Press the <ENTER> key to begin the installation process.
+----------------------------------------------------------+
| Welcome to Red Hat Enterprise Linux 6.2! |
|----------------------------------------------------------|
| Install or upgrade an existing system |
| Install system with basic video driver |
| Rescue installed system |
| Boot from local drive |
| Memory test |
| |
| |
| |
| |
| |
| |
| |
+----------------------------------------------------------+
Press [Tab] to edit options
Automatic boot in 57 seconds...
Loading vmlinuz......
Loading initrd.img...............................ready.
Probing EDD (edd=off to disable)... ok
ÿ
Previously, I wait a long time, it seems no marching. After I press ctrl + ] and stop it. I find it was running using virsh list, but I cannot console it using virsh concole gust. Any problem and how should I do. Many Thanks
Add the following to your virt-install
--extra-args="console=tty0 console=ttyS0,115200n8 edd=off"
The edd=off is the critical part for this