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
| RSpec::Matchers.define :subset_of do |expected| | |
| match do |actual| | |
| Set.new(actual).subset?(Set.new(expected)) | |
| end | |
| end | |
| let(:valid_content_types) { %w(push image text image video link) } | |
| it 'sends message content to Google Analytics via Sidekiq' do | |
| allow(Sidekiq::Client).to receive(:new).and_return(sidekiq_client) |
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://www.dropbox.com/s/mvq3tc8oumpmp6w/instantclient_12_1.zip?dl=0 |
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
| #Push Notification | |
| ## Intro | |
| We use third party notification service from Urban Airship API v3 (UA) | |
| We send UA we want to send notification to which device and the content of message then UA will send it for us. | |
| ## Key points | |
| Each device is identified by push token in UA. | |
| Each device is identified by device_identifier in ThunderMaps. | |
| Every time user login on his/her mobile device we get a new push token from UA, |
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
| let mapleader="," | |
| set rtp+=~/.vim/terminology/vundle/ | |
| call vundle#rc() | |
| filetype off | |
| so ~/.vim/terminology/plugins | |
| set t_Co=256 | |
| set background=dark |
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 generic confirmation for risky actions. | |
| * Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function | |
| */ | |
| angular.module('app').directive('ngReallyClick', [function() { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| element.bind('click', function() { | |
| var message = attrs.ngReallyMessage; |
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
| $ -> | |
| tooltips = $('.js-nice-tooltip') | |
| _.each(tooltips, (element) -> | |
| new Ui.Views.NiceTooltip(el: element) | |
| ) | |
| class Ui.Views.NiceTooltip extends Backbone.View | |
| initialize: () -> | |
| @data = this.$el.data('content') |
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
| #TODO Recommend extracting to its own class when next touching this method | |
| def create_opening_stock_records(stock_type_ids, destroy_existing_if_not_listed=false) | |
| if destroy_existing_if_not_listed | |
| sc = StockClass.arel_table | |
| fsc = FarmStockClass.arel_table | |
| st = StockType.arel_table | |
| fst = FarmStockType.arel_table |
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
| " Vundle | |
| Bundle 'gmarik/vundle' | |
| " Utilities | |
| Bundle 'tomtom/tlib_vim' | |
| Bundle 'MarcWeber/vim-addon-mw-utils' | |
| Bundle 'xolox/vim-misc' | |
| Bundle 'xolox/vim-shell' | |
| Bundle 'mattn/webapi-vim' |