Skip to content

Instantly share code, notes, and snippets.

View davetheninja's full-sized avatar

Dave the Ninja davetheninja

  • me, myself and I
  • Hong Kong
View GitHub Profile
function a() { // index 1, or first function in file
}
function b() { // index 2, or second function in file
}
function c() { // index 3, or third function in file
% ember serve
version: 0.1.0
Livereload server on port 35729
Serving on http://0.0.0.0:4200
EEXIST, file already exists '/Users/davetheninja/Projects/bootcamp/bootcamp-client/tmp/coffee_script_filter-tmp_dest_dir-eHwB8mv6.tmp/bootcamp-client/router.js'
Error: EEXIST, file already exists '/Users/davetheninja/Projects/bootcamp/bootcamp-client/tmp/coffee_script_filter-tmp_dest_dir-eHwB8mv6.tmp/bootcamp-client/router.js'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.writeFileSync (fs.js:977:15)
at Object.copyPreserveSync (/Users/davetheninja/Projects/bootcamp/bootcamp-client/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/broccoli-kitchen-sink-helpers/index.js:150:8)
at /Users/davetheninja/Projects/bootcamp/bootcamp-client/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/index.js:42:19
@davetheninja
davetheninja / Zee mocked post request body
Created October 13, 2014 16:44
Daddy needs a tissue for these issues....
"{"presentation":{"title":""}}"
This has been written in notepad Mr Duffy, forgive me for any compilation errors hahaha
public class Flash
{
public void Flash(string message, FlashPriority priority)
{
Message = message;
Priority = priority;
}
public string Message {get; private set;}
[Subject(typeof(ManagementController), "user management")]
public class when_viewing_a_list_of_all_users : as_controller<ManagementController, ViewResult>
{
Establish context = () =>
{
new AutoMapperBootPart().Execute(null);
_repository = MockRepository.GenerateStub<IRepository>();
_repository.Expect(a => a.QueryList(Arg<GetAllUsersForManagementListQuery>.Is.Anything)).Return(new List<User> { new User(), new User() });
[TestFixture, Category("Email")]
public class When_sending_an_email_message : Specification
{
private EmailSender _emailSender;
private ISmtpServer _smtpServer;
private IBuildEmailBodies _emailBodyLoader;
public override void Given()
{
_smtpServer = CreateStub<ISmtpServer>();
FAO Up-the-Duffy
public class PlayerViewModel
{
public string FirstName {get;set;}
public string LastName {get;set;}
}
----------------------------------------------
using System.Web.Mvc;
using Core.Web;
using Machine.Specifications;
namespace Core.Specs.Web
{
[Subject(typeof(TempDataExtensions))]
public class when_setting_success_flash
{
Establish context = () =>
public class GoogleAccountQuery : IGoogleAccountQuery
{
readonly string _email;
readonly string _password;
readonly string _applicationName;
public GoogleAccountQuery(string email, string password, string applicationName)
{
_email = email;
_password = password;
using System;
using System.IO;
using System.Linq;
using System.Net;
namespace Core
{
public class GoogleTokenQuery
{
const string AuthenticationUrlFormat = "accountType=GOOGLE&Email={0}&Passwd={1}&source=davetheninja.net&service=analytics";