Skip to content

Instantly share code, notes, and snippets.

View akroii's full-sized avatar

Andreas Kroll akroii

  • Proverbs 6,6-8
  • 17:54 (UTC +02:00)
View GitHub Profile
@akroii
akroii / sql
Created October 29, 2020 13:25
change database kollation of catalog manager
ALTER TABLE ctlg_ CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
function setContentSize() {
$('.swiper-content').css({
height: $(window).height()-$('.swiper-nav').height()
})
}
setContentSize()
$(window).resize(function(){
setContentSize()
})
@akroii
akroii / php
Created October 9, 2020 09:42
resize image on the fly
<?php
$imageResp = \Picture::create($col->picture['img']['src'], 3)->getTemplateData();
$this->insert('picture_default', $imageResp);
?>
@akroii
akroii / gist:689cac7a8a99e2324835e1cad6ac55b1
Last active December 7, 2021 12:44
Office 365 SMTP Relay
MAILER_DSN=smtp://<ersetzen durch kundenname>.mail.protection.outlook.com:25
mailer_transport: smtp
mailer_host: <mx-eintrag des kunden>.mail.protection.outlook.com
mailer_user: null
mailer_password: null
mailer_port: 25
mailer_encryption: tls
document.onreadystatechange = () => {
if (document.readyState === 'complete') {
document.getElementsByName("xxx")[0].defaultValue = document.getElementById('xxx').innerHTML;
document.getElementsByName("xxx")[0].defaultValue = document.getElementById('xxx').innerHTML;
document.getElementsByName("xxx")[0].defaultValue = document.getElementById('xxx').innerHTML;
document.getElementsByName("xxx")[0].defaultValue = document.getElementById('xxx').innerHTML;
console.log('DOM is ready.')
}
@akroii
akroii / gist:07742427b29914e4b48ef5883a2676d8
Last active February 18, 2021 15:17
view dns stuff iterm
View DNS from host
host -a xxxxxxx.de
https://whois.domaintools.com/
https://reverseip.domaintools.com/
Flush DNS Cache
sudo killall -HUP mDNSResponder
tar --absolute-names --exclude='./var/cache/production_*' -czvf /srv/home/xxxx/public/Backup.tar.gz /srv/home/xxx/public/shopware5.6/*
<?php if (!$this->hasTeaser) {
echo \StringUtil::substr($this->text, 150);
} else {
echo $this->teaser; }?>
@akroii
akroii / php
Last active June 3, 2020 09:02
wp-config.php
define( 'SMTP_USER', '[email protected]' ); // Username to use for SMTP authentication
define( 'SMTP_PASS', 'xxxx' ); // Password to use for SMTP authentication
define( 'SMTP_PORT', '465' ); // SMTP port number - likely to be 25, 465 or 587
define( 'SMTP_SECURE', 'ssl' ); // Encryption system to use - ssl or tls
define( 'SMTP_AUTH', true ); // Use SMTP authentication (true|false)
define( 'SMTP_HOST', 'xxxxx' ); // The hostname of the mail server
define( 'SMTP_FROM', 'noreply@xxxxx' ); // SMTP From email address
define( 'SMTP_NAME', 'noreply' ); // SMTP From name
define( 'SMTP_DEBUG', 0 ); // for debugging purposes only set to 1 or 2
@akroii
akroii / php
Created April 15, 2020 08:59
render image from binary to imagesize
<?php if($this->origin["singleSRC"]):?>
<?php
$objFiles = \FilesModel::findByPk($this->origin["singleSRC"]);
$strImage = $this->getImage($objFiles->path, 1200, 630, 37);
$GLOBALS['TL_HEAD'][] = "<meta property=\"og:image\" content=\"".$strImage."\" />";?>
<?php endif;?>