Skip to content

Instantly share code, notes, and snippets.

@andrelug
andrelug / gist:71558d8c92c17c239a274c1ab0f63d18
Last active April 28, 2017 03:20
Pagination for Hugo Websites
<nav class="navigation pagination" role="navigation">
<div class="nav-links">
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<!-- Create variable to store current page -->
{{ $current := .Paginator.PageNumber }}
<!-- I decided that I'll only show the first option when current page is greater than 4 -->
{{ if ge $current 4 }}
<a class="prev page-numbers" href="{{.Paginator.First.URL}}">First</a>

Keybase proof

I hereby claim:

  • I am andrelug on github.
  • I am andrelug (https://keybase.io/andrelug) on keybase.
  • I have a public key whose fingerprint is 6950 267C 3323 A537 223E DB25 BCA1 4F84 3F8D C8A4

To claim this, I am signing this object:

@andrelug
andrelug / blabla
Last active September 5, 2015 06:44
#!/bin/bash
# Updating Ubunut
echo "updating ubunutu... please be patient"
apt-get update && apt-get upgrade -y
echo "installing required packages... please be patient"
apt-get install htop lib32gcc1 -y
# Create steam user if needed
#!/bin/bash
#
# Net Installer, used with curl
#
channel=${2:-master} # if defined by 2nd argument install the defined version, otherwise install master
# Download and untar installation files
cd /mnt/tmp
@andrelug
andrelug / ark.sh
Last active September 3, 2015 19:29
#!/bin/bash
# Updating Ubunut
echo "updating ubunutu... please be patient"
apt-get update && apt-get upgrade -y
echo "installing required packages... please be patient"
apt-get install htop lib32gcc1 -y
# Create steam user if needed
@andrelug
andrelug / www.conf
Created September 12, 2013 11:45
www.conf - Digital Ocean - Gueime
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'