Skip to content

Instantly share code, notes, and snippets.

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>)
@kenyonj
kenyonj / discussions_controller.rb
Created April 22, 2014 20:04
Discussions_Controller
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])
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
@kenyonj
kenyonj / Hello
Created March 5, 2014 22:51
Test Gist
testing