terminal

How can I reset the default project hosting with firebase?

让人想犯罪 __ 提交于 2021-02-07 07:31:36
问题 I have been using firebase to test apps. I set a certain project as the default. Now I would like to deploy a different project but do not understand how to remove the previous project as a default. (I have almost no experience using the terminal). 回答1: You can change the default project that the Firebase CLI uses in a directory by running: firebase use --add Then in the list of projects, select your project. And then finally for the alias name enter default (or whatever you entered before).

Open a terminal window to a specified folder from a Cocoa app

≯℡__Kan透↙ 提交于 2021-02-07 05:51:40
问题 I have seen this thread on how to execute terminal commands from within a Cocoa app. But I want to actually launch Terminal.app to a specified directory. I know that the following does not work: [[NSWorkspace sharedWorkspace] openFile:folderPath withApplication:@"Terminal"]; Terminal tries to actually open the folder as a file. Is this something I have to use AppleScript for? Any ideas? 回答1: You could use AppleScript from Cocoa like this: NSString *s = [NSString stringWithFormat: @"tell

ANSI questions: “\x1B[?25h” and “\x1BE”

独自空忆成欢 提交于 2021-02-06 19:56:56
问题 What does "\x1B[?25h" do? How is "\x1BE" different from "\n" ? According to http://ascii-table.com/ansi-escape-sequences-vt-100.php it " moves to next line "? Seems like that's what "\n" does? I tried echo "xxx\nxxx\n" and echo "xxx\x1BExxx\n" in PHP and they both output the same thing. Any ideas? Thanks! 回答1: These are ANSI escape sequences (also known as VT100 codes) are an early standardisation of control codes pre-dating ASCII. The escape sequence \x1BE , or Esc + E , is NEL or "Next line

“pod init” giving error “-bash: pod: command not found”

南楼画角 提交于 2021-02-06 07:05:05
问题 I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found". I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks. 回答1: Looks like you didn't install CocoaPods. To do that you install it through ruby

“pod init” giving error “-bash: pod: command not found”

一笑奈何 提交于 2021-02-06 06:55:47
问题 I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found". I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks. 回答1: Looks like you didn't install CocoaPods. To do that you install it through ruby

How do you connect your terminal with the Android emulator

可紊 提交于 2021-02-05 20:27:51
问题 I have tried the navigate to the android tool folder and entering the "adb shell" command but it doesn't seem to work. My terminal seems only to recognize the adb part of the command and gives me an error message. What am I doing wrong??? 回答1: List all connected devices by typing adb devices Check, if there are any devices listed. If not you may want to check that your device is connected and/or your emulator is running. If it works and you have for example your emulator running and your usb

python: can't open file in macbook terminal - [Errno 2]!

▼魔方 西西 提交于 2021-02-05 10:50:49
问题 In my macbook air terminal I wrote python eggshell.py but I got this error python: can't open file 'eggshell.py': [Errno 2] No such file or directory s-user:/ user$ After I got that error I tried a number of things, like specifying exactly were eggshell.py is: python Users/myuser/Eggshell/eggshell.py Doing that just gave me a different Errno 2 error: OSError: [Errno 2] No such file or directory: 'modules/commands/macOS' If you have anything that can help me figure this out, I'd be incredibly

python: can't open file in macbook terminal - [Errno 2]!

久未见 提交于 2021-02-05 10:50:28
问题 In my macbook air terminal I wrote python eggshell.py but I got this error python: can't open file 'eggshell.py': [Errno 2] No such file or directory s-user:/ user$ After I got that error I tried a number of things, like specifying exactly were eggshell.py is: python Users/myuser/Eggshell/eggshell.py Doing that just gave me a different Errno 2 error: OSError: [Errno 2] No such file or directory: 'modules/commands/macOS' If you have anything that can help me figure this out, I'd be incredibly

Permission denied on cat via shell script [duplicate]

一个人想着一个人 提交于 2021-02-05 08:18:58
问题 This question already has answers here : How do I set a variable to the output of a command in Bash? (14 answers) Closed 4 years ago . I have an issue with running cat in shell script on a log file which is in ~/bin/rclone_sync_ACD.log. This is the line in the shell script: RESULT=cat $LOGFILE | tail -1 But when running the script I get: ./rclone_sync: line 63: /Users/pjburnhill/bin/rclone_sync_ACD.log: Permission denied In terminal, if I type cat $LOGFILE | tail -1 , it gives the right

Permission denied on cat via shell script [duplicate]

点点圈 提交于 2021-02-05 08:18:06
问题 This question already has answers here : How do I set a variable to the output of a command in Bash? (14 answers) Closed 4 years ago . I have an issue with running cat in shell script on a log file which is in ~/bin/rclone_sync_ACD.log. This is the line in the shell script: RESULT=cat $LOGFILE | tail -1 But when running the script I get: ./rclone_sync: line 63: /Users/pjburnhill/bin/rclone_sync_ACD.log: Permission denied In terminal, if I type cat $LOGFILE | tail -1 , it gives the right