Friday, May 15, 2020

Uploading file from difficult paths in mac

We all know Mac does not show the path like windows. This makes things a little difficult in cases where browser does not support simply dropping the file on tab to upload it. Here is a simple trick to do something like windows in mac.


Go to the folder and copy the folder location to clipboard using Action button.


Press command shift G when you are in open dialog box

Now paste the folder path you copied in your clipboard

Tada! Now you are in the pasted path folder to select and upload in browser.

abcdef

1,2,3,4,5,6,7,8,9;
1,2,3,4,5,6,7,8,9;
1,2,3,4,5,6,7,8,9;

Thursday, May 14, 2020

Gumaan

जिन्हे इतना गुमा है
अपनी रईसी पर
एक दिन उन्हें भी पता चलेगा
बने तो वो भी मिट्टी के ही है ।

Wednesday, May 13, 2020

00000000001

1,2,3,4,5,7,8,9;
1,2,3,4,5,7,8,9;
1,2,3,4,5,7,8,9

Friday, May 8, 2020

My efforts to run c# on visual studio code in mac


Note: This is a work still in progress. I have managed to remove some errors faced but still not able to run the csharp code on Visual Studio code in Mac yet.




1. After installing Omnisharp plugin on visual studio to run c sharp code

It asked to install dot net core on mac directing to microsoft website

The following was installed at /usr/local/share/dotnet
• .NET Core SDK 3.1.201
• .NET Core Runtime 3.1.3
• ASP.NET Core Runtime 3.1.3


2. Installed scriptcs for the first error encountered

brew install scriptcs
To use the assemblies from other formulae you need to set:
  export MONO_GAC_PREFIX="/usr/local"


3. Still was unable to execute csharp code somebody told to modify settings.json by adding following details


settings.json

  "code-runner.executorMap": { "csharp": "scriptcs -script" }


4. To be continued

Wednesday, May 6, 2020

Show full path in sublime text title bar


I would like to see the complete path to file on Sublime Text Title Bar - if you would also like that then come along... :)


Go to Sublime Text -> Preferences -> Settings -> User tab
and add the following line
"show_full_path": true
Tada! Now Sublime Text will show you the complete file path in title bar


Example of my preferences that I have kept
{
 "color_scheme": "Packages/Color Scheme - Default/Mariana.sublime-color-scheme",
 "open_files_in_new_window": false,
 "theme": "Default.sublime-theme",
 "word_wrap": true,
 "show_full_path": true
}

Monday, April 27, 2020

Changing XCode to create .h files instead of .hpp files

When we create files in C++ project in XCode It results in creation of .hpp files which are not used as much as .h files

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/C++\ File.xctemplate/WithHeader

Change permission of ___FILEBASENAME___.hpp to edit it using the below command
sudo chmod 666 ___FILEBASENAME___.hpp


Now open the file ___FILEBASENAME___.hpp in nano by using the below command on terminal
nano ___FILEBASENAME___.hpp

Replace hpp in file with h
Press Ctrl + O to overwrite and save the file
Press Ctrl + X to exit nano

cd ..

Change folder permissions to allow to rename file
sudo chmod -R ugo=rwx WithHeader/

Finally rename file
mv ___FILEBASENAME___.hpp ___FILEBASENAME___.h

Similarly for ___FILEBASENAME___.cpp we need to replace hpp with h

sudo chmod 666 ___FILEBASENAME___.cpp
nano ___FILEBASENAME___.cpp

 Replace hpp in file with h
Press Ctrl + O to overwrite and save the file
Press Ctrl + X to exit nano


Tada! Relaunch Xcode to get .h files on creating .cpp files in project