This file contains 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
import XMonad | |
import Data.Monoid | |
import System.Exit | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map as M | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.EwmhDesktops |
This file contains 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 Main where | |
omitElementAt :: Int -> [a] -> [a] | |
omitElementAt i list = let (left, right) = splitAt i list in left ++ (tail right) | |
jacobiProductSum :: Int -> [Double] -> [Double] -> Double | |
jacobiProductSum i a x = sum [ aj * xj | (aj, xj) <- aFiltered `zip` xFiltered ] | |
where | |
aFiltered = omitElementAt i a | |
xFiltered = omitElementAt i x |
This file contains 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 Main where | |
import Control.Monad.Writer | |
import Control.Monad.Reader | |
rwt :: A Int | |
rwt = ask >>= \x -> tell ("Got " ++ show x) >> return (x * 2) | |
type A = ReaderT Int (WriterT String Maybe) |
This file contains 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 'rubygems' | |
require 'mail' | |
Mail.defaults do | |
delivery_method :smtp, { :address => "smtp.gmail.com", | |
:port => 587, | |
:domain => 'varneckas.lt', | |
:user_name => '[email protected]', | |
:password => '', | |
:authentication => 'plain', |
This file contains 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 'rubygems' | |
require 'mail' | |
Mail.defaults do | |
delivery_method :smtp, { :address => "smtp.gmail.com", | |
:port => 587, | |
:domain => 'varneckas.lt', | |
:user_name => '[email protected]', | |
:password => '', | |
:authentication => 'plain', |
This file contains 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 Gauss where | |
import Datatypes | |
import Extra | |
-- 3 point Gauss coeficients and nodes | |
c1 = 0.5555556 | |
c2 = 0.8888889 | |
c3 = 0.5555556 |
This file contains 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 NotMonkeyPatchable | |
def method_added(name) | |
@methods ||= {} | |
if @methods[name] and not @unpatching | |
@unpatching = true | |
method = @methods[name] | |
define_method(name) { |*args, &block| | |
method.bind(self).call(*args, &block) | |
} |
This file contains 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
In shell: | |
export RUBYLIB=/path/to/RubyMine/rb/testing/patch/common:/path/to/RubyMine/rb/testing/patch/bdd | |
spring rspec spec/ # to launch spring server | |
In Rubymine: | |
Uncheck bundler | |
Select custom runner script as spring_rspec.rb | |
add same variable to environment variables: | |
RUBYLIB=/path/to/RubyMine/rb/testing/patch/common:/path/to/RubyMine/rb/testing/patch/bdd |
This file contains 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
diff --git a/app/models/rb_sprint.rb b/app/models/rb_sprint.rb | |
index 3bed08b..4ba4961 100644 | |
--- a/app/models/rb_sprint.rb | |
+++ b/app/models/rb_sprint.rb | |
@@ -69,6 +69,24 @@ class RbSprint < Version | |
return stories.inject(0){|sum, story| sum + story.story_points.to_i} | |
end | |
+ def velocity | |
+ return unless project.present? |
This file contains 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
launch_super_query('foo', <<-SQL, <<-TEXT) | |
drop table user; | |
SQL | |
I'm so sorry. | |
TEXT |
OlderNewer