Skip to content

Instantly share code, notes, and snippets.

View TeddyBear06's full-sized avatar
:octocat:

T3d TeddyBear06

:octocat:
View GitHub Profile
@TeddyBear06
TeddyBear06 / .htaccess
Created March 2, 2023 17:27 — forked from Zodiac1978/.htaccess
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/
@TeddyBear06
TeddyBear06 / flash-app.js
Created March 31, 2022 18:52 — forked from brianmacarthur/flash-app.js
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines
@TeddyBear06
TeddyBear06 / README.md
Last active March 1, 2022 22:20
Fix apt issues on Ubuntu 20.04 under WSL2

Fix apt-get update on Ubuntu 20.04 under WSL2

I recently cannot run a apt-get update resulting in a kind of - weird - temporary network issue...

Execute the following lines to adress this issue:

wget https://gist.githubusercontent.com/TeddyBear06/f2524b8b2d0e15336c4f8463127f5332/raw/cc54c875310d7be4e768bf6c50df496ac4294cbb/fix_apt_update_under_WSL.sh
chmod +x fix_apt_update_under_WSL.sh
sudo ./fix_apt_update_under_WSL.sh
@TeddyBear06
TeddyBear06 / cd_wsl.md
Created January 31, 2022 20:15
Mount CD under WSL
$ sudo mkdir /mnt/f
$ sudo mount -t drvfs F: /mnt/f
@TeddyBear06
TeddyBear06 / gist:cedae273d0c968ae6b14cb04bae4fd64
Last active January 30, 2022 16:35
GitLab Docker installation

🎇 GitLab and GitLab runner using Docker 🎇

⚠️ There are known issues running GitLab/GitLab runner using Docker on Windows, please use GNU/Linux or macOS ⚠️

ℹ️ Run the installation on a brand new host without any previous services running on ports 22, 80 nor 443 ℹ️

🐳 Tested using Docker Desktop 4.4.4 (73704).

A. Map custom domain

@TeddyBear06
TeddyBear06 / defer.html
Created December 14, 2021 11:47
HubSpot real defer loading
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ=="