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
sudo add-apt-repository ppa:ondrej/php -y | |
sudo add-apt-repository ppa:certbot/certbot -y | |
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get autoremove -y | |
sudo apt-get install nginx python3-certbot-nginx mariadb-server php7.4-common php7.4-cli php7.4-fpm php7.4-opcache php7.4-gd php7.4-mysql php7.4-curl php7.4-intl php7.4-xsl php7.4-mbstring php7.4-zip php7.4-bcmath php7.4-soap unzip git -y | |
sudo update-alternatives --set php /usr/bin/php7.4 | |
sudo sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.4/fpm/php.ini | |
sudo sed -i 's/max_execution_time = 30/max_execution_time = 120/g' /etc/php/7.4/fpm/php.ini |
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 | |
# `gitea dump` doesn't currently back up LFS data as well, only git repos | |
# It primarily backs up the SQL DB, and also the config / logs | |
# We'll backup like this: | |
# * "gitea dump" to backup the DB and config etc | |
# * tar / bzip all the repos since they will be skipped | |
# * Not rotated because git data is immutable (normally) so has all data | |
# * rsync LFS data directly from /volume/docker/gitea/git/lfs | |
# * No need for rotation since all files are immutable |
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 | |
if(isset($_FILES["upload"])){ | |
$ext = ".".end((explode(".", $_FILES["upload"]["name"]))); | |
$filename="test"; | |
$file_public_addr =yourlocaladdr.$filename.$ext; | |
$success=move_uploaded_file($_FILES["upload"]["tmp_name"],SYS_EXT.$file_public_addr); | |
if( $success){ | |
$json["uploaded"]=true; |
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
/* | |
Reboot | |
Normalization of HTML elements, manually forked from Normalize.css to remove styles targeting irrelevant browsers while applying new styles. | |
Normalize is licensed MIT. https://github.com/necolas/normalize.css | |
* Bootstrap v4.0.0-beta (https://getbootstrap.com) | |
* Copyright 2011-2017 The Bootstrap Authors | |
* Copyright 2011-2017 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ | |
/* |
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
/** | |
* Optimize image image | |
* | |
* https://developers.google.com/speed/docs/insights/OptimizeImages | |
* -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace sRGB | |
* | |
* @access public | |
* @param string $filePath Path of the file | |
* @return string Raw image result from the process | |
*/ |
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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
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 | |
class AMP { | |
private $html; | |
/** | |
* HtmlToAmp constructor. | |
*/ | |
public function __construct($htmlContent) { |
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/sh | |
# Update hekko.pl SSL certificate page automatically with Let's Encrypt cert | |
# Provide $login and $pass to your environment to disable manual login page | |
# Outputs will be generated in CWD ! | |
domain='example.com' | |
chain='chain.crt' | |
ca='isrgrootx1.pem' | |
useragent='Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0' | |
cookiefile='.cookies' |
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
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var argv = require('minimist')(process.argv); | |
var prompt = require('gulp-prompt'); | |
var rsync = require('gulp-rsync'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var browserSync = require('browser-sync'); | |
var useref = require('gulp-useref'); |
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 | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
NewerOlder