Skip to content

Instantly share code, notes, and snippets.

FactoryGirl.define do
factory :invitation do
sequence(:id) { |n| n }
created_at "2014-06-24 10:45:28"
updated_at nil
email { |n| "person#{n}@example.com" }
workshop_ids ["http-fundamentals", "rails-security"]
token "alQmOQUU5WmGgayFZzbGKg"
redeemed_at nil
user_id nil
@Rosa-Fox
Rosa-Fox / gist:cccb4060f0919ab1276e
Created June 22, 2014 18:19
How to receive invites to Codebar Brighton

Hi everyone,

The way to sign up to come to sessions has changed. The registrations for Codebar Brighton have been integrated into the main Codebar.io website so that each time we have a session you will get an email invite with the session details, you then just need to click 'attending' if you are able to attend.

This will make things a lot easier because we won't need to make a new ti.to page for each session and you won't need to enter your details to sign up each time. It also means coaches can be easily displayed on the main site http://www.codebar.io/coaches to give some recognition :)

It does however mean you will need to spend a few minutes signing up on www.codebar.io, but you will only need to do this once. You can go back in and edit your details afterwards if you need to.

To sign up to Codebar you will need a Github account.

@Rosa-Fox
Rosa-Fox / gist:3c14bf679e884449ed52
Created June 22, 2014 18:16
Codebar Brighton Signup Information
Hi everyone,
The way to sign up to come to sessions has changed. The registrations for Codebar Brighton have been integrated into the main Codebar.io website so that each time we have a session you will get an email invite with the session details, you then just need to click 'attending' if you are able to attend.
This will make things a lot easier because we won't need to make a new ti.to page for each session and you won't need to enter your details to sign up each time. It also means coaches can be easily displayed on the main site http://www.codebar.io/coaches to give some recognition :)
It does however mean you will need to spend a few minutes signing up on www.codebar.io, but you will only need to do this once. You can go back in and edit your details afterwards if you need to.
To sign up to Codebar you will need a Github account.
@Rosa-Fox
Rosa-Fox / gist:f9afba2cf4bf6cc7a5b4
Created June 20, 2014 16:02
Even worse example
%nav.navbar.navbar-default
.container-fluid
.navbar-header
%span.navbar-brand
=link_to 'Users', admin_users_path
|
=link_to 'Invitations', admin_invitations_path
.collapse.navbar-collapse
.navbar-right
= link_to 'Log out', admin_session_path, method: 'delete', class: 'btn btn-sm btn-default navbar-btn'
%nav.navbar.navbar-default
.container-fluid
.navbar-header
%span.navbar-brand
=link_to 'Users', admin_users_path
|
=link_to 'Invitations', admin_invitations_path
.collapse.navbar-collapse
.navbar-right
= link_to 'Log out', admin_session_path, method: 'delete', class: 'btn btn-sm btn-default navbar-btn'
@Rosa-Fox
Rosa-Fox / gist:9070231
Created February 18, 2014 12:44
Finds average
#! /usr/bin/env ruby
require 'csv'
tweet = "Chocolate makes me happy, it makes my life wonderful"
tweetsplit = tweet.downcase.split(/\W+/)
valences = []
tweetsplit.each do |i|
@Rosa-Fox
Rosa-Fox / gist:9053056
Created February 17, 2014 15:50
tweetsplit
#! /usr/bin/env ruby
require 'csv'
tweet = "Chocolate makes me happy, it makes my life wonderful"
tweetsplit = tweet.downcase.split(/\W+/)
valences! = []
for tweetsplit do |i|
@Rosa-Fox
Rosa-Fox / gist:9052932
Created February 17, 2014 15:43
syntax error
#! /usr/bin/env ruby
require 'csv'
tweet = "Chocolate makes me happy, it makes my life wonderful"
tweetsplit = tweet.downcase.split(/\W+/)
valences = []
for tweetsplit do |i|
@Rosa-Fox
Rosa-Fox / gist:9049608
Created February 17, 2014 12:21
Simplified
tweet = "This is, a tweet"
tweetsplit = tweet.split('\w')
puts tweetsplit
@Rosa-Fox
Rosa-Fox / gist:9049599
Created February 17, 2014 12:20
Simplified
tweet = "Thisis a tweet"
tweetsplit = tweet.split('\w')
puts tweetsplit