updated posting and adjusted css

This commit is contained in:
Brendan McDevitt 2019-01-27 06:14:26 -05:00
parent e8081232c7
commit d2a1af8f22
5 changed files with 93 additions and 8 deletions

View file

@ -25,9 +25,10 @@ github_username: booboy
# Build settings
markdown: kramdown
theme: minima
collections:
# 100-days-of-code:
# output: true
homelab:
output: true
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list

View file

@ -1,5 +1,5 @@
---
layout: post
layout: homelab
title: "homelab - squid proxy"
date: 2019-01-27
categories: homelab
@ -19,18 +19,16 @@ the HTTP connections, for science!
Also, for a fun bonus read that inspired me to read up and learn more about
squid in particular is this really interesting write-up by Anthony Ferrara on how he hacked stackoverflow. Also some very good info on the `X-Forwarded-For` http header. I won't spoil how he gains admin access. Here is a [link](https://blog.ircmaxell.com/2012/11/anatomy-of-attack-how-i-hacked.html) to the writeup.
* Code - [centos_squid_proxy](https://git.mcdevitt.tech/bpmcdevitt/homelab_scripts/tree/master/vagrant/centos_squid_proxy)
* Squid - http://www.squid-cache.org/Doc
* Vagrant - https://www.vagrantup.com
* X-Forwaded-For https://en.wikipedia.org/wiki/X-Forwarded-For
* Squid - <http://www.squid-cache.org/Doc>
* Vagrant - <https://www.vagrantup.com>
* X-Forwaded-For <https://en.wikipedia.org/wiki/X-Forwarded-For>
Shellscript to install squid in CentOS 7 (nice and simple):
```bash
#!/usr/bin/env bash
# update yum
sudo yum update -y
# install and enable squid proxy
sudo yum -y install squid

6
_layouts/homelab.html Normal file
View file

@ -0,0 +1,6 @@
---
layout: default
---
<div id="homelab">
{{ content }}
</div>

View file

@ -72,6 +72,21 @@ ul.posts {
font-size: 80%;
}
ul.homelab {
list-style-type: none;
margin-bottom: 2em;
}
ul.homelab li {
line-height: 1.75em;
}
ul.homelab span {
color: #aaa;
font-family: Monaco, "Courier New", monospace;
font-size: 80%;
}
/*****************************************************************************/
/*
/* Site
@ -200,3 +215,62 @@ ul.posts {
#related h2 {
margin-bottom: 1em;
}
/*****************************************************************************/
/*
/* Homelab Posts
/*
/*****************************************************************************/
#homelab {
}
/* standard */
#homelab pre {
border: 1px solid #ddd;
background-color: #eef;
padding: 0 .4em;
}
#homelab ul,
#homelab ol {
margin-left: 1.35em;
}
#homelab code {
border: 1px solid #ddd;
background-color: #eef;
font-size: 85%;
padding: 0 .2em;
}
#homelab pre code {
border: none;
}
#homelab img {
max-width: 42em;
padding: 1em 0;
}
/* terminal */
#homelab pre.terminal {
border: 1px solid black;
background-color: #333;
color: white;
}
#homelab pre.terminal code {
background-color: #333;
}
#related {
margin-top: 2em;
}
#related h2 {
margin-bottom: 1em;
}

View file

@ -10,3 +10,9 @@ title: brendan mcdevitt
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
<h1>Homelab Posts</h1>
<ul class="homelab">
{% for post in site.homelab %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>