$.ajax({
type: "POST",
url: _url,
xhrFields: {
responseType: "blob" // to avoid binary data being mangled on charset conversion
},
success: function(blob, status, xhr) {
// check for a filename
var filename = "";
# If the commands fail on Windows, then make sure you're running in GitBash/Cygwin and NOT cmd | |
# HELP! | |
docker --help | |
# List docker images | |
docker images | |
# List running containers | |
docker ps |
# | |
# Sidekiq auto start using systemd unit file for Ubuntu 18.04 | |
# | |
# Put this in /lib/systemd/system (Ubuntu). | |
# Run: | |
# 1. systemctl enable sidekiq (to enable sidekiq service) | |
# 2. systemctl {start,stop,restart} sidekiq (to start sidekiq service) | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies | |
# to run multiple processes (sidekiq-1, sidekiq-2, etc). |
#!/usr/bin/env bash | |
# | |
# Originally from https://gist.github.com/IanVaughan/2902499 | |
# | |
# authors: Ian Vaughan | |
# Jacob Zimmerman | |
# | |
# usage: uninstall_gems [<version> ...] | |
# | |
# examples: |
cd /var/lib/jenkins/
/etc/init.d/jenkins restart
IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).
USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.
IMPORTANT: The following setup assumes a 3 minute (180 sec) cache time. You can safely increase this to 5 mins for less busier sites or drop it to 1 min or even 30s for high traffic sites.
This configuration requires an HTTP Header and a user cookie to identify if a user is logged in a site, in order to bypass caching overall (see how it's done in the Joomla section). If your CMS provides a way to add these 2 requirements, then you can use this configuration to speed up your site or entire server. You can even exclude the domains you don't want to cach
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# === Updated December 2018 === | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have less or more resources available you should adjust accordingly to save CPU, | |
# RAM and disk I/O usage. | |
# The settings marked with a specific comment or the word "UPD" after the value |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |