I'm trying to pre-setup a new Firefox installation with a custom user.js. However, no profile is made until Firefox is first run, unless you run this command:
Firefox.exe -CreateProfile <NAME>
Problem is, even if this command is run, Firefox will still create and launch with the default-release profile. Is there any way to set a default profile via the command line or by modifying a file?
Solved:
Used Process Monitor to see what it does when changing default profile.
In %APPDATA%\Roaming\Mozilla\Firefox\profiles.ini there's a Default=<Profile Path> line. Replace
<Profile Path> with your desired profile's path, which should be included in that file as well. Ex. Profiles/bd3a3mdf.default-release
Related
I used to work with Anaconda for sometime, now i am trying to install it and facing some issues with Jupyter.eatch time i try to launch Jupyter i get
http://localhost:8892/undefined/tree
And is there a way to change the default browser from Internet Explorer to Google Crome ?
launching from command line
You can type jupyter-notebook.exe --help to get the command line options. The one you are interested in is shown below:
--browser=<Unicode> (NotebookApp.browser)
Default: ''
Specify what command to use to invoke a web browser when opening the
notebook. If not specified, the default browser will be determined by the
`webbrowser` standard library module, which allows setting of the BROWSER
environment variable to override it.
So jupyter-notebook.exe --browser='chrome' should work. You could incorporate this command into a Windows shortcut or consider the alternative below.
changing your config
From the command line type jupyter-notebook.exe --generate-config which will create a config file called jupyter_notebook_config.py located in your C:\Users\<user>\.jupyter directory. Open this file and uncomment the line containing c.NotebookApp.browser. Then set its value to be 'chrome'.
I am new to using Android Studio, also new to using mac os and new to using realm.
My problem is I need to view my realm DB using the realm monitor for mac os, to do that I need to extract the DB file from my emulator using the terminal inside android studio, but I can't because I need to configure the system variables, I tried to do that using the mac os terminal but it didn't work, I searched and tried many tips online but got nothing.
If anyone can give me a detailed step by step guide to do this it will be very appreciated.
edit:
I need to view the realm DB file from my android application, I tried the solution in this link
How to view my Realm file in the Realm Browser?
so I need to extract the realm file from the emulator using the adb command, I tried that using the android studio terminal but could not recognize the adb command, after some research I found this links
Not able to access adb in OS X through Terminal, "command not found"
and
Setting ANDROID_HOME enviromental variable on Mac OS X
So I need to define ANDROID_HOME environment variable and path using mac terminal. I tried that - I opened mac terminal and wrote the following command directly:
export ANDROID_HOME=/Users/apple/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Then I opened the android studio terminal and tried to use adb command but still not found, then reopened mac terminal and wrote the following command: echo $ANDROID_HOME to check the value but I got nothing.
It seems I am missing something here I don't know what it is.
The path of my android sdk file is: /Users/apple/Library/Android/sdk
First Things First
You want to view your database information using Realm Browser.
In order to do so, you will need to extract the .realm file (the file that stores your realm database) from your android phone or emulator.
It seems like you need to define adb in your macOS environmental variables so you will be able to execute the suitable command to extract the file, as mentioned above.
Including adb as an Environmental Variable on macOS
In order to include adb command as an environmental variable you will need to do the following:
First, you need to open Terminal and type open ~/.bash_profile and then press enter.
You will be prompted with the TextEdit app with the .bash_profile file.
You need to add adb to the PATH in that file.
Copy the following to the file and save it (cmd + S):
#set adb:
ADB=/Users/YOUR_USERNAME/Library/Android/sdk/platform-tools
export ADB
#set PATH:
PATH=$PATH:$ADB
export PATH
Close the file, log out from your user (Apple menu => Log out) and then log in again.
In order to check that your PATH now contains the adb command, you can open Terminal and type echo $PATH. Now you should see your adb path as well.
You can also enter an adb command to see if you can run one (such as adb devices).
Extracting the realm File From Your Android Phone/Emulator
Realm Browser doesn't support accessing the existing databases on your device directly from the device itself.
There are three options to view a database on Realm Browser:
Open Realm File
Open Realm URL
Connect to Object Server
If you wish to view an existing database on your device, only the first option is relevant to you in that case. You will need to copy the database from the phone/emulator to your computer so you can view it.
In order to extract the database file from the device, please follow this:
Open Terminal, then navigate to a folder in which you would like to
save the database file. Navigate to that folder using the cd command.
For example, if you wish to save it to a folder "realmDB" on your desktop you need to type cd /Users/YOUR_USERNAME/Desktop/realmDB/.
Then type adb pull /data/data/APPLICATION_ID/files/ .
(where your applicationID can be found inside the build.gradle file under the defaultConfig block)
This will pull all realm files to that folder, where the database file is usually saved under the name default.realm. Now you can open that file using Realm Browser and see your database.
Note that the adb pull will only work on an emulator or on a rooted device.
Another possible solution suggested on one of the links you mentioned on your question is to use Stetho with realm plugin for Stetho in order to view your realm database.
That answer suggested installing and defining Stetho and then viewing the database file through chrome://inspect page under Resources => Web Sql => default.realm instead of viewing it using Realm Browser.
You can try that one too if you don't want to pull your database file for every change you make.
I am having strange problem. I used to run appcfg.py to update my app to appengine but now its not working anymore. When I run this command
C:\Program Files <x86>\Google\google_appengine>appcfg.py update E:\path\myApp\
Its not giving me anything, no error no feedback. Its just back to this line
C:\Program Files <x86>\Google\google_appengine>
Any idea about this issue!
P.S. I'm using Python 2.7. My code is updating through google app launcher but I need to run it from cmd prompt as I will be downloading/uploading appengine stuff which launcher doesn't allow me to do!
Thanks
I still had a little trouble with the instructions. Here's the steps I used to create a batch file to use the Google App Engine download_app with Windows 7.
In my example,
I'll use drive, C:
Default python path will be, C:\Python27\python.exe
GAE path (include "), "C:\Program Files (x86)\Google\google_appengine\appcfg.py"
App ID {your_app_id} will be just your app-id name
{your_app_version} is the "Version:" number in your GAE app.yaml file
I'll create a folder on my Windows 7 desktop and call it GAE_App
The desktop folder path will be C:\Users\{username}\Desktop\GAE_App
{your email} will be the Gmail account connected to your GAE
Right-click on the desktop and select New->Text Document. Open the newly created text document and add the following line of code modified for your setup to the blank text document,
C:\Python27\python.exe "C:\Program Files (x86)\Google\google_appengine\appcfg.py" download_app -A {your_app_id} -V {your_app_version} --email={your email} C:\Users\{username}\Desktop\GAE_App
Save the text document and change the file name to GAE_Download.bat
It's important that the extension now says ".bat" instead of ".txt"
Once finished, click on the batch to execute it. You'll be asked for a password and then the files should download into the GAE_App folder on your desktop. Now, whenever you need to download your files, just click on the batch file.
Not sure why Google didn't simply include this feature with their GAE for Windows software.
I faced the same issue. Here is a simple solution.
Just do this following Steps:
Go to program file where google app engine is installed. Generally It is named as Google.
click on appcfg.py and select open with.. Select "Choose Default Programs".
Select Python from programs and select "Always Use the selected program to open this kind of file" .
Now run the command you should get the results on command line.
For reference click here
Fixed by accessing python lib like that
C:\Python27>python appcfg.py update E:\path\myApp\
Here's a solution that worked for me:
"google_appengine/appcfg.py" update "C:\PATH TO APP
The appcfg.bat that should be used is located **C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\appengine-java-sdk\bin** and not the empty appcfg.bat that for some unknown reason also was here C:\Program Files\Google\Cloud SDK\
Good practice is to add this path to the system variable PATH
This worked for me
Basis
<PATH_TO_PYTHON>python <PATH_TO_APPCFG.PY>appcfg.py -A <PROJECT_INSTANCE_NAME> update app.yaml
Example
X:\Software\Python2.7\python Q:\SOFTWARE\GoogleAppEngineSDK\appcfg.py -A great-1337 update app.yaml
I installed Jenkins om my Snow Leopard laptop. I assigned the user "jenkins" to it's home dir etc. Next, I basically followed this tutorial.
Now, when I run a build, I get an error:
/Users/Shared/Jenkins/Home/jobs/projectname/workspace/build.xml:78: Execute failed: java.io.IOException: Cannot run program "phpmd": error=2, No such file or directory
Also, he gives the same errors for phploc etc.
When I run phpmd on the commandline, everything is fine. Also when I login as user jenkins with "su jenkins" and I try to run the command on the command line, everything is fine too.
I believe the problem is that Jenkins is unable to find the command. Probably because it's not in the /usr/bin dir? I added a .bash_profile file with the export path to /usr/local/bin, but even that doesn't make a difference. So, anyone know what exactly the problem is?
You can see the environment variables (including the PATH) under "System Information" on the page of the slave. You can adjust these variables as well as set tool locations on the slave configuration page. To get to those pages, click on the name of a slave on the main page.
I tried to set the PATH environment variable as described above, ie
"manage nodes"->"[node]"->"configure"
and then "name" PATH and "value" /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
For some reason this did not work - I visited "manage nodes"->"[node]"->"system info"
and the PATH value had not changed and the job continued to not work.
This was with version 1.462 and slave.jar 2.13.
My workaround was to set an explicit path for the tool (git in my case) in the "tool locations" section of the node configuration page.
I kindly suggest to replace your phpmd command by a "echo $PATH" so you can see what's in the PATH in the context where you are starting phpmd.
I'm using the CakePHP Console to download files from we and processed in a database. I'm running the console from inside the "app" directory. But when I'm trying to run the console outside app and by just setting the "-app" parameter for my cron job, it doesn't work.
To be honest, I've had no success using -app parameter. It's like it's not working at all.
By the way, I'm using Windows & Pycron for my cron jobs.
Here's what happens when I'm trying to run the console from D:\
D:\>web\elink\cake\console\cake -app D:\web\elink\app
Welcome to CakePHP v1.2.2.8120 Console
---------------------------------------------------------------
Current Paths:
-app: app
-working: D: -app D:/web/elink/app
-root: D: -app D:/web/elink
-core: D:\web\elink
Changing Paths:
your working path should be the same as your application path
to change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
Available Shells:
D:\web\elink\vendors\shells:
- none
CORE\console\libs:
acl
api
bake
console
i18n
schema
testsuite
To run a command, type 'cake shell_name [args]'
To get help on a specific command, type 'cake shell_name help'
My shells are located at D:\web\elink\app\vendors\shells.
I have managed to reproduce this issue using versions 1.2.2.8120 and 1.2.3.8166 on Windows. The -app parameter doesn't seem to work at all as expected.
The console will only list global shells in the /vendors/shells folder and not application-specific ones located in /app/vendors/shells or in plugins (/app/plugins/plugin_name/vendors/shells).
The -app parameter works as expected on OpenSUSE, listing all available application-specific shells (including those in plugins).
Unless we are doing something incorrectly, it is probably worth opening a ticket on Trac about this issue.
A workaround would be to add your Cake console directory to the Windows PATH environment variable.
Open 'System Properties' (Start key + Pause/Break key)
Open 'Advanced' tab
Click 'Environment Variables'
Select the PATH variable in the 'System variables' section
Press 'Edit'
Append ;E:\web\elink\cake\console\ to the 'Variable value'
Press 'Okay' on all dialogs
Close all open cmd prompts
You can then set up pycron to run E:\web\elink\cake without the -app parameter and all your application-specific shells should be available.
-For the people having the same problem but on linux systems, here there is an easy solution:
http://book.cakephp.org/complete/3/The-Manual#Running-Shells-as-cronjobs-846
-Another alternative solution for any system would be to create a simple script with two lines like this:
cd /path/to/app
/path/to/cake
-Both solutions worked for me in a Cent0S and in a MacOS based machines.