Install the packages needed to build packages
apt-get install build-essential
Install PHP build dependencies
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok,n1xim) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2013-08-29 changed scaling of "hits" to base 10 (n1xim) | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
#!/bin/bash | |
# Backs up the database and filesystem for a webapp | |
# Dumps a current db snapshot and moves it to within the | |
# webapp's directory structure, so that Duplicity can | |
# back it up to Amazon's S3 service | |
# Based on instructions by Randy Sesser: | |
# http://www.randys.org/2007/11/16/how-to-automated-backups-to-amazon-s-s3-with-duplicity/ |
<?php | |
/* | |
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine | |
Author: _ck_ | |
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
Version: 0.0.6 | |
* revision history | |
0.0.6 2014-08-02 display fix for empty vs zero | |
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements |
# Basically the nginx configuration I use at konklone.com. | |
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
# | |
# To provide feedback, please tweet at @konklone or email [email protected]. | |
# Comments on gists don't notify the author. | |
# | |
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
server { |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
PINGDOM_API_HOSTNAME = "api.pingdom.com" | |
PINGDOM_API_KEY = "your_api_key_here" | |
PINGDOM_API_VERSION = "2.0" | |
PINGDOM_CHECK_ID = "######" | |
PINGDOM_USERNAME = "[email protected]" | |
PINGDOM_PASSWORD = "password" |
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
Now let’s extract the certificate: | |
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This pre-commit hook is designed to be used for Drupal 7 and 8 sites.
Download the pre-commit file. Save it as .git/hook/pre-commit in your git repo. You need to ensure that the file is executable.
If you want this to be added to all new projects automatically, add it to your git init templates.
To install and PHP CodeSniffer for Drupal, please read the official documentation.
To see this working checking out this short YouTube video.
#!/bin/sh | |
url="https://ftp.drupal.org/files/projects/drupal-7.59.zip"; | |
if curl --output /dev/null --silent --head --fail "$url"; then | |
echo "URL exists: $url"; | |
else | |
echo "URL does not exist: $url"; | |
fi; | |
url="https://ftp.drupal.org/files/projects/drupal-8.5.3.zip"; |