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
# https://github.com/assistly/multipass-examples/blob/master/ruby.rb | |
module DeskSSO | |
# http://dev.desk.com/guides/sso/#enable | |
def self.build_url(user) | |
json = { | |
uid: user.id, | |
expires: (DateTime.now + 10.years).iso8601, | |
customer_email: user.email, | |
customer_name: user.name |
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
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script type="text/javascript" src="http://www.swingin.org/jquery.countdown.min.js"></script> | |
<script type="text/javascript">$(function(){ | |
$(".kento-splash-screen").click(function(){ | |
$(".kento-splash-screen, #kento-splash-screen-black").fadeOut(); | |
}); | |
$(".kento-splash-screen .countdown").countdown('2014/04/16 20:00:00', function(event) { | |
$(this).html(event.strftime('%w weeks %d days %H:%M:%S')); | |
}); | |
});</script> |
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
" Gutter Numbers | |
set number | |
" Moust Support | |
set mouse=a | |
" Normal Sized tabs, zomg | |
set tabstop=4 |
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
# helper methods for using presenters for rendering objects using for | |
# API requests | |
# | |
# | |
# usage: | |
# in application_controller, | |
# include Presntable | |
# | |
# in your controller's action methods: | |
# format.json{ render json: json_for(ar_object_or_collection) } |
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
# how to configure automated testing: | |
# http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html | |
##################################################################33 | |
require 'spork' | |
if ENV['COVERAGE'] | |
require 'simplecov' | |
SimpleCov.start 'rails' do | |
add_filter "/vendor/" | |
add_group 'Changed' do |source_file| |
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
require 'spec_helper' | |
describe Documents::ChangeRequestsController do | |
before(:each) do | |
instantiate_mock_user_and_account | |
@proposal = create_proposal | |
end | |
it "works" do |
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
require "pry-byebug" | |
module ToBeIncluded | |
end | |
module ToBePrepended | |
end | |
class Super | |
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 RouteRecognizer | |
include Singleton | |
ROUTE_LIST = Rails.application.routes.routes.collect{|r| r.path.spec.to_s} | |
REGEX_ROUT_LIST = ROUTE_LIST.map{|r| | |
Regexp.new(r.gsub(/\:(.*)id/, "(\d+)").gsub("(.:format)", "")) | |
} | |
def self.is_route?(path) | |
REGEX_ROUT_LIST.each do |regex| |
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 FormatKey | |
Private _knownPrefixes() As String = New String() _ | |
{"i", "d", "dt", _ | |
"dr", "ds"} | |
Public Function ToLowerCamelCase(ByVal s As String) As String | |
Dim result As String = "" | |
Dim listOfWords As ArrayList = SplitWords(s) |
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
Imports System.Collections.Generic | |
Namespace AUL | |
Partial Class Utils | |
Private Shared _valueComparer As EqualityComparer(Of Object) = EqualityComparer(Of Object).Default | |
''' <summary> | |
''' | |
''' There is no pre-given implementation of .Equals |