Skip to content

Instantly share code, notes, and snippets.

How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).

The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:

* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS

Note: I am not using the Heroku Zerigo DNS add-on, instead I have a separate Zerigo account for my DNS needs. I do this because Zerigo offers 30 hosts on free direct accounts, versus only 10 hosts on the free Heroku add-on.

# grab a page
page = Page.find(1)
# grab the page's list of content_items and eager load each page's markups
content_items = page.content_items.includes(:markups)
# first content_item
content_item = content_items.first
# returns a collection of markups - doesn't output a SQL query
content_item.markups
/* vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab: */
var path = require( 'path' ),
sys = require('sys'),
exec = require('child_process').exec;
module.exports = function ( grunt ) {
grunt.initConfig({
init: {},
express: {
custom: {

VIMRC

  1. git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
  2. Replace the contents of your .vimrc with this one
  3. Open vim and run :BundleInstall
  4. cd ~/.vim/bundle/vim-javascript
  5. rm -Rf syntax

Steps 4 & 5 are to get rid of conflicts. vim-javascript has indentation info for JS, but vim-javascript-syntax has much better syntax highlighting.

@tybenz
tybenz / map.geojson
Created August 9, 2013 19:20
via:geojson.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tybenz
tybenz / for-real.sh
Created June 21, 2013 20:08
Make a commit with previous commit message plus "for real"
#!/bin/bash
message="`git log --pretty=%B -1` - for real"
git commit -m "$message"
@tybenz
tybenz / .vimrc
Created June 5, 2013 18:22
.vimrc
let hour = strftime("%k")
let hour = substitute(hour, '^\s*\(.\{-}\)\s*$', '\1', '')
let morning = $TERMINATOR_MORNING
let evening = $TERMINATOR_EVENING
if (morning + 0) <= hour && hour < (evening + 0)
color Tomorrow
else
color Tomorrow-Night
endif
noremap <leader>d :color Tomorrow-Night<CR>
@tybenz
tybenz / term
Created June 5, 2013 18:22
term
#!/bin/bash
hour=`date "+%k"`
if [ "$hour" -ge "$TERMINATOR_MORNING" ] && [ "$hour" -lt "$TERMINATOR_EVENING" ];then
terminator -p light
else
terminator -p default
fi
@tybenz
tybenz / index.html
Last active December 17, 2015 22:59
A CodePen by Tyler Benziger. Boids - Simple flocking boids algorithm ~ from when I was first experimenting with AI... plenty of improvements to be made now that I look back at it :)
<script src="script.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="style.css"
<canvas id='canvas'></canvas>
@tybenz
tybenz / lenovo-mute-tut.md
Last active July 29, 2021 06:34
Enabling mic mute button and light on Lenovo Thinkpads

#####Copied from askubuntu's Enabling mic mute button and light on Lenovo Thinkpad

There are two possible "hardware" indicators (to show that mute is on or off):

The Power button light (green) will blink to show when mute is on The Mic mute button light (orange) will be on or off to show mute status (just like in Windows)

Solution 2 requires a patched thinkpad_acpi kernel module, and is only recommended for advanced users who know what they are doing. This is because the patch is not included by the thinkpad_acpi developers by default, (See this discussion for more details).

###Common Steps