Skip to content

Instantly share code, notes, and snippets.

server {
listen 8443 ssl;
include snippets/ssl.conf;
server_name console.example.com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
FROM php:7.2-apache
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y libzip-dev libpng-dev \
&& /usr/local/bin/docker-php-ext-install gd \
&& /usr/local/bin/docker-php-ext-install pdo \
&& /usr/local/bin/docker-php-ext-install pdo_mysql \
&& /usr/local/bin/docker-php-ext-install zip \
&& /usr/sbin/a2enmod rewrite
0492d8c55d5a4fe62dfa8003c4d6d16e7ce8aa2cc9a16657d43d9c74d097ed758b7b975cff923fa37e1de8e1e06682a81295f48a5f0b99367e1e1d4d2cd2ab0910
public function safeUp()
{
$fieldGroupName = 'myFieldGroup';
$fieldService = Craft::$app->getFields();
$fieldGroup = new FieldGroup();
$fieldGroup->name = $fieldGroupName;
$fieldGroupSuccess = $fieldService->saveGroup($fieldGroup);
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$tlsVer = json_decode($response, true);
echo "<h1>Your TSL version is: <u>" . ( $tlsVer['tls_version'] ? $tlsVer['tls_version'] : 'no TLS support' ) . "</u></h1>";
<?php
/**
* Craft web bootstrap file
*/
// Set the Craft site variable
define('CRAFT_SITE', 'blabla');
// Project root path
#Dockerfile
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@eriweb
eriweb / gist:683f78fb9a91b2b2f71e
Created January 14, 2015 13:22
acs45 create-schema-premium patch
diff --git a/setup/db/create-schema-premium.sql b/setup/db/create-schema-premium.sql
index 2f86c0b..a8feff4 100644
--- a/setup/db/create-schema-premium.sql
+++ b/setup/db/create-schema-premium.sql
@@ -296,7 +296,7 @@ CREATE TABLE `cloud`.`netapp_volume` (
`password` varchar(200) COMMENT 'password',
`round_robin_marker` int COMMENT 'This marks the volume to be picked up for lun creation, RR fashion',
PRIMARY KEY (`id`),
- CONSTRAINT `fk_netapp_volume__pool_id` FOREIGN KEY `fk_netapp_volume__pool_id` (`pool_id`) REFERENCES `netapp_pool` (`id`) ON DELETE CASCADE,
+ CONSTRAINT `fk_netapp_volume__pool_id` FOREIGN KEY `fk_netapp_volume__pool_id` (`pool_id`) REFERENCES `cloud`.`netapp_pool` (`id`) ON DELETE CASCADE,
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbdYxPOrSh7zIV7upuYGnmspu6soDqYGe9O25Bwzlxd96/plgFQD7rgyyjEdh3BqIi6nOyi9xFfaj50cKdnIW9kEC6cIx5L/oOGiCTbaee8wqBAhn7bXwLWwndz8XRnAxnLQ3WXZMK5vrG28Mu1ElGKuZqqtExkFmTwNxN1OQXgpSsruduCc0a/EOd8lio9oLU7QSVSKqu6hpwfo6vrj3cSRBuaWsercy1Qzq3uH1Um8AudA+Busa/u/DoSChykDWser0yPkiiuDhAISCvFaU6za5NJREb6tee48m7k3K6uc63sX9VtxVcPtlTG2HhYLDIUJBDksNzPEF3UtocMtSr eriweb
@eriweb
eriweb / gist:f053d1da36be6f7e0045
Created November 3, 2014 22:11
packer-cloudstack config
{
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/base.sh",
"scripts/cleanup.sh",
"scripts/zerodisk.sh"
]
}