One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
<gistThat info="this is a manifest for gistThat VBA code distribution - see ramblings.mcpher.com for details"> | |
<manifest description="cDataset and associated classes and modules" contact="bruce@mcpher.com"> | |
<gists> | |
<item1 gistid="3414216" version="" filename="cCell.cls" module="cCell" type="class" /> | |
<item2 gistid="3414216" version="" filename="cDataSet.cls" module="cDataSet" type="class" /> | |
<item3 gistid="3414216" version="" filename="cDataSets.cls" module="cDataSets" type="class" /> | |
<item4 gistid="3414216" version="" filename="cDataColumn.cls" module="cDataColumn" type="class" /> | |
<item5 gistid="3414216" version="" filename="cDataRow.cls" module="cDataRow" type="class" /> | |
<item6 gistid="3414216" version="" filename="cHeadingRow.cls" module="cHeadingRow" type="class" /> | |
<item7 gistid="3414346" version="" filename="" module="usefulStuff" type="module" /> |
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load | |
' bootstrap code to update VBA modules from gists | |
' all code is in this module - so no classes etc. | |
' latebinding is used to avoid need for any references | |
' can be found at https://gist.github.com/3403537 | |
Option Explicit | |
' v2.04 - 3403537 | |
' if you are using your own gists - change this | |
Const gistOwner = "brucemcpherson" |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.
Now look up. Further. Above the post title. See that grey text with the gist ID?
Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.
If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.