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
| BOOL WINAPI XcvData(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData, | |
| PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded, PDWORD pdwStatus); |
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
| var invoiceSchema = new Schema({ | |
| companyId: { type: ObjectId, required: true }, | |
| customerId: { type: ObjectId, required: true }, | |
| invoiceNumber: { type: String, required: true, unique: true }, | |
| date: { type: Date, required: true }, | |
| dueDate: { type: Date, required: true }, | |
| paid: { type: Boolean, required: true, default: false }, | |
| activityId: { type: ObjectId, required: true }, | |
| totalHours: { type: Number, required: true }, | |
| hourlyRate: { type: Number, required: true }, |
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
| class Query | |
| def self.query_name | |
| :return_valid_query_name_in_subclass_or_you_will_get_really_weird_results | |
| end | |
| def self.create_prepared_statement(sql, placeholders_array) | |
| sql = sql.super_strip unless Environment.log_sql? | |
| DB[sql, *placeholders_array].prepare(:select, query_name) | |
| 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
| <VirtualHost 109.74.199.47:80> | |
| ServerAdmin davy.brion@thatextramile.be | |
| ServerName thatextramile.be | |
| ServerAlias www.thatextramile.be | |
| ProxyRequests off | |
| <Proxy *> | |
| Order deny,allow | |
| Allow from all |
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
| var exec = require('child_process').exec; | |
| function getJsFilesRecursively(startPath, callback) { | |
| exec('find ' + startPath, function(err, stdout) { | |
| var jsFiles = []; | |
| stdout.split('\n').forEach(function(f) { | |
| if (!/node_modules\//.test(f) && /.js$/.test(f)) { | |
| jsFiles.push(f); | |
| }; | |
| }); |
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
| var mongoose = require('mongoose'), | |
| crypto = require('crypto'), | |
| uuid = require('node-uuid'), | |
| Schema = mongoose.Schema, | |
| ObjectId = Schema.ObjectId; | |
| var userSchema = new Schema({ | |
| name: { type: String, required: true, unique: true }, | |
| email: { type: String, required: true }, | |
| salt: { type: String, required: true, default: uuid.v1 }, |
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
| public abstract class ViewTest<TBrowser> where TBrowser : Browser, new() | |
| { | |
| [TestFixtureSetUp] | |
| public void FixtureSetUp() | |
| { | |
| Browser = new TBrowser(); | |
| Browser.GoTo(RootUrl); | |
| } | |
| [TestFixtureTearDown] |
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
| var express = require('express'), | |
| app = module.exports = express.createServer(), | |
| NodePie = require('nodepie'), | |
| request = require('request'), | |
| recentFeedItems = null; | |
| app.dynamicHelpers({ | |
| getRecentFeedItems: function() { | |
| return recentFeedItems; | |
| } |
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
| var MyNameSpace = MyNameSpace || {}; | |
| MyNameSpace.jsondateformatter = (function () { | |
| var that = this; | |
| var toDate = function (jsonDateString) { | |
| var time = jsonDateString.replace(/\/Date\(([0-9]*)\)\//, '$1'); | |
| var date = new Date(); | |
| date.setTime(time); | |
| return date; |
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
| describe('given an existing customer', function() { | |
| describe('when it is retrieved from the database', function() { | |
| it('should contain the same values that have been inserted', function() { | |
| var customer = new CustomerBuilder() | |
| .withIncludeContactOnInvoice() | |
| .build(); | |
| customer.save(function(err) { |
NewerOlder