Skip to content

Instantly share code, notes, and snippets.

@snrbrnjna
snrbrnjna / exclude_home.rb
Created November 29, 2013 20:24
To exclude some configurable posts from Jekyll's default pagination on index.html pages
module Jekyll
module Generators
class Pagination
# Monkey patch this method to exclude some cats and tags from all standard
# paginators
#
# For this to take effect, you have to define a ``exclude_home`` property in your _config.yml:
#
# exclude_home:
# categories: [notes]
@snrbrnjna
snrbrnjna / .htaccess
Last active May 10, 2022 01:56
Jekyll Auth Plugin - to manage http basic auth for jekyll generated pages and directories
#### Jekyll Layout: /_layouts/.htaccess
# Apache Configuration File
{% if ((page.auth_dir.users != empty) or (page.auth_dir.groups != empty)) %}
AuthName "Privater Bereich"
AuthType Basic
# => mehrere Require Blocks werden geodert: http://d43.me/blog/1157
AuthzUserAuthoritative Off
AuthUserFile {{ page.auth_remote_user_file }}
@snrbrnjna
snrbrnjna / .eslintrc
Created March 22, 2016 09:21
es6 style
{
"globals": {
"log": false
},
"rules": {
"indent": [
2,
2,
{"VariableDeclarator": { "var": 2, "let": 2, "const": 3}}
],
@snrbrnjna
snrbrnjna / gist:3ab82c16d3c75166621611be050723eb
Last active February 17, 2017 11:27 — forked from silviorelli/gist:ad8e1d80bdc0245eb7e7
Install Ruby 1.8.7 on Mac OSX 10.11 El Capitan with rbenv
CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2k rbenv install 1.8.7-p302
@snrbrnjna
snrbrnjna / .htaccess
Last active November 24, 2020 18:02
Config for Cachify Plugin in HDD mode delivering .br (brotli) or .gzip versions of the cached files
# BEGIN CACHIFY
<IfModule mod_rewrite.c>
# ENGINE ON
RewriteEngine on
RewriteBase /
# set hostname directory
RewriteRule .* - [E=CACHIFY_HOST:https-%{HTTP_HOST}]
# set Doument root - `DCOUMENT_ROOT` is set to ~/html - the virtual host config on uberspace
RewriteRule .* - [E=MY_DOCUMENT_ROOT:/var/www/virtual/user/html]