how to set chrome as default browser of easyphp - easyphp

Guys. how do you configure easyphp to use chrome as the default browser. It keeps using ie when i use local web from the easyphp menu.
I have already tried to configure the apache but cant seem to find the browser option.
Any help would do. Hope someone can point me in the right direction.

It seems that easyPHP uses default system browser. I have Firefox as default so it uses Firefox. If you change default to Chrome it should also work. I don't see any browser setting in easyphp.ini so I believe you cannot change it if Chrome is not your default system browser.

I was looking for the options as well.
I couldn't find any, so I just created this piece of code.
Hope that helps.
Create a new text file with Notepad and name it like start-easyphp.bat
and save it inside the root directory of easyPHP (i.e C:\easyphp\start-easyphp.bat)
Note the file extension .bat
Paste this code inside the file you just created:
#echo off
echo Starting Server...
timeout 3 /nobreak >nul
start EasyPHP-DevServer-14.1VC9.exe
echo Starting a new session...
timeout 5 /nobreak >nul
start chrome http://127.0.0.1
Note: EasyPHP-DevServer-14.1VC9.exe should be replaced with the version you've installed on your machine.
If you use other browser like Firefox use start firefox http://127.0.0.1
For default browser you use start "" http://127.0.0.1
You can create shortcut on your desktop for quick access.
If you have multiple sites/project on the same local server, just targed
**127.0.0.1/my-projects/awesome-project**
Note: http://127.0.0.1 can also be http://localhost

Related

Why is VSCode "Unable to open Extension. An unknown error occurred."?

This is my first time installing and using VSCode, and when I tried installing Prettier extension, it let me peek quickly at the extension page before closing it and displaying this notification (Screenshot attached):
Unable to open 'Extension: Prettier - Code formatter': An unknown error occurred. Please consult the log for more details..
VSCode screenshot: Notification at bottom right
It's doing this with all other extensions. Searched for a solution but found nothing applicable.
Why is this happening and how to fix it?
It happens that, this is a problem with the Egyptian ISPs' default DNS servers, which are most probably blocking some of Microsoft servers.
The solution (in case you live in Egypt):
clear DNS cache using ipconfig /flushdns command on Windows cmd (For Other OS).
change the default DNS servers in your router settings to Google's 8.8.8.8 & 8.8.4.4 (or Cloudflare's 1.1.1.1 or any other DNS server you trust).
restart VSCode and try installing extensions.
Hopefully, everything will work fine by now.
Check this Github issue for more insight.
It probably is because of the certificate check.
Below solution works for me in CentOS 7 (Linux).
Step 1. Change the file /usr/share/applications/code.desktop
Open the file /usr/share/applications/code.desktop,
then modify the Exec value with adding --ignore-certificate-errors before %F:
Exec=/usr/share/code/code --unity-launch --ignore-certificate-errors %F
Save the file with typing sudo in the begining.
Step 2. Close all windows of vs code instances.
Step 3. Back to the terminal, use below command to open VS code:
code --ignore-certificate-errors
Step 4. Click extension button in the left side bar.
Click any extension like "Ruby" by Peng Lv, if the images in the Details page can be seen successfully, perhaps the issue is solved.
Step 5. Try to continue to install the extensions you need.
Just enjoy! May it be helpful for you.
in ubuntu go to settings -> wifi -> click on gear icon -> IP4 -> dns input
and put
8.8.8.8,8.8.4.4
and click apply,
to DNS Resolver Cache open terminal and type:-
sudo systemd-resolve --flush-caches
sudo systemctl restart systemd-resolved
restart your device
For windows
cd "C:\Users\<user>\Appdata\Local\Programs\Microsoft VS Code"
code.exe --ignore-certificate-errors
The solution
clear DNS cache using command on Windows cmd:
ipconfig /flushdns
change the default DNS servers in your router settings to Google's:
8.8.8.8 , 8.8.4.4 >> for IPv4
2001:4860:4860::8888 , 2001:4860:4860::8844 >> for IPv6
This link will guide you how to change the DNS server in windows and mac:
https://www.ionos.com/digitalguide/server/configuration/how-to-change-dns-server/
restart VSCode and try installing extensions.
If you're in a corporate network and it's locked down the one last resort is to manually download the VSIX from the website on a domain that will allow it and then copy over the VSIX and install it.
I got this "XHR failed" error in Visual Studio Code.
So I changed my network settings to use Google Public DNS (instructions)
Finally following instructions (by mohamed-mokhtar) solved for me:
Go to : Control Panel\Network and Internet\Network Connections
Choose your connection network and ( right click on it then choose properties )
Select " Internet Protocol Version 4 (TCP/IPv4) and then click on properties in the bottom of this section
At General section click on " Use the following DNS Server address : "
Make " Preferred DNS server : 8.8.8.8 " (if you face a problem check this)
Make " Alternate DNS server : 8.8.4.4 "
Restart VS code
referring to #Seif A. answer
The solution (in case you live in Egypt)
clear DNS cache using command on Windows cmd:
ipconfig /flushdns
change the default DNS servers in your router settings to Google's:
8.8.8.8 , 8.8.4.4 >> for IPv4
2001:4860:4860::8888 , 2001:4860:4860::8844 >> for IPv6
restart VSCode and try installing extensions.
I faced the same problem while adding new extension in vs code.
I Recognized the problem within the ISP in Egypt, so I changed the DNS in My router to Google DNS Providers , and it works perfectly
Just install a VPN like betternet or any other VPN software and change the country to the USA or try other countries.
In my case I was need to disable work VPN to download extension

