Skip to content

Instantly share code, notes, and snippets.

View akroii's full-sized avatar
:bowtie:
Busy Agenturfutzie

Andreas Kroll akroii

:bowtie:
Busy Agenturfutzie
View GitHub Profile
@c4y
c4y / _README.md
Last active January 4, 2024 16:50
Entwicklungsumgebung

Allgemeines

Auf der Suche nach der "perfekten" Entwicklungsumgebung für die Webentwicklung habe ich mir meine eigene Lösung gebaut.

Folgende Ziele waren mir dabei wichtig:

  • Nutzung eines Linux-Servers
  • Einsatz von Docker (Compose)
  • keine manuelle Änderung an DNS Einträgen
  • keine manuelle Konfiguration von vHost Einträgen
/*
* Accessible AccordionTabs, by Matthias Ott (@m_ott)
*
* Based on the work of @stowball (https://codepen.io/stowball/pen/xVWwWe)
*
*/
(function () {
'use strict';
@w3collective
w3collective / js-scroll-to-top-button.html
Created May 23, 2022 06:43
How to create a scroll to top button with JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>How to create a scroll to top button with JavaScript</title>
<style>
html,
body {
padding: 0;
@akroii
akroii / html
Last active July 22, 2022 14:36
Ultra performant device checking
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>huhu</title>
<meta name="viewport" content="width=device-width">
<style>
html {
touch-action: manipulation;
@timn5835
timn5835 / main.js
Created January 11, 2021 16:36
[Local Storage] Stores a value in browser local storage #js #localstorage #cookies
var alerted = getWithExpiry('covid19');
if (alerted != 'yes') {
$('.alert-dismissible.orange-bg.pr-0').addClass('d-flex');
}
$('body').on('close.bs.alert', '.alert-dismissible.orange-bg.pr-0', function () {
// localStorage.setItem('covid19','yes');
setWithExpiry('covid19', 'yes', 3600000)
});
@joemidi
joemidi / enabler.exits.js
Last active July 12, 2024 15:43
Enabler exits
var queryString = 'q=headphones';
banner.addEventListener('click', function () {
Enabler.exitQueryString('clickthrough', queryString);
});
// You can use the Enabler.exitQueryString() method to apply an query string to an exit URL.
// Note that the base URL will still come from within the Studio interface.
// Alternatively you can create the full URL yourself using Enabler.exitOverride()
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>vodafone</title>
<meta name="ad.size" content="width=970,height=250" />
<script>
document.write('<script src="' + (window.API_URL || 'https://s1.adform.net/banners/scripts/rmb/Adform.DHTML.js?bv=' + Math.random()) + '"><\/script>');
@akroii
akroii / .htaccess
Last active November 25, 2019 07:05
Redirect to SSL, based on a condition
#works sometimes
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} vvvvvv\.de$ [NC]
RewriteRule ^https://www.vvvvvv.de%{REQUEST_URI} [R=301,L,NE]
#redirect SPECIFIC host
RewriteCond %{HTTP_HOST} ^vvvvvv\.de [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI}
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]
@ambercouch
ambercouch / refreshat.js
Last active June 10, 2024 18:29
Refresh the browser and a specific time (23:00:00)
function refreshAt(hours, minutes, seconds) {
var now = new Date();
var then = new Date();
if(now.getHours() > hours ||
(now.getHours() == hours && now.getMinutes() > minutes) ||
now.getHours() == hours && now.getMinutes() == minutes && now.getSeconds() >= seconds) {
then.setDate(now.getDate() + 1);
}
then.setHours(hours);