Skip to content

Instantly share code, notes, and snippets.

Avatar

Christoph Flathmann Chrissi2812

View GitHub Profile
@Chrissi2812
Chrissi2812 / gif2mp4
Last active Mar 3, 2022
Converts gif to web video files (mp4, webm & vp9)
View gif2mp4
#!/bin/bash
#
ARGS=()
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
@Chrissi2812
Chrissi2812 / plesk_ngx_brotli.sh
Created Jun 8, 2020
This will configure nginx to build a ngx_brotli.
View plesk_ngx_brotli.sh
/#!/bin/bash
./configure --prefix=/usr/share \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--modules-path=/usr/share/nginx/modules \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--lock-path=/var/lock/nginx.lock \
--pid-path=/run/nginx.pid \
@Chrissi2812
Chrissi2812 / plesk_ngx_brotli.sh
Created Jun 8, 2020
This will configure nginx to build a ngx_brotli.
View plesk_ngx_brotli.sh
/#!/bin/bash
./configure --prefix=/usr/share \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--modules-path=/usr/share/nginx/modules \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--lock-path=/var/lock/nginx.lock \
--pid-path=/run/nginx.pid \
@Chrissi2812
Chrissi2812 / artisan.xml
Created Feb 14, 2020
Artisan XML for PHP storm
View artisan.xml
<?xml version="1.0" encoding="UTF-8"?>
<framework xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schemas/frameworkDescriptionVersion1.1.4.xsd" frameworkId="com.symfony.component" name="Tool_based_on_Symfony_Console_20.12.16 10:37_artisan" invoke="php.exe C:\projects\cms\artisan" alias="artisan" enabled="true" version="2">
<extraData><![CDATA[version:3]]></extraData>
<command>
<name>clear-compiled</name>
<help><![CDATA[Remove the compiled class file<br/><br/><table> <tr><td><strong>Options:</strong></td></tr> <tr><td>--help</td><td>(-h)</td><td>Display this help message</td></tr> <tr><td>--quiet</td><td>(-q)</td><td>Do not output any message</td></tr> <tr><td>--verbose</td><td>(-v)</td><td>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</td></tr> <tr><td>--version</td><td>(-V)</td><td>Display this application version</td></tr> <tr><td>--ansi</td><td></td><td>Force ANSI output</td></tr> <tr><td>--no-ansi</td><td
@Chrissi2812
Chrissi2812 / grid_mixins.scss
Last active Apr 4, 2019 — forked from ksenzee/grid_mixins.scss
Mixins that make it possible to use CSS Grid in IE 10/11 as well as in modern browsers. Based on mixins by Sascha Fuchs at https://medium.com/@gisugosu/css-grid-layout-spec-2-to-spec-1-transpiler-with-sass-415dff4dd31b.
View grid_mixins.scss
/// Add Gap between the boxes
///
/// @author Sascha Fuchs
///
/// @group core - cssgrid
///
/// @param {list} $boxes - List with box sizes
/// @param {string} $gap - Optional column gap
@function box-gap($boxes, $gap) {
$box: ();
View .htaccess
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
@Chrissi2812
Chrissi2812 / pick.js
Created Aug 22, 2018
Pick attributes from Object
View pick.js
function pick(whiteListed, arr) {
return Object.entries(arr)
.filter(([key]) => whiteListed.includes(key))
.map(([key, value]) => ({ [key]: value }));
}
@Chrissi2812
Chrissi2812 / .htaccess
Last active Jul 27, 2018
Security Headers
View .htaccess
<IfModule mod_headers.c>
# Disable malicious js in images
Header always set X-Content-Type-Options "nosniff"
# This forces https for all subdomains too!!
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
# Disallow iframing of website in other domains
Header always set X-Frame-Options "SAMEORIGIN"
# Protect Referrer
Header always set Referrer-Policy "no-referrer-when-downgrade, strict-origin-when-cross-origin"
@Chrissi2812
Chrissi2812 / .htaccess
Created Jul 27, 2018
Remove WWW from Url
View .htaccess
Rewritecond %{HTTP_HOST} !^{{ HOST }}
RewriteRule ^(.*)$ https://{{ HOST }}/$1 [R=301,L]
View keybase.md

Keybase proof

I hereby claim:

  • I am chrissi2812 on github.
  • I am flotschi (https://keybase.io/flotschi) on keybase.
  • I have a public key ASBdCyUXS8dqfwqpodWMIOrCAii6vdbdIkkTUTdmT6y7Iwo

To claim this, I am signing this object: