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
if ['Client Viewer', 'Client Reviewer'].include?(@invitation.role) | |
auto_login | |
elsif @invitation.new_collaborator? | |
password_reset_link | |
else | |
direct_link | |
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
logme: (-> | |
console.log("do stuff") | |
).on("init") |
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
Arc9.CommentsCommentsPopupController = Ember.Controller.extend | |
myVar: (-> | |
"stuff" | |
).property() | |
actions: | |
doThis: -> | |
alert("i did it!") |
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 RailsAdmin::Collaborator | |
extend ActiveSupport::Concern | |
def self.extended(base) | |
base.class_eval do | |
rails_admin do | |
field :full_name | |
field :email | |
field :company | |
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
HuntersAlley.directive "haCharacterCount", [ -> | |
scope: | |
object: "=" | |
maxlength: "@" | |
template: """ | |
<div class='listing-form__charactersRemaining'> | |
<span>Characters remaining:</span> | |
<span class='listing-form__count' ng-class="{'listing-form__countDanger': (maxlength - object.length) < 11}"> | |
{{maxlength - object.length}} | |
</span> |
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
enqueued = Sidekiq::Queue.new | |
scheduled = Sidekiq::ScheduledSet.new | |
retries = Sidekiq::RetrySet.new | |
# use whichever queue you expect your job to be in, example is for scheduled: | |
my_jobs = scheduled.map(&:item).select do |job| | |
job["class"] == "Listing::Worker::End" && | |
job["args"].last == 33952 | |
# job["args"] is an array like: |
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
def initialize(o, options = {}) | |
o = o.decorate | |
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
Cerego.controller "GroupAdminCtrl", ($scope, $routeParams, $filter, GroupUsersResource, | |
GroupsResource, GroupsService, GoalListSearchResource, | |
GoalSearchResource) -> | |
# using underscore.extend to set some defaults on the $scope; this is sorta naked as well in the sense that I believe it gets executed on initialization of the controller | |
_.extend $scope, | |
group_id : $routeParams.group_id | |
group : GroupsService.group | |
... omitted lots of stuff ... | |
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
#!/bin/zsh | |
cd ~/dev/okl | |
pwd | |
for i in * ; do | |
( cd $i | |
if [ "$i" = "hunters-alley-chef" ] || [ "$i" = "hunters-alley-dev" ] || [ "$i" = "hunters-alley-ios" ] || [ "$i" = "hunters-alley-docs" ] ; then | |
continue | |
fi | |
dirname=$i |
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 HuntersAlley::Core | |
class Application < Rails::Application | |
console do | |
ActiveRecord::Base.default_timezone = :utc | |
# ActiveRecord::Base.logger = Base.logger | |
ActiveRecord::Base.configurations = { HuntersAlley.env => Rails.configuration.database_configuration[HuntersAlley.env] } | |
ActiveRecord::Base.establish_connection(HuntersAlley.env) | |
end | |
end | |
end |
NewerOlder