Skip to content

Instantly share code, notes, and snippets.

View stephennancekivell's full-sized avatar

Stephen Nancekivell stephennancekivell

View GitHub Profile
<!-- for using mocked data while testing -->
<script type="text/javascript" src="../test/lib/angular/angular-mocks.js"></script>
<script type="text/javascript" src="../test/e2e/mocks.js"></script>
@stephennancekivell
stephennancekivell / app.test.html
Created September 19, 2012 11:02
The addition to app.test.html
<!-- for using mocked data while testing -->
<script type="text/javascript" src="../test/lib/angular/angular-mocks.js"></script>
<script type="text/javascript" src="../test/e2e/mocks.js"></script>
@stephennancekivell
stephennancekivell / nginx.conf
Created September 4, 2012 09:25
nginx proxy_pass forwarding
# ends up at 127.0.0.1:8080
location /bla/ {
rewrite ^/bla/(.*) $1 break;
proxy_pass http://127.0.0.1:8080/;
}
# doesnt end up at 127.0.0.1:8080/woo
location /bla/ {
rewrite ^/bla/(.*) $1 break;
@stephennancekivell
stephennancekivell / frame.html
Created September 1, 2012 07:15
controlling iframes with javascript
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery-1.8.0.min.js"></script>
</head>
<body>
<script type="text/javascript">
function doCall(){
$.get('foo').error(function(){
parent.afterCall();
});