Skip to content

Instantly share code, notes, and snippets.

View philipjabenton's full-sized avatar

Philip J.A Benton philipjabenton

View GitHub Profile
@philipjabenton
philipjabenton / middleman_dev_approaches.md
Created May 12, 2016 11:42 — forked from kaplan/middleman_dev_approaches.md
Local development setup approaches for Middleman with Pow or Apache with the Mac OS.

Middleman Local Dev Approaches

Update 03-03-2015
I've moved over to a new MacBookPro running 10.10.2. I think I'm going to leave POW off this machine. I've been trying to use more Vagrant VMs in general, but the Localhost is so fast for just getting something in the browser, especially when testing things out on the front end in the browser. One thing I'm noticing about the 2nd approach is that the build with a vhost works great, but just getting the .git setup was a little tricky. I had to make the main directory, the build directory and git init in each. Then, I added the remotes from the working (development) repository for the source and the staging server repo for the build. Looks like I might install Passenger on this new machine so that I can use a vhost for the source files. Otherwise I need to use the http://0.0.0.0:4567/ or http://localhost:4567/ which isn't a bad thing vs installing Passenger?

Udpate 03-03-2015
Wow, just installed Phusion Passenger in about 15min using the g

# https://middlemanapp.com/advanced/dynamic_pages/
data.content.post.each do |id,post|
proxy "post/#{post.slug}.html", "post/template.html", :locals => { :post => post }, :ignore => true
end
@philipjabenton
philipjabenton / index.html
Created July 1, 2013 17:18
A CodePen by Philip Benton. Navigation Bar Show on Scroll Up - Navigation bar fixed at the top of the browser which hides upon scrolling down the page. Upon scrolling up the bar shows itself. No need to scroll to the top of the browser window.
<!DOCTYPE html>
<html>
<head></head>
<body>
<nav class="navigation-bar is-visible" data-nav-status="toggle">
<ul>
<li>Home</li>
<li>About</li>
<li>Services</li>
@philipjabenton
philipjabenton / targets_located_twitter_plugin_fix.php
Created November 19, 2012 12:07
Targets Located Twitter Plugin fix
/* $messages = fetch_rss( 'http://twitter.com/statuses/user_timeline/' . $username . '.rss' ); */
$messages = fetch_rss( 'https://api.twitter.com/1/statuses/user_timeline.rss?&screen_name=' . $username );