This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# encoding: utf-8 | |
# | |
# TOTP implementation (google authenticator) | |
# | |
# Reads ~/.google-authenticator-accounts for account info. | |
# For security, you should run `chmod 600 ~/.google-authenticator-accounts | |
# | |
# Changelog: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allposts = []; | |
function redirectToCorrectPage() { | |
console.log("Unable to find page. Trying other URL cases."); | |
{% for post in site.pages %} | |
allposts.push("{{ post.url }}"); | |
{% endfor %} | |
var url = window.location.pathname; | |
// strip trailing / | |
if (url.slice(-1) === "/") { | |
url = url.slice(0, -1); |