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
| <?php | |
| // For port 24 host without scheme is just fine | |
| // Add scheme, if using secure connection. Port 465 or 587 | |
| $host = 'ssl://smtp.strato.de'; | |
| //$host = 'tls://smtp.strato.de'; | |
| $port = 465; | |
| //$port = 25; | |
| $errorNumber; | |
| $error; | |
| $timeout = 10; |
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
| <?php | |
| //example for a GET request | |
| //init variable for request authentification | |
| $username = 'arbeitPlus'; | |
| $userkey = 'xxx'; | |
| $stamp = gmDate("Y-m-d H:i:s O"); | |
| $signature = hash('sha256', $stamp . '::' . $userkey); | |
| //set header for request | |
| $authHeader = array('prosol-date:' . $stamp, 'Authorization:' . $username . ':' . $signature); | |
| // Initializing the curl |
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
| DELETE FROM wp_postmeta | |
| WHERE meta_key="url_mp3_hoster"; | |
| INSERT INTO wp_postmeta ( post_id, meta_value, meta_key ) | |
| SELECT | |
| post_id, | |
| SUBSTRING(meta_value,1,POSITION(".mp3" IN meta_value)+4), | |
| "url_mp3_hoster" | |
| FROM wp_postmeta | |
| WHERE |
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
| <?php | |
| namespace App\Repository\Filters; | |
| use Doctrine\ORM\Mapping\ClassMetaData; | |
| use Doctrine\ORM\Query\Filter\SQLFilter; | |
| class DeletedFilter extends SQLFilter | |
| { | |
| public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) | |
| { |
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
| <?php | |
| $testEmail = 'test-' . rand(100000,999999) . '@ditrk.com'; | |
| // wrong form, will return 404 not found | |
| $response = subscribeToAjabizForm( | |
| 'https://app.ajabiz.com/', | |
| 'wrongFormId', | |
| $testEmail, | |
| 'First Name', |
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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
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
| #!/bin/bash -ue | |
| #Invoice Ninja Self-Hosted Automatic Update | |
| #This version will check https://invoiceninja.org for an updated version and install if found. | |
| #Tested and works with cron. Lines 51, 54, & 79 output timestamps so you can pipe to a logfile. | |
| #USE AT YOUR OWN RISK | |
| #Replace </path/to/ninja> (line 13) and </download/path> (line 57) with your specifics, obviously. | |
| #!!IMPORTANT!! Be sure to edit lines 16 & 17 if www-data is not the owner/group for /ninja/storage! | |
| #SET INITIAL VARIABLES |