Skip to content

Instantly share code, notes, and snippets.

View Phlow's full-sized avatar
🐙
🎛️ 🔊

Moritz »mo.« Sauer Phlow

🐙
🎛️ 🔊
View GitHub Profile
@Phlow
Phlow / dateien-verzeichnis-ausgeben.php
Created February 21, 2016 14:03
Dateien innerhalb eines Verzeichnisses ausgeben
<!doctype html>
<html class="no-js" lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index</title>
<style type="text/css">
body,html {
margin: 0;
@Phlow
Phlow / box-shadow.css
Created February 6, 2016 09:29
Simple but elegant looking box-shadow to make a <div> look like a sheet of paper
.box-shadow { box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),
0 1px 5px 0 rgba(0,0,0,0.12),
0 3px 1px -2px rgba(0,0,0,0.2);
}
@Phlow
Phlow / html-typografie-test.html
Last active August 8, 2022 14:31
Test-Webseite, um alle HTML-Typografie-Elemente zu testen. #HTML
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>HTML-Typographie – Alle HTML5-Elemente testen</title>
<meta name="description" content="Test-Webseite, um alle HTML-Typografie-Elemente zu testen.">
<meta name="viewport" content="width=device-width, initial-scale=1">
@Phlow
Phlow / jekyll-loop-all-collections.liquid
Created December 26, 2015 13:20
Loop through all collections of a Jekyll website
{% for c in site.collections %}
{% assign docs=c[1].docs %}
{% for doc in docs %}
// do something
{% endfor %}
{% endfor %}
@Phlow
Phlow / jekyll-sorted-category-for-loop-alphabetical-date.liquid
Last active March 12, 2022 14:18
Jekyll (Liquid) for loop to sort posts by category in alphabetical or date-based or similiar order.
{% comment %}
#
# Change date order by adding '| reversed'
# To sort by title or other variables use {% assign sorted_posts = category[1] | sort: 'title' %}
#
{% endcomment %}
{% assign sorted_cats = site.categories | sort %}
{% for category in sorted_cats %}
{% assign sorted_posts = category[1] | reverse %}
<h2 id="{{category[0] | uri_escape | downcase }}">{{category[0] | capitalize}}</H2>
@Phlow
Phlow / jeykll-post-counter.liquid
Last active November 22, 2019 00:27
Counter: This code snippet just counts your jekyll posts and spits out the result
{% comment %}
*
* Counter: This include counts your jekyll posts
*
{% endcomment %}{% assign counter = 0 %}{% for item in site.posts %}{% unless item.published == false %}{% assign counter=counter | plus:1 %}{% endunless %}{% endfor %}{{ counter }}
@Phlow
Phlow / automatic_post_excerpt_for_post_pages.liquid
Last active March 13, 2021 17:56
This include splits the content of {{ content }} into two parts if Jekyll finds an excerpt separator. This allows extra styling of the first part to enlarge the the fontsize of the teaser for example.
{% comment %}
#
# Explanation:
#
# This include splits the content of {{ content }} into
# two parts if Jekyll finds an excerpt separator. This allows
# extra styling of the first part to enlarge the the fontsize
# of the teaser for example.
#
# The excerpt separator can be defined directly in your
@Phlow
Phlow / mailchimp-merge-tags-ansprache
Created November 28, 2015 12:02
Mailchimp IF ELSEIF Loop für die Ansprache der Empfänger
*|IF:ANSPRACHE = Familie|*
Liebe Familie *|LNAME|*
*|ELSEIF:ANSPRACHE = Ehepaar|*
Liebes Ehepaar *|LNAME|*
*|ELSEIF:ANSPRACHE = Frau|*
*|IFNOT:FNAME|*
Liebe Frau *|LNAME|*
*|ELSE|*
Liebe *|FNAME|*
*|END:IF|*
@Phlow
Phlow / list-categories-count.liquid
Last active June 4, 2021 18:33
Jekyll: List all categories with according post count and show and link all post items listed in the according category
<h2>Categories</h2>
<ul>
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="#{{ category | downcase | downcase | url_escape | strip | replace: ' ', '-' }}">{{ category | camelcase }} ({{ site.tags[category].size }})</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="#{{ category[0] | downcase | url_escape | strip | replace: ' ', '-' }}">{{ category[0] | camelcase }} ({{ category[1].size }})</a></li>
@Phlow
Phlow / .bash_profile
Created October 23, 2015 10:39 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management