This file contains 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
<hive-validator></hive-validator> | |
(hive-validator.html): <div drop-target></div> | |
angular.module('amperApp.directives') | |
.directive('hiveValidator', ['hiveQueryService', function(hiveQueryService) { | |
return { | |
restrict: 'E', | |
templateUrl: 'partials/jobs/hive-validator.html', | |
replace: true, |
This file contains 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 binaryTree = function(rootObj) { | |
var that = {}; | |
that.key = rootObj; | |
that.leftChild = undefined; | |
that.rightChild = undefined; | |
that.insertLeft = function(newNode) { | |
if (this.leftChild === undefined) { | |
this.leftChild = binaryTree(newNode); |
This file contains 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
Function.prototype.method = function(name, func) { | |
this.prototype[name] = func; | |
return this; | |
}; |
This file contains 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
levelUpExperience: function(level) { | |
if (!level) { level = this.level + 1; } | |
if (level === 2) return 100; | |
return (25 * Math.pow(level, 2)) + this.levelUpExperience(level - 1); | |
} |
This file contains 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
CC=clang | |
IPHONEOS_DEPLOYMENT_TARGET=7.0 | |
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH" | |
CFLAGS="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -mios-simulator-version-min=7.0" | |
CC=clang | |
IPHONEOS_DEPLOYMENT_TARGET=7.0 | |
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH" | |
CFLAGS="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0" --host=armv7 |
This file contains 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
if (CDV_IsIPhone5()) { | |
imageName = [imageName stringByAppendingString:@"-568h"]; | |
} | |
// else if (CDV_IsIPad()) { | |
switch (orientation) { | |
case UIInterfaceOrientationLandscapeLeft: | |
case UIInterfaceOrientationLandscapeRight: | |
imageName = [imageName stringByAppendingString:@"-Landscape"]; | |
break; |
This file contains 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 Direction | |
attr_reader :short, :long | |
def self.to_mongo(value) | |
case value.long | |
when 'north' | |
'n' | |
when 'northeast' | |
'ne' | |
when 'east' |
This file contains 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
// | |
// CDVSocketBridge.m | |
// Simple Beauty, Inc. | |
// | |
// Created by Sean Bollin on 11/11/13. | |
// | |
// | |
#import "CDVSocketBridge.h" |
This file contains 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
require 'socket' | |
clients = [] | |
server = TCPServer.open(5555) | |
loop { | |
Thread.start(server.accept) do |client| | |
clients << client | |
p clients.length | |
loop { |
This file contains 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
app.get('/game', function(req, res) { | |
console.log("request /game"); | |
roomProvider.findById(1, function(error, docs){ | |
currentRoom = docs; | |
res.render('games_index.haml', { | |
locals: { | |
title: 'RubyMUD', | |
room: exit_generator(docs), | |
isGameLayout: true | |
} |
NewerOlder