bower to use http instead of https - http

Is there a way to force bower install to use http instead of https? I was able to resolve this in npm by npm config set strict-ssl false. I'd like to know if there is a bower command that I can run to disable ssl. THanks.

Add or edit either your user or project specific .bowerrc file and add the following configuration.
{
"strict-ssl": false
}
This works exactly like strict-ssl false in the npm config file.

Related

Errors after npm run prod

I'm developing a small website with Laravel and Tailwind on shared hosting. I can use a command line tool on host. In the local environment tailwind works without problem but after npm run prod most of the Tailwind functionalities are missing and the app.css and app.js seem to have errors.
e.g. scaling on hover -> transform hover:scale-105 duration-200 doesn't work on host.
I tried importing Tailwind with cdn but it can't be a permanent solution.
What am I doing wrong??
I looking for an answer for days with no luck
I assume locally you run npm run dev and on production npm run prod. By default the development version of Tailwind does not remove unused style specification. But when with npm run prod unused styles are purged for production usage.
As you can read in the docs the the paths to your templates should be configured in the purge section of your tailwind.config.js.
module.exports = {
purge: [
'./src/**/*.html',
'./src/**/*.vue',
'./src/**/*.jsx',
],
// .. more ..
See docs:
This list should include any files in your project that reference any of your styles by name
If you don't configure these paths, Tailwind does not know which classes you use and will therefore purge all styles it does not find, f. ex. your hover:scale-105.
Solution "dirty":.
You run npm run dev in production which will result in a large build of your css, but fixes the problem for now.
Solution "clean":.
You configure your paths correctly, let Tailwind correctly recognize it and purge unused styles... and be happy.
You can test this also in your development environment by running npm run prod and see what happens.
The app.css file after npm run production still has some warnings and when I upload it in the host the warnings are becoming errors. Here is a screenshot.
However when I use the file after npm run dev everything works fine. Maybe I'm having collisions between Tailwind classes. I will come up with an answer.

Consul template is not restarting nginx windows

I am using consul template v0.19.0 for windows, for rendering nginx config.
The nginx config Is rendering fine by the consul template but It is not restarting the nginx.
This is the command I am using.
Consul- template -consul-address="xx" - template="in:out:{{pathfornginx}}\nginx.exe -s reload" .
Where "in" is the ctmpl path and "out" is the final nginx config path..
I have tried with different path format but no luck.
Could anyone drop some input on this.
Thx in advance.
Did you tried to create a config.json file which will contain the path to the ctmpl file, and the command itself?
You would need to use the -config flag instead of -template
If you want an example for the config.json I can provide you one.. I'm using similar setup and it works fine for me
Provide me a better solution?

unset proxy in atom using apm config

You can set proxy for atom using
apm config set http-proxy http://....
but how do you unset the proxy using apm config. I tried
apm config unset http-proxy
but it doesn't work
Try this:
apm config delete <your-key>
Where <your-key> is your http-proxy, so become: apm config delete http-proxy
Then verify it using:
apm config get <key>
It should be set to null. Anyway you can explore the list of the command by:
apm help
and then
apm help <your-chosen-command>
I'm not sure what the command would be, but you could always edit your .apmrc file directly. For me, it's located at ~\.atom\.apmrc.

Installing Capistrano with a specific config dir

I have a Symfony2 application that I would like to deploy using Capistrano3. Performing cap install creates a config directory in the projectroot. To keep my project clean, I would like it to install the config dir into something like app\config\capistrano. Is this possible? I cannot find any hints in the documentations.
Found the anwser in a pull request on Github.
Enter the following two lines to your Capfile, before capistrano\setup beign called.
set :deploy_config_path, 'app/config/deploy.rb'
set :stage_config_path, 'app/config/deploy'
`
It is implemented in the 3.1.x branch
Look at your Capfile and change the path to the config file. This should be enough.

Setting up nginx via puppet

I am trying to use puppet to set up nginx. I found this module:
https://github.com/example42/puppet-nginx
I am using Vagrant, which I believe includes all the modules in the "modules" directory. I have added puppet-nginx into that directory.
I have a manifest file which has:
class { "nginx": }
However, that doesn't seem to work.
Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class nginx at /tmp/vagrant-puppet/manifests/default.pp:50 on node vagrant-ubuntu-raring-64
Any idea why this isn't working?
Thanks!
Check that you configured Vagrant properly:
provisioning with Puppet must be enabled
you can try to set module_path explicitly
try to rename directory puppet-nginx to nginx (or create symlink)
In your Vagrant directory issue
puppet module install --force "example42/nginx" --target-dir ./puppet/modules
Make sure your Vagrantfile contains the following:
config.vm.provision :puppet do |puppet|
puppet.module_path = 'puppet/modules'
end

Resources