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
| hs.hotkey.bind({"cmd", "ctrl"}, "M", function() | |
| local win = hs.window.focusedWindow() | |
| local f = win:frame() | |
| local screen = win:screen() | |
| local max = screen:frame() | |
| f.x = max.x | |
| f.y = max.y | |
| f.w = max.w | |
| f.h = max.h |
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 Event < ActiveRecord::Base | |
| include IceCube | |
| validates :name, :presence => true | |
| validates :recurring_schedule, :presence => true | |
| def recurring_schedule=(schedule) | |
| Rails.logger.debug("recurring_schedule= called #{schedule.inspect}") | |
| self.schedule_yaml = schedule.to_yaml | |
| 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
| var userRef = new Firebase("https://shining-fire-453.firebaseio.com/users"); | |
| userRef.child(authData.uid).once("value",function(snapshot) { | |
| console.log("snapshot in userREf",snapshot); | |
| var fullName = snapshot.val().name; | |
| console.log("fullname",fullName); | |
| var displayName = fullName.split(' '); | |
| localStorage.setItem("firstName", displayName[0]); | |
| //redirect to user-enabled home page | |
| console.log("welcome back, welcome back, welcoooome baack..."); | |
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 User < ActiveRecord::Base | |
| has_many :study_groups | |
| has_many :studies, :through => :study_groups | |
| has_many :roles, :through => :user_roles | |
| def admin | |
| true if self.roles.include?("admin") | |
| end | |
| def manager |
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 User < ActiveRecord::Base | |
| has_many :study_groups | |
| has_many :studies, :through => :study_groups | |
| has_many :roles, :through => :user_roles | |
| end | |
| class Role < ActiveRecord::Base | |
| has_many :users, :through => :user_roles | |
| 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
| var configData = { | |
| "type": "Application", | |
| "name": "Some Crazy Stuff In My Hangout Oh Yeah!!!", | |
| "localizationID": "Effects", | |
| "showRandomizer": true, | |
| "id": 3, | |
| "localizationPath": "", | |
| "googleAnalyticsAccount": "", | |
| "simpleExclusionTags": true, | |
| "showLocalizationFields": false, |
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 Forum < ActiveRecord::Base | |
| acts_as_tree | |
| has_many :topics | |
| has_many :posts, :through => :topics | |
| validates_presence_of :title | |
| validates_length_of :title, :within => 3..50 | |
| validates_length_of :description, :within => 8..255, :allow_blank => true | |
| 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
| def primary_and_secondary_nav | |
| return if anonymous? && !allowed?(:navigate_site_anonymously) | |
| items = lis(children_of_nav(:primary), | |
| :selected => lambda { |i| selected_nav?(i) }) do |menu| | |
| link_to_nav(menu) | |
| end | |
| output = ul(items, :id => :primary_nav) | |
| selected = children_of_nav(:primary).detect { |i| selected_nav?(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
| !.*/(\.[^/]*|CVS|newrelic_rpm|generated|v10|v11|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle)|.*/(creative_file|creative_file_local|ad_files|creative_subimages|bin-debug|log|data|tmp|swftools|asset_file|asset_file_local|whitepapers|tclink\-ruby|perl5|coverage|soap|wsdl|xsd|jruby|creative_subimage|flex_builder_3_sdk|java|mtasc|artwork|public\/assets))$ |
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
| !(/\.(?!htaccess)[^/]*|tmtags|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp|production\.sql|\.swf|tclink\.bundle|\.gif|\.png|\.jpg|\.swf|\.fla|\.ico|\.pdf)$ |
NewerOlder