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
Highcharts.Chart.prototype.callbacks.push(function(chart) { | |
var hasTouch = hasTouch = document.documentElement.ontouchstart !== undefined, | |
mouseTracker = chart.tracker, | |
container = chart.container, | |
mouseMove; | |
mouseMove = function (e) { | |
// let the system handle multitouch operations like two finger scroll | |
// and pinching | |
if (e && e.touches && e.touches.length > 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
angular.module('directivlor', [ | |
'ngCookies', | |
'ngResource', | |
'ngSanitize', | |
'ui.router' | |
]) | |
//contenteditable data two-way bind | |
.directive('contenteditable', ['$sce', function ($sce) { | |
return { |
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
'use strict'; | |
var md5 = require('MD5'), | |
_ = require('lodash'), | |
async = require('async'), | |
https = require('http'), | |
request = require('request'), | |
app_id = '100', | |
keys = 'testkeys123', | |
api_host = 'http://test.5wei.com/'; |
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 path = require('path'); | |
var fs = require('fs'); | |
var url = require('url'); | |
var app = require('express')(); | |
var staticfile = function (req,res,next) { | |
var pathname = url.parse(req.url).pathname; | |
fs.readFile(path.join(ROOT, pathname), function (err, file){ | |
if(err){ | |
return next(); |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('../../'); | |
var app = module.exports = express(); | |
// Faux database | |
var users = [ |
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('/user/:id', function(req, res){ | |
res.send('user ' + req.params.id); | |
}); | |
"/user/:id" | |
/user/12 | |
"/users/:id?" | |
/users/5 | |
/users |
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
'use strict'; | |
var express = require('express'); | |
/** | |
* Main application file | |
*/ | |
// Set default node environment to development | |
process.env.NODE_ENV = process.env.NODE_ENV || 'development'; |
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
'use strict'; | |
var express = require('express'), | |
favicon = require('static-favicon'), | |
logger = require('morgan'),//loging middleware | |
compression = require('compression'), | |
bodyParser = require('body-parser'),//urlencoded json | |
methodOverride = require('method-override'),//enable http verbs on client | |
cookieParser = require('cookie-parser'), | |
session = require('express-session'), |
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
$sprites: sprite-map("sprites/*.png"); | |
$sprites-retina: sprite-map("sprites-retina/*.png"); | |
@mixin sprite-background($name) { | |
background-image: sprite-url($sprites); | |
background-position: sprite-position($sprites, $name); | |
background-repeat: no-repeat; | |
display: block; | |
height: image-height(sprite-file($sprites, $name)); | |
width: image-width(sprite-file($sprites, $name)); |
NewerOlder