Skip to content

Instantly share code, notes, and snippets.

@calumgunn
calumgunn / Rails 4 Assets Fix
Created August 15, 2013 13:27
Rails 4 assets trouble? Here you go.
Are your images disappearing when you deploy your Rails 4 app to Heroku? Mine were, but I think I figured it out. I don't claim to be any kind of Ruby on Rails expert, but after a lot of trial and error I found that these steps got my static assets uploading and displaying.
1. In your Gemfile:
gem 'rails_12factor', group: :production
Be sure to run 'bundle install' in your terminal after adding this (or any) gem.
2. In config/environments/production.rb, change these properties to 'true':
config.serve_static_assets = true
config.assets.compile = true

Keybase proof

I hereby claim:

  • I am calumgunn on github.
  • I am calumgunn (https://keybase.io/calumgunn) on keybase.
  • I have a public key whose fingerprint is 7E5A 615F 2D35 B68E 1E79 58F0 2BB3 27F0 FD25 D3D4

To claim this, I am signing this object:

@calumgunn
calumgunn / feature-index.json
Last active August 29, 2015 14:10
Output from PageIndexer
{
"created_at":"2014-11-24T16:22:01Z",
"intro":"Gift Cards for the Electric Cinema are now available to buy online \u2013 the perfect gift for film lovers.",
"name":"Give the Gift of Film this Christmas",
"path":"/features/give-the-gift-of-film-this-christmas",
"subtitle":"",
"title":"",
"updated_at":"2014-11-24T16:24:43Z",
"assets":[
"http://www.houseseven.com/system/files/112012/50b3a0ecaac7804d7000009a/admin/9527.jpg?1416849654"
@calumgunn
calumgunn / event.json
Created November 27, 2014 17:00
Event JSON
{
"created_at":"2014-11-10T21:05:01Z",
"description":"We\u2019ll be hosting a traditional Thanksgiving Feast and would love to see you and your family. Join us as we serve up a prix fixe menu that includes turkey, and all the fixings, including pies. We\u2019ll even do the dishes for you so it\u2019s a win-win situation. $45 per person / $20 for kids under 12, tax and service exclusive. To join, please contact Reception at (212) 627-9800.",
"name":"THANKSGIVING FEAST",
"updated_at":"2014-11-27T15:19:57Z",
"assets":[],
"slices":[],
"venue":"Soho House New York"
}
@calumgunn
calumgunn / recipe.json
Created November 27, 2014 17:01
Recipe JSON
{
"created_at":"2014-07-02T13:56:09Z",
"description":"",
"name":"Marinated \u0026 Grilled Shrimp with Belly Fire Guacamole",
"path":"/recipe/marinated-and-grilled-shrimp-with-belly-fire-guacamole",
"title":"","updated_at":"2014-07-02T15:00:05Z",
"assets":[
"http://www.houseseven.com/system/files/072014/53b4103342fb6d7b8e0027e3/admin/Shrimp_2.jpg?1404309643"
],
"slices":[
@calumgunn
calumgunn / bedroom.json
Created November 27, 2014 17:02
Bedroom JSON
{
"created_at":"2012-12-11T17:14:58Z",
"description":"",
"name":"Shoreditch House",
"path":"/book-a-room/shoreditch-house",
"title":"",
"updated_at":"2014-09-30T13:14:04Z",
"assets":[
"http://www.houseseven.com/system/files/122012/50cb3f16aac7807283000001/admin/shb-3.jpg?1385048250",
"http://www.houseseven.com/system/files/122012/50cb3f19aac7807283000002/admin/shb-5.jpg?1373900905",
// open SC
// press CMD+B to boot the server
// click anywhere in the below text
// press CMD+ENTER
// make sure ya speakers aren't too loud first tho
(
~a = NodeProxy.new;
~a.play;
~a[0] = {
@calumgunn
calumgunn / API.js
Last active January 29, 2018 12:16
// Response from querying API with user token
// Rough idea for what I think would be useful for the front-end
{
"hearing_insights": {
"descriptor": "Very good!", // The user's hearing summed up (Very good, average, etc - localized?)
"ear_left": 96,
"ear_right": 84,
"freqs": [
"high": {
Barry Vercoe - Synthesism
Michel Waisvisz - The Hands (Movement 1)
John Chowning - Turenas
Michael Masaru Flora - nothing
Laurie Spiegel - Immersion
Lee Fraser - Instantia-Crucis
Pauline Oliveros - V of IV
Iannis Xenakis - Diamorphoses
Haswell & Hecker - Movement 3
Selvhenter - Tribute

Keybase proof

I hereby claim:

  • I am calumgunn on github.
  • I am monocosm (https://keybase.io/monocosm) on keybase.
  • I have a public key ASDHPCiB-j-UpvDElNmm9r1HOTGAmnyMOMBAzBbOLizNCQo

To claim this, I am signing this object: