Skip to content

Instantly share code, notes, and snippets.

View raae's full-sized avatar
💭
I may be slow to respond.

Benedicte Raae raae

💭
I may be slow to respond.
View GitHub Profile
@itskingori
itskingori / preprocess_assets.rb
Last active June 22, 2016 10:31
Minify Jekyll Assets On GitHub Pages Using Sprockets
require 'sprockets'
# Get relevant paths
project_root = File.expand_path('..', File.dirname(__FILE__))
app_css_file = File.join(project_root, 'assets', 'stylesheets', 'application.css')
app_js_file = File.join(project_root, 'assets', 'javascripts', 'application.js')
# Initialize Sprockets
environment = Sprockets::Environment.new
environment.append_path(File.join(project_root, '_assets', 'javascripts'))
@siffring
siffring / .htaccess
Created March 4, 2012 17:33
htaccess to password protect a specific server
# ----------------------------------------------------------------------
# Password protect staging server
# Use one .htaccess file across multiple environments
# (e.g. local, dev, staging, production)
# but only password protect a specific environment.
# ----------------------------------------------------------------------
SetEnvIf Host staging.domain.com passreq
AuthType Basic
AuthName "Password Required"