I wanted to open multiple PWA's (Progressive Web Apps) like Twitter, Google-Keep, and Youtube Music at the StartUp of Ubuntu.
There are particular app-id for each of the above sites, which are located as a folder at ~/.config/google-chrome/Default/Extensions/
Twitter - jgeocpdicgmkeemopbanhokmhcgcflmi
Google Keep - hmjkmjkepdijhoojdojkdfohbdgmmhki
YouTube Music - cinhimbnkkaeohfgghhklpknlkffjgod
So currently, to open these three PWA's at startup, I need to use three different CLI commands like the below at Ubuntu's Startup Application Preferences
/usr/bin/google-chrome --profile-directory=Default --app-id=jgeocpdicgmkeemopbanhokmhcgcflmi
/usr/bin/google-chrome --profile-directory=Default --app-id=hmjkmjkepdijhoojdojkdfohbdgmmhki
/usr/bin/google-chrome --profile-directory=Default --app-id=cinhimbnkkaeohfgghhklpknlkffjgod
How do I combine the above three commands to present an array of app-ids? I couldn't find anything in the man pages as well.
Is there any documentation related to the above?
Asked a similar question #here
Posted on your similar question...
The following code is modified from code based on this site's example.
For your shell script
for appid in "$#"
do
/usr/bin/google-chrome --profile-directory=Default --app-id=$appid &;
done
The command to call it
sh my-script.sh jgeocpdicgmkeemopbanhokmhcgcflmi hmjkmjkepdijhoojdojkdfohbdgmmhki
Further Ideas
Have a configuration file that houses the IDs you want to open, and use the shell script to loop through the IDs in the config as opposed to the command line arguments.
Related
I've been trying to follow the
Setting Up Stackdriver Debugger for Java applications on Google Compute Engine, but am running into issues with Stackdriver Debug.
I'm building my .war file from a separate build server, then deploying it to my GCE server. I added the agent to the start command via /etc/defaults, and my app appears in the https://console.cloud.google.com/debug control panel. The version I set in the run command matches the revision that shows up in the source-context(s).json files.
However when I click open the app, I see the message that
No source version information was provided by the deployed application
I connected the app's git repo as a mirrored cloud repository, and can browse the source files in the sidebar of the Stackdriver Debug page. But, If I browse to a file and add a breakpoint I get an error that the error "File was not found in the executable."
I have ran the gcloud preview app gen-repo-info-file command, which created two basic json files storing my git repo and revision. Is it supposed to do anything else?
I have tried running jetty using both normal and extracted modes. If I have jetty first extract the war file, I can see the source-context.json filesin the WEB-INF/classes directory.
What am I missing?
https://github.com/GoogleCloudPlatform/cloud-debug-java#extra-classpath mentions
you can update the agentPath showing your WEB-INF/class directory.
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes
For multiple class paths:
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes:/another/path/with/classes
There are a couple of things going on here.
First, it sounds like you are doing the correct thing with gen-repo-info-file. The debugger agent should pick up the json files from the WEB-INF/classes directory.
The debugger uses fuzzy matching to find source files, so as long as the name of the .java file matches a file in your executable, you should not get that error.
The most likely scenario given the information in your question is that you are attaching the debugger to a launcher process, rather than your actual application. Without further details, I can't absolutely confirm that, though.
If you send us more details at cdbg-feedback#google.com, we can look more closely at your case to see if we can understand exactly what's happening, and potentially improve our documentation, since it sounds like you followed the docs pretty closely.
Can you help me get my crashes symbolicated?
In Xcode 7.3, Window -> Organizer -> Crashes, I have crash reports from my latest TestFlight builds. They were built on this Mac, and all the archives with the corresponding dSYMs are in the Archives tab. The app is divided into a number of frameworks and the main app, and many are a mix of Swift and Objective C. In the crash log I can see the name of the frameworks and app listed correctly, but all the entries for my frameworks and app are in hex. UIKit is symbolicated just fine.
When I look in iTunes Connect, it says "Yes" to "Includes Symbols" and allows me to download the dSYMs. When building, the "Debug Information Format" option was set to "DWARF with dSYM". I tried setting "Strip Debug Symbols During Copy"
and "Strip Linked Product" to "No" to see if that made a difference. It didn't.
I cannot find the symbolicatecrash app on my system, not even in /usr/bin or /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash, but I have an older Xcode 5 where I could grab it. However, it does not resolve the symbols anymore.
I have the same problem in Instruments, if I profile my app, UIKit is symbolicated just fine, but my frameworks and app only show hex.
I know there have been a lot of posts about this, but I have going through them a lot from the 7.3 beta period and until now and have not found a solution
The location of symbolicatecrash has changed in Xcode 7.3:
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash
After reading this:
https://developer.apple.com/library/content/technotes/tn2151/_index.html
you find out that the App Store is responsible for symbolicating crash reports that come from TestFlight – not Xcode. And it appears the App Store is very unreliable at doing it.
Here's a workaround.
Go to the Archives tab in the "Organizer" window and make sure that for whatever build you need to symbolicate a crash report for, you have clicked the "Download dSYMS..." button over on the right side of the page. This is required if you are uploading in BitCode.
Attach an iOS device so that it appears in the "Devices" window.
Select the device and click "View Device Logs".
Now, go back to the Organizer Window, select the "Crashes" tab and select one of the crashes that did not get symbolicated.
Right-click on it and select "Show in Finder".
Right-click on the revealed .xccrashpoint bundle and select "Show Package Contents".
Drill down into DistributionInfos -> all -> Logs.
Drag any of the .crash files into the left side of the "View Device Logs" pane open in the Devices window.
Wait a second or two for Xcode to symbolicate the crash.
Same here. Having a hard time finding the symbolicatecrash after upgrading to 7.3.
However, you can still use the atos though.
You can find the tutorial here Symbolicate crash in iOS8 with Xcode 6 .1
I do not upload symbols with my application, so the App Store cannot symbolicate for me. I used the following workaround to symbolicate all of the crashlogs that XCode downloads from the store. These instructions are for XCode 8. The paths for the symbolicate crash app will vary from version to version of XCode but the ideas should be the same in each version.
Place your symbols where the symbolicator can find them: Place your symbols (.dsym) file in your Archives directory. You can find this by going to Organizer, context clicking on an archive and choosing "show in finder". Navigate up to the Archives directory (e.g. /Users/USERNAME/Library/Developer/Xcode/Archives) and place your dsym file there. It can be in other locations as well, it's just that I've verified that this one works.
Download the crash logs: In XCode, make sure that you've downloaded the crashlogs for the build you want to symbolicate (Organizer->Crashes, click on your app and then choose the version of your app in the panel to the right of the list of apps).
Locate the crash logs on disk: In the panel that has the App Version and build number, context click on one of the crashes and choose "Show in Finder". Navigate up to the "Crashes Folder" and note this location e.g.: /Users/USERNAME/Library/Developer/Xcode/Products/com.company-name.Your-App/VERSION/Crashes
Setup DEVELOPER_DIR for symbolicatecrash on the command line: Open a terminal window and CD to the crashes directory from step 3 and set the DEVELOPER_DIR like this: cd /Users/USERNAME/Library/Developer/Xcode/Products/com.companyname.Your-App/VERSION/Crashes/
export set DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
(this should be the location of the "Developer" directory inside of your XCode app bundle).
Locate the symbolicatecrash script: symbolicatecrash knows how to find your symbolicate crash logs using the dsym from step 1. Apple moves it around from version to version of xcode. You can find it like this: find /Applications/Xcode.app/ -name symbolicatecrash. In XCode 8, it is in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash
Backup your crashes folder You may want to backup your crashes folder (/Users/USERNAME/Library/Developer/Xcode/Products/com.companyname.Your-App/VERSION/Crashes/)
Symbolicate all of your crashes: Be sure that you are still in the Crashes directory from step 4 and type
for i in `find . -type f -name \*.crash`; do cat $i | /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash --output $i.sym; mv $i.sym $i; done;
This symbolicates each .crash file into an output file and then copies that back over the original, unsymbolicated file.
View Crashes Return to the crashes organizer and view the symbolicated crashes
I tried to copy symbolicatecrash file from xCode 7.2 and pasted it in xCode 7.3 in the following path:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/Current/Resources/
Am using Crasher script to symbolicate the crash reports How to use Crasher
According to the documentation of Xcode 9.0:
The Crashes Organizer symbolicates unsymbolicated logs, if they are
selected, using a local .dSYM indexed by Spotlight. (22550064)
You can check out more on this in Xcode's Documentation.
This question already has answers here:
How can I troubleshoot my Perl CGI script?
(8 answers)
Closed 8 years ago.
I followed my book and I -
1 - Installed Abyss Web server, personal edition.
2 - Copied the book's echo.pl file to the htdocs folder of the webserver. Restarted the
webserver.
3 - Installed Active Perl. (Actually, it was there already. I don't know who put it.)
When I visit the link - http://localhost/echo.pl, I either see the perl file (internet explorer) or download the perl file (chrome). I want this script to handle all requests from my HTML forms. How do I do this ?
Thanks.
I just got lucky. I had no clue what to do. I was wandering in their website to read a bit about them. I wondered who would use this obscure web server when there is apache. Luckily, I saw a section "help & support". There, I saw Scripting languages support and perl was mentioned in the list. I clicked the link and got the instructions for my windows system. Here it is - http://www.aprelium.com/abyssws/perl.html
Download and install Perl
Download ActivePerl from http://www.activestate.com/Products/ActivePerl and install it.
Declare the interpreter
Open Abyss Web Server's console. In the Hosts table, press Configure in the row corresponding to the host to which you want to add Perl support.
If there is no Hosts table in the main screen of your console, this means that you are using an old version of Abyss Web Server. Please upgrade to the latest version before proceeding. Upgrading is free, straightforward, and preserves your current server configuration. Click here to download the latest version.
Select Scripting Parameters.
Check Enable Scripts Execution.
Press Add in the Interpreters table.
Set Interface to CGI/ISAPI.
Note that if you do not find an Interface field, you can ignore this step and continue with the following instructions.
In the Interpreter field, press Browse..., go to the directory where you have installed Perl, click on the bin subdirectory, and click on perl.exe.
Check Use the associated extensions to automatically update the Script Paths.
Press Add in the Associated Extensions table.
Enter pl in the Extension field and press OK.
Press again Add in the Associated Extensions table.
Enter cgi in the Extension field and press OK.
Press OK
Press OK in the Scripting Parameters dialog.
Declare new index files
Select Index Files.
Press Add in the Index Files table.
Enter index.pl in the File Name field and press OK.
Press again Add in the Index Files table.
Enter index.cgi in the File Name field and press OK.
Apply the modifications
Press Restart to restart the server.
We are developing a service for our QA staff.
The main goal is that a tester from our web interface be able to select from a github branch a dump for this particular machine and click "Deploy" button, then the rails app for testing will be deployed to Digital Ocean.
The feature I am now working on, is collecting deployment logs and displaying them through our web interface.
On DO droplet there is a "logs" folder which contains different log files which are populated during deployment:
migrations_result_#{machine_id}.log, bundle_result_#{machine_id}.log, etc.
Where #{machine_id} is the id of deployed machine on our service(it is not droplet id).
With the help of remote_syslog gem we are monitoring "logs" folders on each droplet and send them through udp to our main service server, and with the help of rsyslog we store them in a particular folder, let's say /var/log/deplogs/
So in /var/log/deplogs/ we have:
migrations_result_1.log, bundle_result_1.log,
migrations_result_2.log, bundle_result_2.log,
...
migrations_result_n.log, bundle_result_n.log
How do I need to monitor this folder and save contents of each log file to mysql database?
I need to achieve something like the following (Ruby code):
Machine.find(#{machine_id}).logs.create!(text: "migrations_result_#{machine_id}.log contents")
Rsyslog does not seems to be able to achieve this. Or am I missing something?
Any advices?
Thanks in advance, and sorry for my English, I hope you can get the idea.
First of all, congratulations! You are in front of a beautiful problem. My suggestion is to use divide and conquer.
Here are my considerations:
Put the relevant folder(s) under version control (for example, GIT)
Check via GIT commands the files that changed every X amount of time.
Also obtain the differences between the prior version of each file, and the new ones, so you can update your database parsing the new info.
Just in case, here are ways to call system commands from ruby.
Hope that helps,
Is it possible to run Google Page speed from the command line? If so, how? I'm interested in automating nightly or daily Google PageSpeed calls that will inform me after a commit or daily if I've caused a drop in the Google PageSpeed 'grade' (for a given page).
It's possible to use the PageSpeed Insights from the command line:
Install via:
$ npm install --global psi
Usage:
$ psi <url> --key=<key> --prettyprint=<true> --userIp=<userIp> --locale=<locale> --strategy=<desktop|mobile>
Run it like this: $ psi http://stackoverflow.com
Also for mobile insights: $ psi http://stackoverflow.com --strategy=mobile
UPDATE: You can use the PageSpeed Insights within your local development environment (internet connection required) with grunt + grunt-pagespeed + ngrok. Checkout the sample project for grunt-pagespeed and ngrok for further information.
Note: Run $ ngrok -authtoken <your-token> 80 and check the web interface parameters to make sure to set the right port in your Gruntfile.js!
There is a Google Page Speed API. It won't work directly from a command line but you can easily write a script in your language of choice that will interact with the API.
You can use curl to run PageSpeed from command line like so:
curl "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=http://your_url/&prettyprint=true&strategy=mobile&key=your_api_key"
It will return human readable results in json. cmd-F "score" to locate the overall score.
Reference : Official Google api.