I have production website with no sourcemaps, and I have sourmaps locally matching production compiled + minified coffee.
Is there any way to ask browser's developer tools to use this (local) sourcemap without actually uploading it to server and adding as a sourceMappingURL comment or http header?
There is: Specify
//# sourceMappingURL=http://localhost/xxx.js.map
as the last line of your script and have a local web server (behind a foirewall) supplying it.
Works fine for me.
Related
I'm trying to upload a generic package to my self-hosted gitlab package registry, according to the example here.
It works according to the example, but now I want to instead call make from the CI and use a similar call to curl within the Makefile. This doesn't work, presumably because the value of CI_JOB_TOKEN passed to the Makefile is [MASKED] (verbatim)?
I tried a few tricks, like
script: |
make JOB_TOKEN=$CI_JOB_TOKEN upload
and then using JOB_TOKEN in the Makefile, but none work...
(The other CI variables are read perfectly fine from the env by the Makefile)
Any ideas?
Solution
The issue is not the passing of CI_JOB_TOKEN, which works perfectly fine, but an issue where the reverse proxy (with WAF - Web Application Firewall (in my case modsecurity) apparently blocks these specific api requests.
When the CI runner is on the same LAN as the gitlab server, the local (http) address can be taken, which works. Another solution (untested) would have been to modify the WAF to allow the necessary api calls through.
I have an app (built with laravel) which i deployed it and working very well, but i have a question, when i deploy it the server i made these process :
1- minify css and js files and comine them in a single file
2- changing some configuration (database,hostname,mail sever ,etc ...)
3- Finally i upload my files to the server.
how can i return back to my local config and unminify my js and css files without doing it manually ?
is there a better way to make it automated ? i know that the first step can be done by gulp or any javascript task runner by a single command and the second one is not a big deal ,but i just want to know if there an automated way?
Why don't you just have a .env config file out of you version control and compress your CSS/JS using Laravel Mix as a part of your deploy process?
To make it clear:
Keep your .env file in .gitignore. Thus you have to setup your environment settings only once (database, hostname, etc).
Use npm run prod to minify your CSS/JS: https://laravel.com/docs/5.4/mix
I'm having trouble wrapping my head around Karma. I'd like to:
Set up multiple hosts on my network, running Linux, Mac and Windows
Preferably also run on Android and iPhone
Have these be available for running end-to-end tests through Karma
Have them run tests on a remote location, not locally
The goal: being able to automate tests which ensures that our site works on all platforms and browsers, not only the ones available to me locally.
Is this possible? I'm struggling to find any good guides for setting this stuff up.
You can start a webdriver server on your remote servers and configure karma to use the karma-webdriver-launcher to run the tests on the browsers from your webdriver servers.
WebDriver : http://code.google.com/p/selenium/wiki/RemoteWebDriverServer
karma-webdriver-launcher : https://github.com/karma-runner/karma-webdriver-launcher
I've been using karma for a short while myself and I think I can answer some of your questions.
I am not sure what you mean with setting up multiple hosts, but I guess you mean that you want to run the tests on several different devices (maybe even on different browsers?).
All you have to do really is to have the tests and karma installed on some server that you can access remotely. Running Karma from that server should make it possible for your other devices to access it's instance of Karma simply by opening a browser and typing in serverURL:9876 in the URL-bar of the browser. This should cause all the tests found on the server to be run on the browser that opened the page.
If you want to see the output from Karma during the tests, you will either have to make karma spit out some HTML using a reporter (if you manage to do this, give me a call!), use the junit reporter and post process the xml that it generates, or simply SSH to the server and see what comes out in the console.
If you use some sort of regex in the karma config file that is able to find any new code and test files you push to the server, karma will automatically load these files when you push them to the server and re-run all tests.
I am actually in the process of doing this myself, but I would like to create HTML test-reports instead of having to post process some XML or having to SSH and look at the command-line output. I am also having some problems with Istanbul, the code coverage tool, in that if you run the tests on several browsers at once, only one of them will have code coverage generated.
I tried and installed the JA Blazes quick start template (which includes all the modules and extensions, as shown in their live demo) for Joomla 1.5 on my local server and all worked perfectly well, but when I installed it on my domain server, the install sample data fails. I do see the DB being updated, but the installation just never ends. The installation of sample data goes on forever. Is there a way I can figure out if something went/is-going wrong ?
Thanks in advance..
Sounds to me like the connection with the db server is timing out.
If you can work out where the sql files are stored within the distribution (usually /installation/sql/ ) you could insert the sql manually using phpMyAdmin or from the command line.
If the demo installed fine on your local machine there is no need to 'install' it at all on the remote server.
FTP all of the files up to the server.
Use phpMyAdmin locally to export the database
Use phpMyAdmin on the remote server to import the backed up sql.
Finally edit the configuration.php file with the database details and paths for the remote server.
A final alternative would be to utilise Akeeba Backup or similar to package up the site and move it from local to remote. This is a fantastic tool that works around most memory limits and other annoyances on shared hosting.
I tried to deploy my project with capifony, becouse I found here an answer, that with capifony deployment is easy. Well I don't think it is, so my question is:
How can I deploy my project via ftp, I put all my files on the server but even if I browse to web/app.php, the only thing I get is an empty page, whatever route I write in the url. So someone please explain me how can I get this work! Thank you!
A couple of things to think of when deploying a Symfony2 project to a new server or computer (as far as I've encountered) might be:
Make sure that the server and it's PHP installation meets the Symfony2 requirements (and perhaps also the recommendations)
Check that you've somewhat followed the installation instructions (found here)
Try to clear the cache
Make sure that the web server and it's PHP process have write permissions to the cache folder
If none of these helps, try to modify the app_dev.php to temporarily allow access from your current (client) IP (instead of restraining it to localhost). Then, hopefully, you'll get a more useful and detailed error message, instead of the blank page (which often is caused by some fatal error that have occurred during the initialization of the framework and its kernel)
Update: Noticed now that you've tagged your question with 'windows', but that you don't mention which server you're trying to deploy to. I wrote the above with some *nix based server in mind, but hopefully some of it are applicable to Windows servers too (but there might be other common sources of error running under Windows that I'm not familliar with