terminal

How to execute “sudo nvm”?

混江龙づ霸主 提交于 2019-12-11 04:09:25
问题 On my Mac, I want to migrate some packages that require su rights to another node version. I used homebrew to install nvm and now I need to execute sudo nvm or --reinstall-packages will fail. me@MacBook:~$ sudo nvm sudo: nvm: command not found me@MacBook:~$ sudo node -v v5.4.1 me@MacBook:~$ sudo npm -v 3.3.12 me@MacBook:~$ nvm ls -> v5.4.1 v9.6.1 system default -> 5.4.1 (-> v5.4.1) node -> stable (-> v9.6.1) (default) stable -> 9.6 (-> v9.6.1) (default) iojs -> N/A (default) lts/* -> lts

How to color Linux terminal foreground and background text

非 Y 不嫁゛ 提交于 2019-12-11 03:56:50
问题 I am working on a Linux terminal. The terminal foreground and background colors are hard to look at. Is there a way to change the terminal prompt colors and keep the commands (ls) at the same colors? 回答1: How to color the command prompt in the terminal in Linux. This will give you a colored command line and everything else is one color. $ export PS1='\[\033[00;35m\]\u\[\033[00m\]@\[\033[00;35m\]\H\[\033[00m\]:\[\033[00;33m\]\W\[\033[00m\] \$\[\033[00;34m ' If you want to make this change

How to Launch any iPhone application from terminal when usb connected?

為{幸葍}努か 提交于 2019-12-11 03:49:27
问题 In a situation i am stuck to part where i need to launch any iPhone application from terminal . Obvious that it is USB connected . Can anyone help me out ? 回答1: I myself got an answer to my question by investing lot of time. First fetch Identifier ideviceinstaller -l Second copy the Identifier of the app which you want to launch idevicedebug run " App Identifier " That's it here you go . 来源: https://stackoverflow.com/questions/31263515/how-to-launch-any-iphone-application-from-terminal-when

How do I link the environment variable PACKAGE_DIRS to my local, private packages?

不打扰是莪最后的温柔 提交于 2019-12-11 03:41:30
问题 I'm trying to set up an environment variable so that when I'm working on a meteor application, and I want to link a local, private package to my project, meteor will look in a packages directory that I created on my local environment. The first thing I did was to create a packages directory and add a basic test package to it /Users/scotty/Documents/web_apps/meteor_apps/packages/my-package Then I opened up the terminal and typed: nano ~/.bashrc Once inside my bashrc file, I added the following

SSH Curl doesn't work when URL is accessible in browser

懵懂的女人 提交于 2019-12-11 03:37:31
问题 This post is linked with another post of mine ( still unsolved ): Laravel - composer update: Connection refused But I'm making another post about a more specific question. On SSH, on prod server (shared hosting), I go to a specific folder (which contains my website): $ cd /home/user/www/prod/ Then, if I try: $ curl https://larapack.io/packages.json I get: curl: (7) Failed to connect to larapack.io port 443: Connection refused But if I do: $ curl https://packagist.org/packages.json It works.

SQLPlus varchar2 outputs whitespaces

本小妞迷上赌 提交于 2019-12-11 03:35:14
问题 When I query my table like below, the output of the column "NAME" is way too long. I recently changed the data type to VARCHAR2(150) instead of VARCHAR(150) to not save whitespaces. However, the output seems to include (some?) whitespaces anyway. Can anyone clearify what's going on here? Am I looking at whitespaces here, or is the problem only my terminal/console, or can SQLPLUS itself has something to do with it? Using Windows' terminal. SQL> SELECT * FROM SYS.O1_Orders; ID ---------- NAME -

How do I delete certain files in the current directory that doesn't match the given pattern?

青春壹個敷衍的年華 提交于 2019-12-11 03:29:37
问题 using rm *.sh to delete files ending in .sh is easy and understandable. But how do i delete all files in the current directory that does not end in .jar something like rm * -except *.jar 回答1: Try this: find . -mindepth 1 -maxdepth 1 ! -name '*.jar' | sort If you really want to delete all the files in its output, then just do find . -mindepth 1 -maxdepth 1 ! -name '*.jar' -delete You can read the find(1) manual page for more information on this really powerful tool. EDIT: Since the -delete

How do I force jquery terminal to remain the same size?

感情迁移 提交于 2019-12-11 03:27:37
问题 I am using Jquery terminal and it seems pretty cool. I've been looking around for several hours now, and I can't find a way to get the console to remain stationary when text is inputted. Instead, the console increases in size for every line of input that I enter. Does anyone know how to keep a constant size for the terminal, is it a setting I missed or something? I want something like this. 回答1: Add a height option: JS $('#terminal').terminal(function (command, term) { if (command == 'test')

Edit sqlite file from terminal Mac

筅森魡賤 提交于 2019-12-11 03:26:55
问题 I can not find any documents where I can open existing sqlite database file that I made from the terminal on Mac. I want to add some additional rows to the existing database. I probably search for the wrong things, so anything that points me in the right direction is much appriciated. 回答1: If you want to remain in the Terminal, you can open a sqlite3 database using the command sqlite3 [databasename] . From here, you can select rows or insert new ones using SQL commands. If you prefer a GUI,

How to run a java GUI on mac osx after ssh

风流意气都作罢 提交于 2019-12-11 03:26:29
问题 I am using java 1.7.0_67 on mac osx 10.7.5. Here is my hello world gui: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class helloWorld extends JFrame { helloWorld(String title) { this.setSize(500,500); setTitle(title); } public static void main(String[] args) { helloWorld window = new helloWorld("Helloworld"); window.setVisible(true); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } } This runs just fine when i open a mac terminal and type java helloWorld .