This file contains 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 declare(strict_types=1); | |
class Mode_test_exception extends Mode_test { | |
public function exception(): void | |
{ | |
$this->throwerror($this->aConfig['error_reporting']['service']); | |
} | |
private function throwerror(array $params): void |
This file contains 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 | |
NOW=`date +%Y%m%d%H%M%S` | |
GIT_MYSQL=/backup/mysql | |
for T in `mysql -u root -N -B -e 'SELECT t.TABLE_NAME FROM information_schema.TABLES t WHERE t.TABLE_SCHEMA = "my_database" AND t.ENGINE != "MEMORY"'`; | |
do | |
echo "Backing up $T" | |
mysqldump -d --lock-tables=false --single-transaction=TRUE --skip-comments -u root my_databaswe $T | sed 's/ AUTO_INCREMENT=[0-9]*//g' > $GIT_MYSQL/$T.sql | |
done; | |
git add -A && git commit -m "schema from $NOW" && git push |
This file contains 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
const EventNotificationSDK = require('event-notification-nodejs-sdk'); | |
const https = require('https'); | |
// https://github.com/eBay/event-notification-nodejs-sdk/blob/main/lib/constants.js | |
const constants = { | |
ALGORITHM: 'ssl3-sha1', | |
AUTHORIZATION: 'Authorization', | |
BASE64: 'base64', | |
BEARER: 'bearer ', | |
ENVIRONMENT: { |
This file contains 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\Console\Commands\helper; | |
use DB; | |
use Doctrine\DBAL\Exception; | |
use Illuminate\Console\Command; | |
class db_create_triggers extends Command | |
{ |
This file contains 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
/usr/local/bin/phpsendmail | |
================================================================================================== | |
#!/usr/local/bin/php | |
<?php | |
/** | |
This script is a sendmail wrapper for php to log calls of the php mail() function. | |
Author: Till Brehm, www.ispconfig.org | |
(Hopefully) secured by David Goodwin <david @ _palepurple_.co.uk> | |
*/ |
This file contains 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
SELECT | |
CONCAT('ALTER TABLE `',c.TABLE_NAME,'` CHANGE COLUMN `',c.COLUMN_NAME,'` `',c.COLUMN_NAME,'` ',REPLACE(c.COLUMN_TYPE,'float','decimal'),' ',IF(c.COLUMN_DEFAULT='NULL','DEFAULT NULL',' NOT NULL'),';') | |
FROM information_schema.COLUMNS c | |
WHERE c.TABLE_SCHEMA = 'mydatabase' | |
AND c.COLUMN_TYPE LIKE 'float%' |
This file contains 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
{ | |
"standardsProfiles": [ | |
{ | |
"standardsLevel": "ABOVE_STANDARD", | |
"program": "PROGRAM_US", | |
"cycle": { | |
"cycleType": "CURRENT", | |
"evaluationDate": "2018-07-20T19:30:32.000Z" | |
}, | |
"evaluationReason": "Default", |
This file contains 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
FROM debian:9 | |
RUN apt-get update && apt-get install -y \ | |
libdbd-mysql-perl \ | |
libdbi-perl \ | |
libio-socket-ssl-perl \ | |
libterm-readkey-perl \ | |
perl \ | |
wget \ | |
&& rm -rf /usr/share/doc/* && \ |
This file contains 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
/* create tmp table with entries that exist */ | |
DROP TEMPORARY TABLE IF EXISTS source; | |
CREATE TEMPORARY TABLE source (compare_hash char(32) PRIMARY KEY) ENGINE = MEMORY | |
SELECT | |
compare_hash | |
FROM table_source AS s; | |
/* create tmp table with entries that SHOULD exist */ | |
DROP TEMPORARY TABLE IF EXISTS target; | |
CREATE TEMPORARY TABLE target (compare_hash char(32) PRIMARY KEY) ENGINE=MEMORY |
This file contains 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
FROM php:7.4-fpm-alpine3.11 | |
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ | |
RUN chmod u+x /usr/local/bin/docker-php-ext-* /usr/local/bin/docker-php-entrypoint | |
ENV IMAGICK_VERSION 3.4.4 | |
ENV PHPMEMCACHED_VERSION 3.1.5 | |
ENV PHPXDEBUG_VERSION 2.9.1 | |
ENV PHPREDIS_VERSION 5.1.1 | |
ENV GEARMAN_VERSION 2.0.3 |