Skip to content

Instantly share code, notes, and snippets.

@data-doge
data-doge / gist:5e40a059d2340e33b1cc
Last active November 3, 2015 20:59
cobudget beta reset password flow

feature: user can reset password

  • there are two situations being addressed here:

    • situation 1: user has already been invited to cobudget, but they lost the invite email, and never had the opportunity to 'set up' [please see note at bottom] their account.

      when they submit the 'forgot_password' form, an identical email to the one they were supposed to receive is sent again. this email has a link to the 'confirm_account' page, and that link has an identical confirmation_token as the email previous.

      the user clicks that link, and the flow is identical to that described in the note below.

STS:
1. clicking on a customer_feedback expands it and displays information about the customer conversion
- if no history
- no view/hide history btn
- if unresolved
- survey history
- sent_at
null
### @ngInject ###
global.cobudgetApp.factory 'BucketModel', (BaseModel) ->
class BucketModel extends BaseModel
@singular: 'bucket'
@plural: 'buckets'
@indices: ['groupId', 'userId']
relationships: ->
@data-doge
data-doge / diglettFuckdown.js
Last active August 29, 2015 14:26
fun jQuery scripts, run on any site with jQuery
var diglettUrl = "https://fc06.deviantart.net/fs70/f/2010/165/9/4/050___Diglett_by_cammarin.png";
function initiateDiglettFuckdown () {
$('img').attr('src', diglettUrl);
$('a').text('DIGLETT');
$('*').each(function(i, element) {
var width = $(element).width();
$(element).css({
'backgroundImage' : 'url(' + diglettUrl + ')',
'backgroundSize' : width / 10

Deploy with heroku

Typical Heroku Deploy

This deploy procedure is typical for the the Sinatra skeleton on which our challenges are based. If you are on the EDA computers then the Heroku Toolbelt is already installed. If you are on your own computer then you have to install it first.

A note is that Heroku's free account locks you in to a specific public SSH key. This means if one person deploys to their Heroku account with a EDA computer that computer is affectivly locked to their account until they delete the computer's SSH key from their Heroku account (the SSH key gets automatically re-uploaded after each deploy). Long story short, if you can, it is likely just easier to deploy from a personal computer. If you can't then no worries, just try to remember to delete the SSH key from your Heroku account after you are done with the computer (you can ask me, Joshua, or a Ruby coach for help if you need it).

@data-doge
data-doge / heroku-notes.txt
Created July 28, 2015 02:34
heroku notes
heroku notes:
after creating a heroku account, and downloading the heroku toolbelt
- test your app locally
- make sure your app's folder has been initialized as a git repo
- IMPORTANT: your .git folder, must be in the root of your application
- if not, terrible error message: "no cedar-supported app detected"
class Console
def render_help!
puts "available commands: "
puts "list"
puts "add <description>"
puts "delete <id>"
puts "tick <id>"
puts "untick <id>"
end
require_relative '../config'
class CreateStudents < ActiveRecord::Migration
def change
create_table :students do |t|
t.string :first_name
t.string :last_name
t.string :gender
t.date :birthday
t.string :email
source 'https://rubygems.org'
gem 'coinbase'