Skip to content

Instantly share code, notes, and snippets.

@Chrissi2812
Chrissi2812 / gif2mp4
Last active March 3, 2022 17:05
Converts gif to web video files (mp4, webm & vp9)
#!/bin/bash
#
ARGS=()
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
@Chrissi2812
Chrissi2812 / plesk_ngx_brotli.sh
Created June 8, 2020 12:24
This will configure nginx to build a ngx_brotli.
/#!/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 June 8, 2020 12:24
This will configure nginx to build a ngx_brotli.
/#!/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 February 14, 2020 14:46
Artisan XML for PHP storm
<?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 April 4, 2019 08:00 — 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.
/// 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: ();
@Chrissi2812
Chrissi2812 / .htaccess
Created January 22, 2019 09:29
Sperrseite
##
# @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 August 22, 2018 11:37
Pick attributes from Object
function pick(whiteListed, arr) {
return Object.entries(arr)
.filter(([key]) => whiteListed.includes(key))
.map(([key, value]) => ({ [key]: value }));
}
@Chrissi2812
Chrissi2812 / .htaccess
Last active July 27, 2018 10:10
Security Headers
<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 July 27, 2018 10:02
Remove WWW from Url
Rewritecond %{HTTP_HOST} !^{{ HOST }}
RewriteRule ^(.*)$ https://{{ HOST }}/$1 [R=301,L]

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: