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
| diff --git a/ext/bigdecimal/lib/bigdecimal/math.rb b/ext/bigdecimal/lib/bigdecimal/math.rb | |
| index c17841f..c672cbf 100644 | |
| --- a/ext/bigdecimal/lib/bigdecimal/math.rb | |
| +++ b/ext/bigdecimal/lib/bigdecimal/math.rb | |
| @@ -9,6 +9,7 @@ require 'bigdecimal' | |
| # atan(x, prec) Note: |x|<1, x=0.9999 may not converge. | |
| # exp (x, prec) | |
| # log (x, prec) | |
| +# TAU (prec) | |
| # PI (prec) |
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
| # See http://tauday.com/ | |
| module Math | |
| TAU = PI * 2.0 | |
| end | |
| if defined? BigMath | |
| module BigMath | |
| module_function | |
| def TAU(prec) |
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
| # | |
| # This is pretty confusing until you know what's going on... | |
| # | |
| # See http://techspry.com/ruby_and_rails/html_safe-and-helpers-in-rails-3-mystery-solved/ | |
| # for an explanation... | |
| # | |
| ruby-1.8.7-p334 :025 > foo_safe = "<p>foo</p>".html_safe | |
| => "<p>foo</p>" | |
| ruby-1.8.7-p334 :026 > (foo_safe + "<p>bar</p>").html_safe # not what you thought! unintuitive! |
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
| # | |
| # If you want to use helper methods inside your controller's actions | |
| # (even though it is arguably a code smell, ie you should push your | |
| # presentation logic down into views rather than have it in your | |
| # controllers), you can include the helper modules you want, for | |
| # example: | |
| # | |
| # class ThingController < ActionController::Base | |
| # include ApplicationHelper | |
| # include ThingHelper |
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
| <%# | |
| # | |
| # Embedded python? | |
| # | |
| # See: | |
| # http://mail.python.org/pipermail/python-ideas/2011-December/013003.html | |
| # http://readthedocs.org/docs/ncoghlan_devs-python-notes/en/latest/pep_ideas/suite_expr.html | |
| # and related discussion: | |
| # http://mail.python.org/pipermail/python-ideas/2011-December/thread.html#13003 | |
| # |
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
| # | |
| # This was causing problems when submitting the nested object form | |
| # in a/v/product/channels_edit because all the nested channels would | |
| # be created at plan Channel objects instead of the PrimaryChannel, EusChannel etc. | |
| # | |
| # In active record normally :type is ignored, eg: | |
| # Channel.create(:type='PrimaryChannel', :etc=>1, ...) | |
| # ignores the type attr and uses 'Channel'. | |
| # | |
| # This hack will make it actually use the :type value. |
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 url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
| .tabbrowser-tab[pinned] { | |
| width: 72px; | |
| } |
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 trick so you can have partials that take blocks. | |
| # Uses render :layout. | |
| # | |
| # Example: | |
| # <%= block_render 'some_partial_with_a_yield', :foo => 123 do %> | |
| # Any erb here... | |
| # <% end %> | |
| # | |
| def block_render(partial_name, locals={}) |
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
| [core] | |
| # -E means don't page if less one screen | |
| # -F means quit when EOF reached | |
| # -r fixes the %C(yellow)%+d colouring somehow | |
| pager = less -E -F -r | |
| [alias] | |
| ll = log --pretty=nice -n 30 # about one screen worth | |
| lll = log --pretty=nice # goes back forever |
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
| gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']" |