Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am chap on github.
  • I am chapambrose (https://keybase.io/chapambrose) on keybase.
  • I have a public key ASA0zBTztRDLGB3AVhzcRHGJvcr9RIQxhzVnHvYXVu0KCAo

To claim this, I am signing this object:

@chap
chap / adams-heroku-values.md
Created November 30, 2017 16:57 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

<div style="background-color:red; color:white"><pre>* * * PHP ERROR * * *
Undefined variable: error
FILE: /global/mnt/ebs1/read/www.fracturedatlas.org/2014-03-16/php/libs/Recaptcha.php
LINE: 56
URI: /ajax/Join/join
REFERER: http://localhost:8000/signups/new?service=http://localhost:8000/login?service=http://fundingworks.dev:5000/tame-impala</pre><pre>File: 116 - /global/mnt/ebs1/read/www.fracturedatlas.org/2014-03-16/php/libs/faException.php
Call: Debug :: displayError (8, "Undefined variable: error", "/global/mnt/ebs1/read/www.fracturedatlas.org/2014-03-16/php/libs...", 56)
@chap
chap / mfg-server.rb
Last active July 27, 2016 15:18
Sinatra app for particle.io testing and programming.
require 'sinatra'
require 'active_record'
require 'httparty'
COM_PORT = "COM8"
api_host = 'https://...'
api_auth_token = '...'
SYSTEM_FIRMWARE_VERSION = '0.5.3-rc.1'
ActiveRecord::Base.establish_connection(
@chap
chap / authable.rb
Created February 20, 2013 15:44
Simple module for doing Oauth with google.
module Authable
extend ActiveSupport::Concern
OAUTH_CLIENT_ID = '123.apps.googleusercontent.com'
OAUTH_CLIENT_SECRET = '456'
OAUTH_BASE_URL = 'https://www.googleapis.com/oauth2/'
OAUTH_SCOPE = ['https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile']
module ClassMethods
def google_oauth_url(callback_url)
@chap
chap / stagingmail.md
Last active December 11, 2015 02:39
stagingmail.md

Staging Mail is an add-on that provides an alternate SMTP server and mailbox for development and staging enviornments.

Adding Staging Mail to an application provides:

  • A browser-based interface to previewing email sent by an application without clogging a personal mailbox.
  • An easy way to forward messages to clients for approval or testing.
  • Assurance that messages from test enviornments never reach production customers.

The Staging Mail addon supports any language, framework, or application that sends mail via SMTP.

@chap
chap / stagingmail.rb
Last active December 11, 2015 01:48
Staging Mail Add-on Initializer
unless Rails.env.production?
ActionMailer::Base.smtp_settings = {
:address => 'smtp.stagingmail.com',
:port => '10587',
:authentication => :plain,
:user_name => ENV['STAGINGMAIL_API_KEY'],
:password => ENV['STAGINGMAIL_API_PASSWORD'],
:enable_starttls_auto => true
}
ActionMailer::Base.delivery_method = :smtp
http://moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
Other way to install rubies:
https://github.com/sstephenson/rbenv
https://github.com/sstephenson/ruby-build
<script>alert("i'm executing javascript!");</script>
@chap
chap / vegan-month.md
Created November 19, 2011 22:35 — forked from xaviershay/vegan-month.md
Vegan Month Curriculum

Vegan Month Logo

Back in Melbourne circa 2010/11, Jodie, Jared and I used to run a [monthly vegan mentoring group][vegan-month]. I have gone back through the mailing lists and collected much of the curriculum and information from the program into this single document, so that I can distribute it more widely. The program was designed not just to get you through the first month nutritionally, but to expose you to a variety of foods and ideas that may be new to you. It emphasises that veganism is a shift sideways, not a sacrifice.