Skip to content

Instantly share code, notes, and snippets.

View marcus-at-localhost's full-sized avatar
💭

Marcus marcus-at-localhost

💭
View GitHub Profile
@marcus-at-localhost
marcus-at-localhost / pure_html_css_modal.css
Last active March 13, 2021 13:36 — forked from calebporzio/pure_html_css_modal.css
[Pure HTML/CSS modal] #nojs
details summary {
cursor: pointer;
outline: none !important;
display: inline-block;
padding: 8px 12px;
padding-top: 10px;
border-radius: 4px;
overflow: hidden;
background: #F09825;
color: white;
@marcus-at-localhost
marcus-at-localhost / .htaccess
Last active November 18, 2020 13:07 — forked from orvigas/.htaccess
1&1 Hosting error 500 on Laravel 5.4 API
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteBase / # <= add this
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
@marcus-at-localhost
marcus-at-localhost / prefetch.js
Created October 13, 2020 18:16 — forked from hopsoft/prefetch.js
Turbolinks Prefetching Class
function TurbolinksPrefetcher() {
this.hoverTime = 400;
this.fetchers = {};
this.doc = document.implementation.createHTMLDocument('prefetch');
}
TurbolinksPrefetcher.prototype.fetchPage = function (url, success) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
@marcus-at-localhost
marcus-at-localhost / boost.unpoly.js
Last active July 7, 2020 18:37 — forked from johndwells/boost.unpoly.js
[Automatically pass all same-domain links through unpoly.js] #unpolyjs
// Automatically bind internal links to `up-follow` behaviour
// Unpoly will already catch and handle links with explicit `up-follow` etc,
// so we are safe to assume that if our handler below is triggered, the link
// doesn't already have an up- attribute.
//
// Scenarios to handle:
// Hat-tip to https://github.com/instantpage/instant.page/blob/master/instantpage.js
// ✅ cmd+click
// ✅ empty links
// ✅ links to another domain
@marcus-at-localhost
marcus-at-localhost / index.html
Created July 6, 2020 17:55 — forked from jsanta/index.html
PWA index.html file for Android and iOS copy & paste enabled
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Ionic App</title>
<base href="/" />
<meta
name="viewport"
@marcus-at-localhost
marcus-at-localhost / listAllEventListeners.js
Created June 4, 2020 06:24 — forked from tkafka/listAllEventListeners.js
List all event listeners in a document
console.table((function listAllEventListeners() {
const allElements = Array.prototype.slice.call(document.querySelectorAll('*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
let elements = [];
for (let i = 0; i < allElements.length; i++) {
@marcus-at-localhost
marcus-at-localhost / bootstrap-4-sass-mixins-cheat-sheet.scss
Created January 3, 2020 08:12 — forked from anschaef/bootstrap-4-sass-mixins-cheat-sheet.scss
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.4.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
// Grid variables
$grid-columns: 12;
$grid-gutter-width: 30px;
@marcus-at-localhost
marcus-at-localhost / Direct Link of YouTube videos.md
Created November 4, 2019 19:39 — forked from egyjs/Direct Link of YouTube videos.md
PHP API To get Direct Link of YouTube videos
@marcus-at-localhost
marcus-at-localhost / endpoints.md
Created October 16, 2019 16:33 — forked from derhuerst/_.md
List of HAFAS API Endpoints
@marcus-at-localhost
marcus-at-localhost / __why-and-how-to-use.md
Last active June 12, 2020 09:16 — forked from passcod/__why-and-how-to-use.md
[Bootstrap 4 mixins for spacing utilities without classes] #bootstrap #mixin

Why?

This:

.action {
  @extend .ml-3;
}