This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- DROP TABLE #tmpTableSizes | |
CREATE TABLE #tmpTableSizes | |
( | |
tableName varchar(100), | |
numberofRows varchar(100), | |
reservedSize varchar(50), | |
dataSize varchar(50), | |
indexSize varchar(50), | |
unusedSize varchar(50) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<!--start-here--> | |
</div> | |
</template> | |
<script setup> | |
import { ref, computed } from 'vue' | |
// props and emits | |
const props = defineProps(['someProp']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# redirect from multiple domains to your primary domain | |
if (isset($_SERVER['WODBY_ENVIRONMENT_TYPE']) && $_SERVER['WODBY_ENVIRONMENT_TYPE'] == 'prod' && php_sapi_name() != "cli") { | |
$redirect_from = array( | |
'oldsite.com', | |
'alternative-spelling.com', | |
); | |
if (in_array($_SERVER['HTTP_HOST'], $redirect_from)) { | |
header('HTTP/1.0 301 Moved Permanently'); | |
header('Location: https://primary-domain.com'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show all pods | |
kubectl get pods --all-namespaces | |
# get pod info | |
kubectl -n {uuid} describe pods {container_name} | |
# delete pod | |
kubectl -n {uuid} delete pods -lname={container_name} | |
# view pod log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list volumes | |
sudo fdisk -l | |
# create a mount location | |
mkdir -p /mnt/some-vol | |
# mount | |
mount /dev/xvdf /mnt/some-vol | |
# unmount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appcmd set site /site.name:"<IISSiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>'] | |
# https://www.sslshopper.com/article-ssl-host-headers-in-iis-7.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metadata: | |
type: drupal8 | |
infrastructure: ^5.1 | |
services: | |
ipt: | |
enabled: true | |
required: true | |
image: 'gbif/ipt:2.4.2' | |
ports: | |
- 'edge::80:8080/tcp' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# export content type using drupal console | |
drupal config:export:content:type page \ | |
--module="demo" \ | |
--optional-config \ | |
--remove-uuid \ | |
--remove-config-hash | |
more: https://drupalconsole.com/docs/en/commands/config-export-content-type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rebuild permissions | |
drush php-eval "node_access_rebuild();" | |
# remove missing module | |
drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='module_name';" | |
# how to re-apply drupal update | |
drush ev "drupal_set_installed_schema_version('field_group', 8000)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- requires url rewrite module ---> | |
<!-- https://docs.microsoft.com/en-us/archive/blogs/dawiese/redirect-from-http-to-https-using-the-iis-url-rewrite-module --> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Redirect http to https" patternSyntax="Wildcard" stopProcessing="true"> | |
<match url="*" /> | |
<conditions> | |
<add input="{HTTPS}" pattern="off" /> |