flash disc

Share file from Windows to Mac OS

How to share file from windows to Mac

If you are working on windows and you want to share the file to mac, follow this simple steps to get the work done.

The first is to go to your mac and enable the file sharing. I would do this temporarily so that it won’t be opened all the time, this is for security purpose

How to allow sharing file in mac

  1. Go to  settings in mac
  2. Go to sharing
  3. Check the file sharing options

How to connect to mac from windows.

Before you do this, you will need to get the ip address of the mac computer that you will be using it later in windows connection.

How to get IP address of the the computer on mac

Open a terminal using either of the following methods:

  • Go to finder
  • Select Applications under favorites, if you don’t see it, go to finder menu on the top next to the apple icon while the finder is active, select preferences and check Applications
  • In the applications, go to Utilities and select terminal

Or

  • Hold command and hit space
  • type terminal
  • select the terminal

Once you get the terminal in either ways, then type the following command in the terminal

ifconfig

From the result, look for inet and that shall be your ip address ( this time it has to be the local one)

Connecting to mac from windows

On windows, on the search bar, type run

When you get the input box type \\ip-address-here

This creates anther window where you have to enter the username and password of the mac computer. That will connect you to the mac computer.

 

node js on mac machine

Update Node and npm on mac OSX

How to completely remove Node and reinstall it

It might be a bit annoying to uninstall stuff. But sometimes you gotta do it.

To uninstall node completely from your machine:
brew uninstall --ignore-dependencies npm

This will handle the issue you may have with dependencies. If you have other modules like yarn or jhipster on your machine, they are dependent on node and uninstalling might not come easy.

To uninstall node in a more aggressive way:
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*

how to install node, npm (node package manager) on Mac OSX

It is rather simple. Just go to https://nodejs.org and download and follow the steps.

pass all the jars in classpath when compiling java

How to pass multiple jar files while using javac – compiling java classes

If you have single jar file, you can pass as: lets assume you are compiling file.java

javac path/to/file.java -classpath "path/to/jar/file.jar" -d classpath

But how about if you have multiple jar files to be included in the class path?

If you are on windows you can list the jar files separated by semi colon(;) and in unix you can pass with colon(:)

javac path/to/java/file.java -classpath "file1.jar:file2.jar:dir/*"

The last example is for unix environment but you can apply it to windows with proper path and semicolon

find and replace in vi vim

Search and replace in vim

Find and replace text strings in vim file

It is one of the most frequent task you might do while working on vim.

Here are some of the most used ones

1. Find and search a single string and replace the first occurrence only
:s/search/replace/g

The above code would search for “search” and replaces it with “replace” and it would do it only once

2. Find all occurrences of the string and replace those
:%s/search/replace/g

In this case all strings in the file with “search” would be replaced by “replace”

3. Find and ask for confirmation before changing it
:%s/search/replace/gc

It would do the usual task but this time it would ask for confirmation before it changes it.

You can do search and replace in vi or vim using the above command being on vim. Don’t forget to be out of the update mode otherwise you would just be writing the above commands.

Screen Shot 2016-04-10 at 7.49.57 PM

install composer and make it globally accessible

Unless you have been living under rocks, you have heard about composer already. It is a dependency manager and more than that actually. If your PHP app is using a lot of dependencies, then it is time to consult composer.

Here I will put some notes on how to install it and make it available globally so that you can use it from any directory.

First thing first, go and grab the phar file from composer download page

It would be a single phar file and u can use that as it is:

composer.phar install

Of course you would need the composer.json file for the above to work where you would list the dependencies.

But, this would require you to call the phar from where you downloaded and that might not be handy

cd /to/composer/phar/file
sudo mv composer.phar /usr/local/bin/composer

Now, you can call composer from any directory and rock from there
get more @ get composer
That is how you install composer on linux/mac computer and make it globally accessible with in

graphs

Mac Numbers document to Excel

Starting to play with the mac numbers app that comes with my mac, and after doing my spreadsheet, pretty much the same as excel so far, i want to share it and the standard being xls file, I figured how to do that.

Go to file menu on the number application and select the export to => Excel. export-to-excel

The rest is history after that.. I like how neat the number app is so far, I will try to see how it is flexing its muscles over the giant excel as I have a lot to do on that..

By the way, I have been a great fan of apaches open office just check it out.

 

Screen Shot 2016-03-29 at 4.59.26 AM

Get your filezilla password from your mac

Yeah, FileZilla, the major FTP software would put the passwords along with your username,  host  and other info in your computer directory.

So if you lost your FTP credentials and you have been using FileZilla, you can simply retrieve or assist you remember it.

Just go ahead and open options menu from FileZilla, on Mac computer, you can get this by clicking on the FileZilla menu, and look for settings directory and there you would get xml files containing your credentials.

You can grab and use it. In the meantime, if your computer is accessed by others, also know that they can access your FTP information from there.

Screen Shot 2016-03-29 at 4.59.26 AM

Adding an app to Launchpad in Mac

Hey, did you end up having an app that won’t be added to the launchpad, aka applications on mac?

The example could be Filezilla. When you download and try to launch it by double clicking it will start but you might not get it on the applications folder and you won’t see it in the lauchpad.

The fix? it is way easier that you think. Just copy the app you want to be added, say the Filezilla, and just paste it in the Applications folder. You can access the applications folder by directly going to Finder.

Enjoy!

Mount to NSF Server timed out on Vagrant

I had a bit rough weekend :( after successful update of some packages and successful breakage of my guest machine aka vagrant.
The thing is my symfony app is running on vagrant and all of a sudden I can’t ssh or after halt I can’t vagrant up – it is giving me the mount to NFS server timed out

This has something to do, unfortunately, with the firewall setting. After the guest and the host are two, at least technically, machines and firewall decided to block the packets for some of the host machine applications.

You can comb those needed for it by looking from the list of the firewall..
On Mac => go to System Preferences and click on Security and Privacy and Turn off the firewall to make sure the issue is associated with it and then you can turn it back with applications related to virtual host to accept all the incoming traffic.

t h a t i s IT

:insert not working for pasting on Vim editor

I will not explain how useful vim is, if you a developer on the *nix systems, then that is number one tool to tuck into your toolbox.

Now you want to paste huge text into vim and it looks all wacky, and the insert mode is not handling it.. here is what you would do..

Open your vim with

vi filename.ext

then do

:set paste

This will allow your vim to be in the paste mode and you can dump all you have without any problem then change the mode using esc and save it as :w