Category: Tools
-
How to temporarily bypass content security policy CSP headers
Browser: FirefoxExtension: Mod Headers https://addons.mozilla.org/en-US/firefox/addon/modheader-firefox/ Add A CSP policy like this:Use “parse” option and paste this: To create a Content Security Policy (CSP) header that allows everything, you would use the ‘unsafe-inline’ and ‘unsafe-eval’ sources for scripts and styles, and the * wildcard to allow all other sources. This setup is generally not recommended for…
-
How to fix CORS error for amazon s3 files and resources?
Go to bucket In the bucket permissions tab There is a section for CORS, put the following in it and save.
-
centos web panel – vhost templates for proxying websocket traffic
http://wiki.centos-webpanel.com/webservers-vhost-templates Templates location: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/– Folder main contains main configuration for WebServers– Folder vhosts contains vhosts configuration for domains (this is what you need) How to create a template fileThe easiest way to do that is to simply copy an existing file and then edit a new file you have created.Note that you need to have…
-
How to generate a patch with edited files? How to zip latest committed changes only
Reference: https://stackoverflow.com/a/42971972/2229148 sometimes you need all the files that were updated so you can patch an external app which doesnt uses same git project or many other scenarios in which we need a zip or tar of those files. Use the above command to do so There is a smarter way also, if you want…
-
proxying websockets via nginx and https
-
Jenkins auto deploying flask in test env with last build process kill and pipenv
killlastbuild.sh can have anything inside it depending upon your project requirements. I put 2 process killers to kill background-ed daemon processes from previous build command
-
How to solve MySQL server gone away error Maria Db update on cPanel and WHM?
This is related to new MariaDb upgrade from 10.1.41 to 10.1.42 and also for servers which were updated from 10.2.27 to 10.2.28 Go to solution ( Special Thanks to @Valetia ) You will see errors in following formats/messages: No file or input found MySQL Server has gone away Connection to MySQL Server failed sqlstate[hy000]: general…
-
A basic time difference calculator in google script js
In your Google Sheet, Click “Tools” and then choose “Script Editor“. Put the code given below. Don’t forget to use function in your result column as “=dodiff(cell1,cell2)“
-
How to reverse the ids in a mysql table column without breaking primary key constraint?
Let me explain the problem scenario: Let us assume we have a table with 4 columns in it out of which 1 is PRIMARY column and rest 3 contain some data. What we want to do is to reverse the primary key IDs for that data keeping the rest of data intact. It is like…
-
How to remove files with “No Content Changes Found” in Git Desktop
There are 3 possible ways git can find a file changed (even if you didn’t change it) Line Endings have changed File permissions have changed Bonus: if modification time has changed for first case try these settings in bash shell. One of these will fix it for you For second case, here is the flag…