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
| RSpec.configure do |config| | |
| no_transactions = lambda do |example| | |
| self.use_transactional_fixtures = false | |
| DatabaseCleaner.start | |
| example.run | |
| DatabaseCleaner.clean | |
| end | |
| config.around(:type=>:feature, &no_transactions) |
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
| x = "میثم آز ربنا" | |
| words = x.split(" ") | |
| crazy = words.map{|x| "-- #{x} ++"} | |
| puts crazy.inspect | |
| #=> ["-- میثم ++", "-- آز ++", "-- ربنا ++"] |
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
| try_files $uri @app; | |
| location @app { | |
| # if the host looks like api.<something>/<somepath> then rewrite the request | |
| # as /api/<somepath> | |
| if ( $host ~* api\.(.*) && $path !~ ^/api) { | |
| rewrite ^(.*)$ /api$1 last; | |
| } | |
| include "proxy.conf"; | |
| proxy_pass http://backend_app; |
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
| From 33b4f6b8cab270cc442f3d8e392039017e372c9b Mon Sep 17 00:00:00 2001 | |
| From: Jonathan del Strother <jon.delStrother@audioboo.fm> | |
| Date: Wed, 3 Jul 2013 19:11:01 +0100 | |
| Subject: [PATCH] Add controversial auto-scrolling to the carousel | |
| --- | |
| app/views/channels/index.html.haml | 11 +++++++++++ | |
| 1 file changed, 11 insertions(+) | |
| diff --git a/app/views/channels/index.html.haml b/app/views/channels/index.html.haml |
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
| From 33b4f6b8cab270cc442f3d8e392039017e372c9b Mon Sep 17 00:00:00 2001 | |
| From: Jonathan del Strother <jon.delStrother@audioboo.fm> | |
| Date: Wed, 3 Jul 2013 19:11:01 +0100 | |
| Subject: [PATCH] Add controversial auto-scrolling to the carousel | |
| --- | |
| app/views/channels/index.html.haml | 11 +++++++++++ | |
| 1 file changed, 11 insertions(+) | |
| diff --git a/app/views/channels/index.html.haml b/app/views/channels/index.html.haml |
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
| <?php | |
| include_once "../../library/OAuthStore.php"; | |
| include_once "../../library/OAuthRequester.php"; | |
| $consumer_key = "06b4c02d1aa1cb98562264c1"; | |
| $consumer_secret = "0334a90b23ee15b9d05859f21d6759169dd6758512ea852e8e7fb673b583c581"; | |
| $host = "http://api.audioboo.fm"; | |
| $options = array( |
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
| <html> | |
| .... | |
| <body> | |
| <%= render(@header_template||'layouts/header') %> | |
| </body> | |
| </html> |
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
| .header { | |
| width: 100%; | |
| } | |
| body.product .header { | |
| width: 200px; | |
| border: 20px solid pink; | |
| } |
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
| hash = {x: {y: 2, z:{qw:1, rt:e}}, a:1, b:2} | |
| deep_3_finder = ->((k,v)){ v.is_a?(Hash) ? v.any?(&deep_3_finder) : v==3 } | |
| hash.any?(&deep_3_finder) |
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
| launchctl unload ~/Library/LaunchAgents/Nanofibre.plist | |
| rm ~/Library/LaunchAgents/Nanofibre.plist | |
| sudo rm /usr/local/bin/fibred |