i = 1
i + 2 # 3i + 3 # 5| import sys | |
| import os | |
| import datetime | |
| import pyauto | |
| from keyhac import * | |
| def configure(keymap): |
| host: http://localhost | |
| port: 3000 | |
| db: mongodb://wikidb:27017/wiki | |
| sessionSecret: 1234567890abcdefghijklmnopqrstuvxyz | |
| public: false | |
| auth: | |
| defaultReadAccess: false | |
| local: |
| <configuration> | |
| <configSections> | |
| <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> | |
| </configSections> | |
| <log4net> | |
| <appender name="ConsoleAppendar" type="log4net.Appender.ConsoleAppender"> | |
| <layout type="log4net.Layout.PatternLayout"> | |
| <conversionPattern value="%date %5level %message%newline" /> | |
| </layout> | |
| </appender> |
| <?xml version="1.0"?> | |
| <configuration> | |
| <configSections> | |
| <section name="aws" type="Amazon.AWSSection, AWSSDK.Core"/> | |
| </configSections> | |
| <aws region="us-east-1" endpointDefinition="endpoints.json"> | |
| </aws> | |
| <appSettings> | |
| <add key="AWSAccessKey" value="foo"/> | |
| <add key="AWSSecretKey" value="foo"/> |
| <Target Name="CopyAditionalFiles" AfterTargets="Build" Condition="'$(TargetFramework)'!=''"> | |
| <ItemGroup> | |
| <DepsFilePaths Include="$([System.IO.Path]::ChangeExtension('%(_ResolvedProjectReferencePaths.FullPath)', '.deps.json'))" /> | |
| </ItemGroup> | |
| <Copy SourceFiles="%(DepsFilePaths.FullPath)" DestinationFolder="$(OutputPath)" Condition="Exists('%(DepsFilePaths.FullPath)')" /> | |
| </Target> |
| ActiveRecord::Base.transaction do | |
| ActiveRecord::Base.after_transaction_commit { run_some_background_job } | |
| # run_some_background_job has not run yet | |
| end | |
| # now, it has run | |
| # this one runs immediately, since we are outside a transaction | |
| ActiveRecord::Base.after_transaction_commit { some_other_task } |
| module OkComputer | |
| class CheckCollection | |
| def initialize(display) | |
| self.display = display | |
| self.collection = {} | |
| end | |
| # Public: Returns a check or collection if it's in the check collection | |
| # | |
| # key - a check or collection name |
| def perform(card_charge_id) | |
| charge = CardCharge.find(card_charge_id) | |
| charge.void_transaction | |
| Emailer.charge_refunded(charge).deliver | |
| end |
| module ActionCable | |
| class Engine < Rails::Engine | |
| initializer "action_cable.set_work_hooks" do |app| | |
| ActiveSupport.on_load(:action_cable) do | |
| ActionCable::Server::Worker.set_callback :work, :around, prepend: true do |_, inner| | |
| app.executor.wrap do | |
| # If we took a while to get the lock, we may have been halted | |
| # in the meantime. As we haven't started doing any real work | |
| # yet, we should pretend that we never made it off the queue. | |
| unless stopping? |