Skip to content

Instantly share code, notes, and snippets.

View Rud5G's full-sized avatar
🏡
Working remotely

Rudger Rud5G

🏡
Working remotely
View GitHub Profile
@Raistlfiren
Raistlfiren / Dockerfile
Last active August 14, 2023 19:02
XDebug 3 and Docker Reference
FROM php:7.4-cli-alpine
# Install xdebug
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del .phpize-deps
WORKDIR /var/www/html
@Rud5G
Rud5G / cache-warmer.py
Created September 23, 2020 08:00 — forked from hn-support/cache-warmer.py
A threaded cache warmer in python
#!/usr/bin/env python
"""
Warm the caches of your website by crawling each page defined in sitemap.xml.
To use, download this file and make it executable. Then run:
./cache-warmer.py --threads 4 --file /data/web/public/sitemap.xml -v
"""
import argparse
import multiprocessing.pool as mpool
import os.path
import re
@Rud5G
Rud5G / master-to-main.md
Created August 25, 2020 21:21
Changing master to main
@pmoranga
pmoranga / datadog-snmp-synology.yaml
Created May 25, 2020 07:44
Datadog SNMP configuration to collect Synology statistics. Should be put into `conf.d` folder. SNMP User should be created / enabled on Synology (RO access)
init_config:
mibs_folder: /mibs
profiles:
generic:
definition_file: _generic-host-resources.yaml
instances:
- ip_address: $REPLACE_WITH_SYNOLOGY_IP_ADDRESS
community_string: public
snmp_version: 2
diff --git a/Mail/Message.php b/Mail/Message.php
index 1f423e801087..0e4d79aac933 100644
--- a/Mail/Message.php
+++ b/Mail/Message.php
@@ -171,7 +171,6 @@ private function createMimeFromString($body, $messageType)
$part = new Part($body);
$part->setCharset($this->zendMessage->getEncoding());
$part->setEncoding(Mime::ENCODING_QUOTEDPRINTABLE);
- $part->setDisposition(Mime::DISPOSITION_INLINE);
$part->setType($messageType);
@marcguyer
marcguyer / AbstractFunctionalTest.php
Last active February 9, 2020 10:56
Functional test abstract using phpunit, Expressive, Doctrine ORM, OAuth2, PSR7, PSR15
<?php
declare(strict_types=1);
namespace FunctionalTest;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Tools\SchemaTool;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
@versedi
versedi / webpack.config.js
Last active May 15, 2024 14:09
Webpack Encore + Sass + MiniCSSExtractPlugin + PurgeCSS + OptimizeCss + Babel + Typescript
/* eslint-disable no-useless-escape */
const Encore = require('@symfony/webpack-encore');
const TerserPlugin = require('terser-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const HtmlCriticalWebpackPlugin = require('html-critical-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const PurgeCssPlugin = require('purgecss-webpack-plugin');
const WebpackBar = require('webpackbar');
const path = require('path');
@jimwhimpey
jimwhimpey / service-worker.js
Last active November 10, 2022 22:26
An example of our cachable asset manifest that gets inlined into the top of our service worker file during by the build
self.__serviceWorkerManifest= [
// This is the HTML file that we initial load, we normalize
// any Slack client URL to request this same file
{
url: "/boot/client.html",
hash: "52de82b6a380a284b31a6e7be0999050"
// Of course our JS and CSS assets are cached
}, {
url: "https://a.slack-edge.com/bv1-6-9b2646d/client-lazy-components.2ce886f.cache-gantry-1565714987.min.js",
hash: "2ce886f1b462f7437012"
@mnapoli
mnapoli / README.md
Created July 17, 2019 11:28
SAM templates vs Serverless templates

SAM template for a Bref HTTP application:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Resources:
    MyFunction:
        Type: AWS::Serverless::Function
        Properties:
@sshymko
sshymko / install_mysql_client.sh
Last active March 14, 2024 20:10
Install MySQL 5.7 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum install -y mysql-community-client