Skip to content

Instantly share code, notes, and snippets.

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

Jonathan Creamer jcreamer898

🏠
Working from home
View GitHub Profile
// event bus as dispatcher
// actions.js
module.exports = {
addItem: (item) => {
Bus.trigger("item.added", {
item: item
});
},
removeItem: (item) => {
Bus.trigger("item.removed", {
public IEnumerable<PrivateProfileNotification> GetAll()
{
return Db.Query<PrivateProfileNotification, Job, Recruiter, Member, ThirdPartyResume, PrivateProfileNotification>("[jobs].[spu_Third_Party_Recruiter_Notification_List]",
(n, j, r, m, t) =>
{
n.JobId = j.JobId;
n.RecruiterId = r.RecruiterId;
n.CandidateId = t.CandidateId;
n.Job = j;
n.Recruiter = r;
// Before switch
_.each(conditions.conditions, function (condition) {
field = this.lastRecord[condition.field];
var isVisible = false;
switch(condition.operator) {
case "+":
isVisible = (x == y);
break;
case "!=":
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement, fromIndex) {
if ( this === undefined || this === null ) {
throw new TypeError( '"this" is null or not defined' );
}
var length = this.length >>> 0; // Hack to convert object.length to a UInt32
fromIndex = +fromIndex || 0;
(function (ko) {
var addTrailingSlash = function(path) {
return path && path.replace(/\/?$/, "/");
};
//get a new native template engine to start with
var engine = new ko.nativeTemplateEngine(),
sources = {};
engine.defaultPath = "templates";
[POST("ajax/recruitment/recruiter/bookmark", IgnoreRoutePrefix = true)]
public ActionResult Bookmark(CandidateSearchBookmark bookmark)
{
RecruiterRepository.CreateBookmark(bookmark);
return JsonCamelCase(new JsonSendResult()
{
Success = true
});
}
@jcreamer898
jcreamer898 / TestModule.cs
Created March 19, 2014 14:37
An example HTTP module.
using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
namespace TestWebEssentialsBug
{
/// <summary>
/// Removes CSS from rendered HTML page.
@jcreamer898
jcreamer898 / qunit.blazon.js
Created July 7, 2014 20:21
QUnit Blazon Extensions
QUnit.testDone(function(details) {
alert(details.passed === 1 ? "PASS" : "FAIL");
});

What I learned at MWC 2014

On August 6, 2014 appendTo hosted an online conference called, "Modern Web Conf". All ran through GoTo Meeting, this conference's focus was on all things "Modern Web". There were two tracks, the first on August 6th called the Web Technologies Track, and the second on August 7th called the Developer Workflow Track.

Day 1

The focus of day 1 was on sharpening your skills with the tools of the modern web, HTML, CSS, and JavaScript as well as any helper libraries or frameworks.

AppendTo's former CEO and current Director if its parent company Epic Creative Mike Hostetler gave the opening talk. His talk was about an MVC framework called sails.js. Sails is a framework for building web applications built on Node and shares many common architectural patterns with Ruby on Rails, hence the name, sails. He went on to demo some of sails' great features such as web socket and http based controller routes, the ORM waterline for easily creating a data layer

@jcreamer898
jcreamer898 / angular-controller.js
Last active August 29, 2015 14:06
Some thoughts on angular files. The idea here is to make the constructors for controllers, services, etc, look like normal JS constructors.
(function(module) {
// Define a controller constructor
// This looks like a plain JavaScript function
function HomeCtrl(service, $location) {
this.service = service;
this.$location = $location;
this.initialize();
}