terminal

Homebrew installation on Mac OS X Failed to connect to raw.githubusercontent.com port 443

喜你入骨 提交于 2020-03-17 05:58:25
问题 When I try to install Homebrew, I am getting following connection refused error. Please help me to solve this problem. $ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused 回答1: Works for me. Unless its a real problem with github, which it may be but I'm going to guess that its not, its probably a problem with your connection. Can you get to the same URL via a browser?

How to reload Google Chrome tab from terminal?

ぃ、小莉子 提交于 2020-03-17 05:55:09
问题 Is there a way to reload a Google Chrome tab in Ubuntu using just the terminal. I don't want to just open a new window, but to actually refresh a tab! Extra question: Is this possible in other browsers as well such as Opera, Safari, Firefox. 回答1: Looks like user2974830's answer is using some incorrect (perhaps old) syntax for xdotool. --search is supposed to be just search (without the dashes) and --windowid is supposed to be --window That being said here's a more comprehensive solution that

Terminal error: zsh: permission denied: ./startup.sh

被刻印的时光 ゝ 提交于 2020-03-15 20:54:17
问题 I am running a command ./startup.sh nginx:start and I am getting this error message zsh: permission denied: ./startup.sh why could this be happening? 回答1: Be sure to give it the execution permission. cd ~/the/script/folder chmod +x ./startup.sh 回答2: Alternatively you can use bash: bash startup.sh Then you don't need execution permission. In MacOS Catalina, Apple has replaced bash with zsh as default shell. This can mean, that they intend to remove bash in the future, so this might not be an

Terminal error: zsh: permission denied: ./startup.sh

眉间皱痕 提交于 2020-03-15 20:49:50
问题 I am running a command ./startup.sh nginx:start and I am getting this error message zsh: permission denied: ./startup.sh why could this be happening? 回答1: Be sure to give it the execution permission. cd ~/the/script/folder chmod +x ./startup.sh 回答2: Alternatively you can use bash: bash startup.sh Then you don't need execution permission. In MacOS Catalina, Apple has replaced bash with zsh as default shell. This can mean, that they intend to remove bash in the future, so this might not be an

How to customize vim key bindings outside vim (eg: terminal)?

别等时光非礼了梦想. 提交于 2020-03-06 09:31:50
问题 In my vim editor, I have remapped some of the actions, as I don't like their default key bindings. (For example, I use Ctrl h/l to go to the beginning/end of the line instead of 0/$, as the former bindings are much easier to use.) I am also using vim binding in my terminal (bash and tmux) and some commands like "less" use vim bindings as well. My customization doesn't work there, so I need to remember my custom as well as the default key bindings, which is pretty inconvenient. How can I

How to customize vim key bindings outside vim (eg: terminal)?

笑着哭i 提交于 2020-03-06 09:31:24
问题 In my vim editor, I have remapped some of the actions, as I don't like their default key bindings. (For example, I use Ctrl h/l to go to the beginning/end of the line instead of 0/$, as the former bindings are much easier to use.) I am also using vim binding in my terminal (bash and tmux) and some commands like "less" use vim bindings as well. My customization doesn't work there, so I need to remember my custom as well as the default key bindings, which is pretty inconvenient. How can I

Command for dropping a specific MySQL database [closed]

跟風遠走 提交于 2020-03-06 09:28:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . In phpmyadmin, we can drop a specific database from operation tab and by hitting "DROP THE DATABASE (DROP)". But I need to drop a specific database using command prompt or terminal. 回答1: Use mysqladmin like mysqladmin -uroot -pyourpassword drop database_name In this case User: root with password: yourpassword

Command for dropping a specific MySQL database [closed]

*爱你&永不变心* 提交于 2020-03-06 09:27:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . In phpmyadmin, we can drop a specific database from operation tab and by hitting "DROP THE DATABASE (DROP)". But I need to drop a specific database using command prompt or terminal. 回答1: Use mysqladmin like mysqladmin -uroot -pyourpassword drop database_name In this case User: root with password: yourpassword

what is the use of parentheses in linux command [duplicate]

与世无争的帅哥 提交于 2020-03-06 04:52:12
问题 This question already has answers here : What does it mean in shell when we put a command inside dollar sign and parentheses: $(command) (2 answers) Closed 22 days ago . I run following command in Linux terminal. Can anyone tell me what is the use of parentheses in Linux terminal and following command also ? $(echo "GET / HTTP/1.0";echo "Host: www.google.com"; echo) | nc www.google.com 80 回答1: ( list ) Placing a list of commands between parentheses causes a subshell environment to be created,

How to execute Mysql Script in golang using exec.Command

北城余情 提交于 2020-03-03 07:42:19
问题 Hi i am trying to execute a script to fill data into a database using Golang func executeTestScript(){ cmd := exec.Command("/usr/local/mysql/bin/mysql", "-h127.0.0.1", "-P3333", "-uusr", "-pPassxxx", "-Ddtb_test", "< /Users/XXX/Documents/test/scripts/olds/SCRIPT_XXX.sql") var out, stderr bytes.Buffer cmd.Stdout = &out cmd.Stderr = &stderr err := cmd.Run() if err != nil { fmt.Println(fmt.Sprintf("Error executing query. Command Output: %+v\n: %+v, %v", out.String(), stderr.String(), err)) log