This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Url < ActiveRecord::Base | |
before_create :generate_unique_token, :escape_original_url | |
validates :original_url, presence: true | |
validate :check_if_url_is_valid | |
def to_param | |
token | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DiscussionsController < ApplicationController | |
before_action :authorize, only: [:new, :create] | |
def new | |
@discussion_form = DiscussionForm.new | |
@types = ["Image", "Document", "Code", "Video", "Audio"] | |
end | |
def show | |
@discussion = Discussion.find_by(token: params[:id]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func! Fire(name) | |
let command = "curl -u 2cee4028ecfc5a0fed2325b150565714961c429e:X -H \'Content-Type: application/json\' -d \'{\"message\":{\"body\":" . a:name . "\"}}\' https://metis7.campfirenow.com/room/584821/speak.json" | |
call system(command) | |
" echom "Hello! My name is:" | |
" echom a:name | |
endfunc | |
command! Hello :call Fire("test") | |
" command! -nargs=1 Fire call s:Fire(<f-args>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SessionsController < ApplicationController | |
skip_before_action :require_login, only: [:new, :create] | |
def new | |
end | |
def create | |
@user = authenticate_session(session_params, email_or_username: [:email, :username]) | |
if sign_in(@user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "User views settings for a form", -> | |
it "they export the form to JSON", -> | |
create('form').then (form) -> | |
visit("/f/#{form.get("id")}/edit").then -> | |
click(".ember-view a:contains('Export')").then -> | |
click(".button.export-to-json").then -> | |
expectedURL = "/f/#{form.get("id")}.json" | |
expect(currentURL()).to.equal(expectedURL, "expected #{currentURL()} to equal #{expectedURL}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash'), | |
concat = require('gulp-concat'), | |
debug = require('gulp-debug'), | |
gulp = require('gulp'), | |
ignore = require('gulp-ignore'), | |
jshint = require('gulp-jshint'), | |
karma = require('karma').server, | |
htmlmin = require('gulp-htmlmin'), | |
includeSource = require('gulp-include-source'), | |
minifyCss = require('gulp-minify-css'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set gitconfig.local keys and define gpair() and gsolo() | |
gh_name=("${(s/ /)$(echo `git config user.name`)}") | |
gh_email=("${(s/@/)$(echo `git config user.email`)}") | |
gh_co_domain=$(echo `git config company.domain`) | |
# set the company email domain name in gitconfig.local, only do this once | |
if [[ $gh_co_domain == "" ]]; then | |
echo "\nPlease enter your company email domain name: [thoughtbot.com] " | |
read co_domain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set gitconfig.local keys and define gpair() and gsolo() | |
gh_name=("${(s/ /)$(echo `git config user.name`)}") | |
gh_email=("${(s/@/)$(echo `git config user.email`)}") | |
gh_co_domain=$(echo `git config company.domain`) | |
# set the company email domain name in gitconfig.local, only do this once | |
if [[ $gh_co_domain == "" ]]; then | |
echo "\nPlease enter your company email domain name: [thoughtbot.com] " | |
read co_domain |
OlderNewer