Skip to content

Instantly share code, notes, and snippets.

@cmod
cmod / hugofastsearch.md
Last active April 17, 2025 23:32 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator
What’s the single MOST important thing for us to add to Podia? “If Podia had [ BLANK ], I would be the happiest person in the world”.
What else can we do better? I wish Podia would improve:
What do you find difficult or confusing in Podia?
What is the primary benefit that you have received from Podia?
How would you feel if you could no longer use Podia? Why?
@hopsoft
hopsoft / prefetch.js
Last active March 4, 2025 02:01
Turbolinks Prefetching
const hoverTime = 400
const fetchers = {}
const doc = document.implementation.createHTMLDocument('prefetch')
function fetchPage (url, success) {
const xhr = new XMLHttpRequest()
xhr.open('GET', url)
xhr.setRequestHeader('VND.PREFETCH', 'true')
xhr.setRequestHeader('Accept', 'text/html')
xhr.onreadystatechange = () => {
@tomdalling
tomdalling / simple_authentication.rb
Created May 23, 2016 12:26
A simple Sinatra app that demonstrates basic authentication
#!/user/bin/env ruby
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'sinatra', '~> 1.4'
gem 'bcrypt', '~> 3.1'
end
require 'sinatra/base'