Skip to content

Instantly share code, notes, and snippets.

View tersor's full-sized avatar

Terje Sørbø tersor

View GitHub Profile
@tersor
tersor / auth.go
Created May 20, 2021 08:52
Golang basic auth example
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)
<?php
/**
* Wordpress Bootstrap navbar walker
*
* For WordPress version 3.0.0+ and Bootstrap 3+
*
* Set Title Attribute to "divider" for submenu divider.
* Set Title Attribute to "header" for submenu header.
*
* Code example:
@tersor
tersor / ubuntu_ruby_install.sh
Created August 20, 2012 05:51
Ubuntu Ruby install - rbenv and ruby-build
#!/bin/bash
# Install rbenv
# https://github.com/sstephenson/rbenv
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
echo 'eval "$(rbenv init -)"' >> .bash_profile