Kubectl behind corporative proxy

These days I've been working with kubernetes and kubectl at work, the point is that each time I open a console I have to write:
export http_proxy=http://<username>:<pass>#<proxy>:8080 for unix OS
set http_proxy=http://<username>:<pass>#<proxy>:8080 for windows OS
because my Pc is behind a coorporative proxy.
This is very anoying because i have to write it a lot of time every days.
Is there any way to configure kubectl proxy with a config file or something else?
One option is to add the export line to your .bashrc (or equivalent if you're using another shell) as this is sourced every time you open up a new terminal.
I had this problem some months ago.
What I did to fix this was to start to use iTerm2 (I'm using Mac) and set PROFILES.
You can have 1 profile to work from office and another to work from home, then you can set some commands when you enter the profile: you can set proxies, ssh login.. whatever =)
Hope it helps.

How do I set the default browser for xdg-open on Centos 7 if xdg-settings has no desktop environment

There are many questions similar to mine (e.g. xdg-open not open default browser or xdgutils - xdg-settings not setting default-web-browser in gentoo, but none of the answers helped in my case. Therefor I ask for my particular situation:
On Centos 7 I have no free desktop manager running, I just run some X11 applications (like VS Code) from the command line where the DISPLAY variable is set to the X server on the (Windows) machine I connect from.
On the Centos machine I have two browsers installed, firefox and google-chrome. I can start both browsers just by typing firefox resp. google-chrome in the bash terminal.
xdg-open is available and it opens links in google-chrome - as does VS Code. However I want to change this to firefox.
I tried:
Ticking "Default browser" in Firefox's GUI preferences.
Using xdg-settings, but
xdg-settings get default-web-browser
returns "xdg-settings: unknown desktop environment"
Setting $BROWSER. In bash I issued
export BROWSER=firefox
but still google-chrome is started by xdg-open
How can I set in this environment the default browser to firefox?
Note: Strangely on another machine with Centos 6 (and "no desktop environment" either) the export BROWSER method works!
The desired behavior can be set in the mimeapps.list configuration files described in the XDG MIME Applications specification.
TLDR:
In order to configure firefox as the default browser for your user create ~/.config/mimeapps.list containing the following lines:
[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
Details:
xdg-utils like xdg-open(1) and xdg-mime(1) look for this file in the locations listed under the File name and location section of this specification:
$XDG_CONFIG_HOME/$desktop-mimeapps.list user overrides, desktop-specific (for advanced users)
$XDG_CONFIG_HOME/mimeapps.list user overrides (recommended location for user configuration GUIs)
$XDG_CONFIG_DIRS/$desktop-mimeapps.list sysadmin and ISV overrides, desktop-specific
$XDG_CONFIG_DIRS/mimeapps.list sysadmin and ISV overrides
$XDG_DATA_HOME/applications/$desktop-mimeapps.list for completeness, deprecated, desktop-specific
$XDG_DATA_HOME/applications/mimeapps.list for compatibility, deprecated
$XDG_DATA_DIRS/applications/$desktop-mimeapps.list distribution-provided defaults, desktop-specific
$XDG_DATA_DIRS/applications/mimeapps.list distribution-provided defaults
The locations for the $XDG variables are governed by the XDG Base Directory specification. If you want to figure out where xdg-utils are looking for configuration in your particular case, run them with the XDG_UTILS_DEBUG_LEVEL environment variable like so:
$ XDG_UTILS_DEBUG_LEVEL=10 xdg-open 'https://www.example.com'
...
Checking /home/USERNAME/.config/mimeapps.list
...

How to configure VS Code to remember proxy settings (Windows)

I'm a little bit fed up of this window:
I checked the configuration and I added the proxy URL to the http.proxy entry as described here:
"http.proxy": "http://frustratedusername:password#pesky.proxy.com:8080/"
But it didn't work. Then, I tried setting the http_proxy and https_proxy environment variables, but it didn't work neither.
Is there any way to make VS Code remember the proxy settings?
Remembering proxy credential should now be supported, since VSCode 1.51 (Oct. 2020), and confirmed with VSCode 1.52 (Nov. 2020)
Remember proxy credentials#
We are overhauling the login dialog that shows when a network connection requires authentication with a proxy.
A new setting, window.enableExperimentalProxyLoginDialog: true, will enable this new experience that we plan to make the default in a future release.
Theme: GitHub Light
The dialog will appear inside the VS Code window and offer a way to remember the credentials so that you do not have to provide them each time you start VS Code.
Credentials will be stored in the OS standard credential store (keychain on macOS, Windows Credential Manager on Windows, and gnome keyring on Linux).
We still only show this dialog once per session, but might revisit this decision in the future. You will see the dialog appear again in case the credentials you selected to be remembered are not valid. Providing them again allows you to change them.
I tried with proxy switch in the command itself.
Something like this and it worked for me:
node-gyp configure --proxy=http://proxy.server.name:port
Tried with this install nodejs package.
then open command prompt and enter npm commands.
set the proxy using below commands
npm set proxy http://name:password#gtpproxy.proxy.com:8080
npm set https-proxy http://name:password#gtpproxy.proxy.com:8080
npm config set strict-ssl false -g
Note:
Replace name with email
Replace password with the actual password
Replace gtpproxy with the proxy address of the location.
You will have to URL-encode your username and/or password. For example, if your username contains a domain, like e.g. DOMAIN\username, you'll have to URL-encode the backslash. Thus, you need to use DOMAIN%5Cusername. The same goes for your password, URL-encode each and every non-ascii character.

Why is MAMP so slow to apply any change on my local dev sites?

I'm using MAMP (free version) to develop a website locally and it takes about 1 minute to apply any change (for instance, variable declaration). It takes the same time on Firefox, Safari or Chrome even if I load the page without the cache (CMD+SHIFT+R or SHIFT+refresh). Working with the "localhost/" url instead of a virtualhost doesn't change anything…
Does anybody have the same issue and have a solution?
To fix it try this: in your hosts file you need to list all your local dev sites in a space delimited row like so...
127.0.0.1 localhost localsite1.dev localsite2.dev localsite3.dev