Skip to content

Instantly share code, notes, and snippets.

'use strict';
var should = require('should');
var app = require('../../app');
var supertest = require('supertest');
var agent = supertest.agent(app);
var mongoose = require('mongoose');
var HelpTicket = mongoose.model('HelpTicket');
var ticketId;
var User = require('../user/user.model.js');
var mongoose = require('mongoose');
var deleteEmployees = function(done) {
mongoose.model('Employee').remove({}).exec(done)
}
var createTestUser = function(done) {
mongoose.model('User').create({
firstName: 'test user 1',
email: 'test1@test.com',
import datetime
compare_date = datetime.datetime(2014, 2, 8, 18, 5, 1)
def timeAgo(time):
current_time = datetime.datetime.now().time()
today = datetime.date.today()
current_month = today.month
current_year = today.year
import math
lsst = []
lsst.append({'id':'40','name':'Joe Bloggs','posts':'4'})
lsst.append({'id':'567','name':'Jenny Smith','posts':'3'})
lsst.append({'id':'3','name':'Frank Jones','posts':'54'})
lsst.append({'id':'46','name':'Samantha Wills','posts':'0'})
lsst.append({'id':'6789','name':'Ahmed Joseph Naran','posts':'15'})
def orderList(lst):
import datetime
compare_date = datetime.datetime(2014, 2, 7, 19, 44, 1)
def timeAgo(time):
current_time = datetime.datetime.now().time()
today = datetime.date.today()
current_month = today.month
current_year = today.year
@lindslev
lindslev / problem4.c
Created January 14, 2014 08:09
This is my solution to problem 4 on Project Euler : Find the largest palindrome made from the product of two 3-digit numbers.
#include <stdio.h>
int main() {
int i, a, b, c;
int j = 999;
int placeholder = 0;
int face = 0;
int count = 0;
@lindslev
lindslev / problem7.c
Created December 24, 2013 03:16
This is my solution to problem 7 on Project Euler: What is the 10,001st prime number?
#include <stdio.h>
int main() {
int num = 3;
int count = 0;
int final = 0;
int i = 0;
int isPrime = 3;