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
| library TriggeredAura | |
| struct TriggeredAura | |
| private static thistype array stack | |
| private static integer count = 0 | |
| private static timer t = CreateTimer() | |
| private static thistype active | |
| private integer index |
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.service("$socket", ['$timeout',function($timeout) { | |
| var host = window.location.hostname; | |
| var protocol = window.location.protocol; | |
| var socket = io.connect(protocol + '//' + host); | |
| this.on = function(event, callback) { | |
| socket.on(event, function(data){ | |
| $timeout(function(){ | |
| callback.call(socket, data); |
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
| { | |
| "npc_dota_hero_antimage": { | |
| "abilities": { | |
| "1": { | |
| "cooldown": "21.0 18.0 15.0 12.0", | |
| "damage": null, | |
| "damage_type": "", | |
| "description": null, | |
| "mana_cost": "60 60 60 60", | |
| "name": null, |
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
| { | |
| "Heroes": { | |
| "npc_dota_hero_antimage": { | |
| "abilities": { | |
| "1": { | |
| "affects": null, | |
| "behavior": "Point Target", | |
| "cooldown": "21.0 18.0 15.0 12.0", | |
| "damage": null, | |
| "damage_type": null, |
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
| .vertical-aligned{ | |
| height: 100px; | |
| display: table; | |
| } | |
| .vertical-content{ | |
| display: table-cell; | |
| vertical-align: middle; | |
| } |
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 :db do | |
| task 'mysql:create' do | |
| puts '== Database Configuration ==' | |
| app_name = Rails.application.class.parent_name.underscore | |
| database_name = ENV['database'] || "#{app_name}_db_#{Rails.env}" | |
| database_user_name = ENV['database_user'] || "#{app_name}_user_#{Rails.env}" | |
| database_user_password = ENV['database_password'] || '' |
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
| # my_payment_factory | |
| FactoryGirl.define do | |
| factory :my_payment do | |
| after(:build) do |my_payment, evaluator| | |
| my_payment.shopping_cart = FactoryGirl.create(:shopping_cart) | |
| end | |
| end |
Based on http://fernandomarcelo.com/2012/05/paperclip-how-to-move-existing-attachments-to-a-new-path/
For simplicity, I wanted to update my current attachments to a new directory.
My old model, VideoAttachment, had the following options:
class VideoAttachment < ActiveRecord::Base
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
| const mapStateToProps = (state) => { | |
| return { | |
| isAdding: state.isAdding, | |
| } | |
| }; | |
| const mapDispatchToProps = (dispatch) => { | |
| return { | |
| toggleAdding: () => { | |
| dispatch({ type:'TOGGLE_IS_ADDING' }) |