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
configure :production do | |
Rack::Request.add_scheme_mapping("https") do |env| | |
env['MY_CUSTOM_HTTPS_HEADER'] == "on" | |
end | |
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
(matrix (repeat 10 (range 1 4))) | |
; [1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 | |
; 1.0000 2.0000 3.0000 |
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
(defn funky-prediction | |
[model x y] | |
;; something complex :) | |
1) | |
(deftest prediction-test | |
(let [model ; first arg | |
x ; other arg | |
predict (partial funky-prediction model x)] | |
(is (= 1 (redict :cat)) |
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
(ns error-example) | |
(defn calculation | |
[x] | |
(if (= x 5) | |
(throw (RuntimeException. "Hipsters!")) | |
x)) | |
(map calculation (range 1 20)) | |
;; RuntimeException Hipsters! error-example/calculation (NO_SOURCE_FILE:30) |
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
(ns error-example) | |
(declare ^{:dynamic true} handle-error) | |
(defn calculation | |
[x] | |
(if (= x 5) | |
(handle-error x) | |
x)) |
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
(ns error-example) | |
(declare ^{:dynamic true} handle-error) | |
(defn- calculation | |
[x] | |
(if (= (mod x 5) 0) | |
(do (handle-error x) | |
nil) | |
x)) |
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
backend legacy | |
mode http | |
timeout connect 10s | |
timeout server 30s | |
balance roundrobin | |
server bigip 213.52.205.36:80 weight 1 maxconn 512 | |
backend elb | |
mode http | |
timeout connect 10s |
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
$(".switch form").submit(function() { | |
$("").interstitial('open', { | |
'url' : '/gas-electricity/moving-home/completing-your-switch/?' + $(this).serialize() | |
}); | |
$.ajax({ | |
type: "POST", | |
url: $(this).attr("action"), | |
data: $(this).serialize(), | |
error: function(jq, textStatus, errorThrown) { |
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/src/nsterm.m b/src/nsterm.m | |
index e768c24..5bf6ce3 100644 | |
--- a/src/nsterm.m | |
+++ b/src/nsterm.m | |
@@ -1161,8 +1161,10 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows) | |
f->scroll_bar_actual_width = NS_SCROLL_BAR_WIDTH (f); | |
compute_fringe_widths (f, 0); | |
+ | |
+ BOOL inFullScreen = ([window styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask; |
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 'formula' | |
# NOTE: | |
# | |
# Two exciting enhancements in GCC 4.6.0 are currently unavailable. | |
# | |
# Link-time optimization (LTO) is broken due to changes in XCode 3.2.6 and 4.0. | |
# This should be fixed in GCC 4.6.1: | |
# http://lists.macosforge.org/pipermail/macports-dev/2011-March/014278.html | |
# |