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
| app_name = "myApp" | |
| app = angular.module "#{app_name}.controllers", [] | |
| class BaseController | |
| @register: (app, name) -> | |
| name ?= @name || @toString().match(/function\s*(.*?)\(/)?[1] | |
| app.controller name, @ | |
| @inject: (args...) -> | |
| @$inject = args |
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 @Base | |
| constructor: (args...) -> | |
| for key, index in @constructor.$inject | |
| @[key] = args[index] | |
| @inject: (args...) -> @$inject = _.union @$inject args | |
| class @BaseCtrl extends @Base | |
| constructor: (args...) -> |
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 APICommonHelpers | |
| def access_denied!(message = 'Access denied') | |
| error! message, 401 | |
| end | |
| def bad_request!(message = 'Bad request') | |
| error! message, 400 | |
| end | |
| def forbidden_request!(message = 'Forbidden') |
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 'active_support/core_ext/hash' | |
| require 'capistrano/undev' | |
| require 'capistrano-db-tasks' | |
| require 'airbrake/capistrano3' | |
| require './config/boot' | |
| SSHKit.config.command_map[:rake] = 'bundle exec rake' |
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
| CXX=clang++ | |
| FLAGS=-std=c++11 -stdlib=libc++ | |
| all: | |
| clean: | |
| rm -fr build/* | |
| test: | |
| $(CXX) $(FLAGS) src/test.cpp -o build/test.bin -Isrc/ | |
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 sample Guardfile | |
| # More info at https://github.com/guard/guard#readme | |
| ## Uncomment and set this to only include directories you want to watch | |
| # directories %w(app lib config test spec feature) | |
| ## Uncomment to clear the screen before every task | |
| # clearing :on | |
| ## Guard internally checks for changes in the Guardfile and exits. |
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 I18nTimeZone < ActiveSupport::TimeZone | |
| class << self | |
| def all | |
| TZInfo::Timezone.all.map do |tzinfo| | |
| utc_offset = tzinfo.current_period.utc_offset | |
| create(tzinfo.name, utc_offset, tzinfo) | |
| end | |
| end | |
| 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
| namespace :maintenance do | |
| desc "Maintenance start (edit config/maintenance.yml to provide parameters)" | |
| task :start do | |
| on roles(:web) do | |
| upload! "config/maintenance.yml", "#{current_path}/tmp/maintenance.yml" | |
| end | |
| end | |
| desc "Maintenance stop" | |
| task :stop 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
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; |
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
| #define говно NULL | |
| #define нихуя void | |
| #define факт bool | |
| #define хуёво false | |
| #define пиздато true | |
| #define цифра int | |
| #define число float | |
| #define базар char | |
| #define ТамГде * | |
| #define типа { |
OlderNewer