If you have Mac system and created bash scripts so far, there is a fun feature on OS X that you can type
Or let's say you have a bash script that will take a lot of time and at the end of the script your want to hear
#osx #say #command #fun
say
command. say
will say the phrase:say hello channel users
Or let's say you have a bash script that will take a lot of time and at the end of the script your want to hear
operation done successfully
from your speaker:say operation done successfully
#osx #say #command #fun
There is a command in osX called
The great thing about this command is that you can open finder when you have traversed a long path and now you want it to have inside of finder. Go to the desired directory in your terminal using
it will open you finder. :)
#osx #open #command #fun #trick
open
that will open finder for you from within of your terminal.The great thing about this command is that you can open finder when you have traversed a long path and now you want it to have inside of finder. Go to the desired directory in your terminal using
cd
then use:open .
it will open you finder. :)
#osx #open #command #fun #trick
How do I remove the passphrase for the SSH key without having to create a new key?
I set a passphrase when creating a new SSH key on my laptop. But, as I realise now, this is quite painful when you are trying to commit (Git and SVN) to a remote location over SSH many times in an hour.
This will then prompt you to enter the keyfile location, the old passphrase, and the new passphrase (`which can be left blank to have no passphrase`).
If you would like to do it all on one line without prompts do:
You might want to consider using
#id_rsa #ssh #passphrase #keygen #linux #osx #remove_passphrase
I set a passphrase when creating a new SSH key on my laptop. But, as I realise now, this is quite painful when you are trying to commit (Git and SVN) to a remote location over SSH many times in an hour.
$ ssh-keygen -p
Enter file in which the key is (/Users/my_username/.ssh/id_rsa):
Enter old passphrase:
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.
This will then prompt you to enter the keyfile location, the old passphrase, and the new passphrase (`which can be left blank to have no passphrase`).
If you would like to do it all on one line without prompts do:
$ ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
NOTE:
Beware that when executing commands they will typically be logged in your ~/.bash_history
file (or similar) in plain text including all arguments provided (i.e. the passphrases in this case). It is therefore is recommended that you use the first option unless you have a specific reason to do otherwise.You might want to consider using
ssh-agent
, which can cache the passphrase for a time. The latest versions of gpg-agent
also support the protocol that is used by ssh-agent
.#id_rsa #ssh #passphrase #keygen #linux #osx #remove_passphrase
https://electron.atom.io/
Build cross platform desktop apps with JavaScript, HTML, and CSS
#multi_platform #cross_platform #css #js #electron #osx #windows #linux #desktop #application
Build cross platform desktop apps with JavaScript, HTML, and CSS
#multi_platform #cross_platform #css #js #electron #osx #windows #linux #desktop #application
In case you want to add a custom font to
reference: https://support.apple.com/en-us/HT201722
#apple #osx #font #fonts
OS X
, you need to go to /Library/fonts
and paste your custom fonts in this folder. No need to restart or logout.reference: https://support.apple.com/en-us/HT201722
#apple #osx #font #fonts
Apple Support
Mac OS X: Font locations and their purposes
Mac OS X has multiple Fonts folders. Where you install a font determines who can use it and when.
diff
command is usually used to get differences between two files:diff file1.py file2.py
Interesting part of this is that we can even get the differences between to folders, which differ in some files:
diff -bur folder1 folder2
b
flag means ignoring whitespace.u
flag means a unified context (3 lines before and after).r
flag means recursive.#linux #osx #diff
https://stackoverflow.com/questions/22163102/you-have-mail-message-in-terminal-os-x
#osx #mac #mail #iterm #terminal
#osx #mac #mail #iterm #terminal
Stack Overflow
"You have mail" message in terminal, os X
Few days ago I got this message in my terminal window:
What does that mean? I've never seen that before.
That was messages from xCode bots.
Thanks for the help.
What does that mean? I've never seen that before.
That was messages from xCode bots.
Thanks for the help.
One of the issues you always face with postgres on new systems is pg_config error. If you don't want to install postgres and willing to have postgres library in Pytho operational:
1. brew install libpq
2. xcode-select --install
3. echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc
4. env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip3 install psycopg2
#osx #libpq #pg_config #postgres #postgresql #xcode
1. brew install libpq
2. xcode-select --install
3. echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc
4. env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip3 install psycopg2
#osx #libpq #pg_config #postgres #postgresql #xcode