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
| default_attributes chef_user: "ubuntu" | |
| default_attributes { ... a whole mess of other stuff which apparently blows away the first line. whoops } |
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
| Hi, your instructions kind of suck but I figured it out. Here's how to actually do it: | |
| From the iOS app... | |
| 1) Go to the Me tab, tap the gear icon, then click settings | |
| 2) Tap on the account name to open the notifications settings for that account (critical missing piece of info) | |
| 3) Disable "Recommendations" "news" and "other" | |
| Pat |
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
| [1] pry(main)> hash = {a: 1, b: 2, c: 3} | |
| => {:a=>1, :b=>2, :c=>3} | |
| [2] pry(main)> class Hash | |
| [2] pry(main)* def retrieve_keys(*keys) | |
| [2] pry(main)* self.reduce({}) { |h, (k, v)| | |
| [2] pry(main)* keys.include?(k) ? h.merge!({k => v}) : h | |
| [2] pry(main)* } | |
| [2] pry(main)* end | |
| [2] pry(main)* end | |
| => nil |
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
| something = case option_type | |
| when OptionType then "do this" | |
| when String then "do this thing" | |
| else "how about this" | |
| end | |
| something = if option_type.class == OptionType | |
| "do this" | |
| elsif option_type.class == String | |
| "do this thing" |
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
| require 'timeout' | |
| class SearchesController | |
| def post | |
| search = Search.create! params[:search] | |
| begin | |
| timeout(3) do | |
| while result.nil? | |
| result = Cache.fetch(search.results_id) | |
| end |
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
| class ApplicationController | |
| def require_login | |
| unless current_user | |
| session[:return_to] = request.uri | |
| redirect_to login_path | |
| end | |
| end | |
| end | |
| class LoginsController |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzZE5kpRiXxpiSndA/lf+0fcirZB+YUb5RUMdyU0Y/kWK7U1TiAvblfGtThJCjq5lkogEFupuDfG4vSO9z1qPNawDlvwqGjwPL5NMKL7aaFlJVzejY2wvGhZ1++rr0JeEFWGkZaIwtp9ywcXOBkGcuF8inzvtEXiCNzexjp1mWebSg5xg62kd5AfZUf7u/bxrDG+LMe2bk2xLVwp3Fnto+eCNMt938ingsOZIMGu8wplr6f6tELm3zQNRsd1cu1WPzyGZqeenmG/PmGGtZauLcWpkLVSWKuMkd/cK4n7EmBBsDkIre7wN5SGAihI7pB4YfkBG1fFHTA0LLrCYrikbBQ== patmaddox@me.com |
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
| TestCase < #SUnitTest. | |
| - test | |
| self testRun. | |
| - testRun | |
| | test | | |
| test := WasRun newWithName: 'testMethod'. | |
| Transcript show: '!!!!!!!!!!'; show: test log; cr. | |
| self assert: test log size equals: 0 withMessage: 'test log should be empty'. |
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
| java.lang.reflect.InvocationTargetException | |
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) | |
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
| at java.lang.reflect.Method.invoke(Method.java:616) | |
| at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) | |
| at java.lang.Thread.run(Thread.java:679) | |
| Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.ArrayList | |
| at st.redline.core.PrimObject.p220(PrimObject.java:541) | |
| at st.redline.core.SequenceableCollection$M2.invoke(st/redline/core/SequenceableCollection.st:8) |
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
| Object < #STestCase | |
| instanceVariableNames: 'name'. | |
| + newWithName: aString | |
| ^ self new name: aString; yourself. | |
| - name: aString | |
| name := aString. | |
| - run |