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:8.1.9RC1-cli-buster | |
RUN apt-get update && apt-get -y install fuse3 libfuse2 libfuse-dev kmod libnss3 libatk1.0-0 libatk-bridge2.0-0 libcpuset1 libcpuset-dev libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libasound2 | |
RUN apt-cache search libcpus | |
ENV GTK_IM_MODULE=xim \ | |
QT_IM_MODULE=fcitx \ | |
XMODIFIERS=@im=fcitx \ | |
DefalutIMModule=fcitx \ | |
DBUS_SESSION_BUS_ADDRESS="autolaunch:" |
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
FILES="" | |
for entry in /crontab/* | |
do | |
FILES+="$entry " | |
done | |
echo "update crontab" | |
cat $FILES |crontab |
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
for entry in /where-your-files-are-after-a-checkout-of-your-ci/* | |
do | |
echo "Verify $entry" | |
CHECK=`chkcrontab -w bash -w docker $entry` | |
if [ "$?" -gt 0 ];then | |
echo "$CHECK" | |
exit 1; | |
fi | |
done |
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
<?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
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 |