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
| module Mde | |
| def match_for_mde(mde, arclass_id, arclass_filename) | |
| rule = Parser.new(mde) | |
| es_query = Bar.new(rule, arclass_id, arclass_filename).es_query | |
| rest_call_for_truth(es_query) | |
| end | |
| def rest_call_for_truth(query) |
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
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| type ErrNegativeSqrt float64 | |
| func (e ErrNegativeSqrt) Error() string { |
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
| a node "properties" cannot contain the name/value setting of "dynamic":"true" | |
| Never. |
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 "GET profile" do | |
| let(:player) { Dish::Player.new('simplebits') } | |
| before do | |
| VCR.insert_cassette 'base', :record => :new_episodes | |
| end | |
| after do | |
| VCR.eject_cassette |
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
| #!/usr/bin/env ruby | |
| # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. | |
| require 'rails/commands/server' | |
| require 'rack' | |
| require 'webrick' | |
| require 'webrick/https' | |
| module Rails | |
| class Server < ::Rack::Server | |
| def default_options |
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 A, E, J, M, WS, async, duc, e, ejs, euc, fs, haml, http, mime, n, qs, url, w, _ref, _ref1; | |
| _ref = [ | |
| JSON, Math, decodeURIComponent, encodeURIComponent, (function(p) { | |
| return p.replace(/\/*$/, '').replace(/^\/?/, '/'); | |
| }), (function(d, s) { | |
| var k, v; | |
| for (k in s) { | |
| v = s[k]; | |
| d[k] = (d[k] instanceof Array ? d[k].concat(v) : v); |
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
| # gets permalink for file on s3 | |
| # | |
| # *Parameters:* | |
| # (+String+) -- aws_path full path of key to be uploaded to AWS (usually generated) | |
| # | |
| # *Returns:* | |
| # (+String+) -- url | |
| def self.get_permalink(aws_path, content_type = nil, content_disposition = nil) | |
| return nil if aws_path.blank? | |
| s3 = AWS::S3.new |
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
| Resque.redis = Redis.new(:host => APP_CONFIG[:redis], :port => APP_CONFIG[:redis_port]) | |
| Dir["#{Rails.root}/app/workers/*.rb"].each { |file| require file } | |
| require 'resque/failure/multiple' | |
| require 'resque/failure/redis' |
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
| (function($) { | |
| var methodMap = { | |
| 'create': 'POST', | |
| 'update': 'PUT', | |
| 'delete': 'DELETE', | |
| 'read' : 'GET' | |
| }; | |
| var getUrl = function(object) { | |
| if (!(object && object.url)) return null; |
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 Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |
NewerOlder