Skip to content

Instantly share code, notes, and snippets.

View zishe's full-sized avatar
🏠
Working from home

Alexander Kireev zishe

🏠
Working from home
  • Ko Pha Ngan, Thailand
View GitHub Profile
@zishe
zishe / gist:3112548
Created July 14, 2012 18:26
ExpressAngular error
Error: Forbidden
at SendStream.error (D:\node\ExpressAngular\node_modules\express\node_modules\send\lib\send.js:142:16)
at SendStream.pipe (D:\node\ExpressAngular\node_modules\express\node_modules\send\lib\send.js:307:52)
at Object.static (D:\node\ExpressAngular\node_modules\express\node_modules\connect\lib\middleware\static.js:78:8)
at next (D:\node\ExpressAngular\node_modules\express\node_modules\connect\lib\proto.js:190:15)
at pass (D:\node\ExpressAngular\node_modules\express\lib\router\index.js:111:24)
at Router._dispatch (D:\node\ExpressAngular\node_modules\express\lib\router\index.js:173:5)
at Object.router (D:\node\ExpressAngular\node_modules\express\lib\router\index.js:33:10)
at next (D:\node\ExpressAngular\node_modules\express\node_modules\connect\lib\proto.js:190:15)
at Object.methodOverride [as handle] (D:\node\ExpressAngular\node_modules\express\node_modules\connect\lib\middleware\
@zishe
zishe / gist:3112551
Created July 14, 2012 18:28
Chrome console
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/css/posts.css
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/js/lib/global.js
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/js/posts/post-model.js
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/js/posts/blog-collection.js
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/js/posts/blog-view.js
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/js/posts/new-post-view.js
Failed to load resource: the server responded with a status of 403 (Forbidden) http://localhost:3000/js/posts/post-view.js
Failed to load resource: the server responded with a status of 403 (Forbidden)
@zishe
zishe / gist:3189377
Created July 27, 2012 17:58
_comment_view.jade
h3 Comments
div.comment-block(ng-repeat='comment in post.comments')
section.comment-body(id='comment-{{comment._id}}').span7
div.comment-user.cline
i.icon-user
span {{comment.name}}
div.comment-content.cline
i.icon-comment
span(ng-hide="comment.edit", ng-model='comment.text') {{comment.text}}
AssertionError: expected '<html lang="en" ng-app="myApp">\n <!--<![endif]-->\n <head>\n <meta charset="utf-8" />\n <title>Angular Express CoffeeScript Simple Blog</title>\n <meta name="description" content="" />\n <meta name="author" content="" />\n <!-- Mobile Specific-->\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <!-- CSS-->\n <link rel="stylesheet" href="/css/bootstrap.css" />\n <link rel="stylesheet" href="/css/app.css" />\n <!-- JS-->\n <script src="/js/lib/jquery-1.7.2.min.js"></script>\n <script src="/js/lib/bootstrap.min.js"></script>\n <script src="/js/lib/angular.min.js"></script>\n <script src="/js/app.js"></script>\n <script src="/js/controllers.js"></script>\n <script src="/js/directives.js"></script>\n <script src="/js/filters.js"></script>\n <script src="/js/services.js"></script>\n </head>\n <body>\n <div class="navbar">\n <div class="navbar-inner navbar-fixed-top">\n <div class="cont
<html lang="en" ng-app="myApp" class="ng-scope">\n <!--<![endif]-->\n <head>\n <meta charset="utf-8" />\n <title>Angular Express CoffeeScript Simple Blog</title>\n <meta name="description" content="" />\n <meta name="author" content="" />\n <!-- Mobile Specific-->\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <!-- CSS-->\n <link rel="stylesheet" href="/stylesheets/bootstrap.css" />\n <link rel="stylesheet" href="/stylesheets/style.css" />\n <!-- JS-->\n <script src="/js/lib/jquery-1.7.2.min.js"></script>\n <script src="/js/lib/bootstrap.min.js"></script>\n <script src="/js/lib/angular.min.js"></script>\n <script src="/js/app.js"></script>\n <script src="/js/controllers.js"></script>\n <script src="/js/directives.js"></script>\n <script src="/js/filters.js"></script>\n <script src="/js/services.js"></script>\n <style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloa
@zishe
zishe / Error text
Created September 8, 2012 05:51
slim error
SyntaxError in Home#index
Showing /home/alder/Rails/spm/app/views/layouts/_navigation.html.slim where line #19 raised:
/home/alder/Rails/spm/app/views/layouts/_navigation.html.slim:19: syntax error, unexpected keyword_end, expecting $end
...afe_concat(("</li></ul>")); end; @output_buffer.safe_concat(...
... ^
Extracted source (around line #19):
16: ul.dropdown-menu role='menu' aria-labelledby='drop'
@zishe
zishe / spec_helper.rb
Created September 18, 2012 17:06
spec helper
require 'rubygems'
require 'spork'
#uncomment the following line to use spork with the debugger
#require 'spork/ext/ruby-debug'
require 'factory_girl'
Spork.prefork do
end
Spork.each_run do
@zishe
zishe / gist:3744371
Created September 18, 2012 17:11
PhoneScript spec
require 'spec_helper'
describe PhoneScript do
before(:each) do
@pricing = Pricing.create!
@user = FactoryGirl.create :admin
@attr = {
:name => "answerphone",
:script => "some js code",
@zishe
zishe / gist:3744451
Created September 18, 2012 17:25
Test
before(:each) do
@user = User.new
end
it "should have a secure_token" do
@user.should_receive(:secure_token)
@user.save
end
@zishe
zishe / gist:3744693
Created September 18, 2012 18:02
Error with before create
Failure/Error: @user.should_receive(:secure_token)
(#<User:0x00000005cdec90>).secure_token(any args)
expected: 1 time
received: 2 times