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
| module.exports = function (app) { | |
| var _ = require('lodash'); | |
| var User = app.models.User; | |
| var Role = app.models.Role; | |
| var RoleMapping = app.models.RoleMapping; | |
| var ACL = app.models.ACL; | |
| /* | |
| * Configure ACL's | |
| */ |
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
| module.exports.disableAllMethods = function disableAllMethods(model, methodsToExpose) | |
| { | |
| if(model && model.sharedClass) | |
| { | |
| methodsToExpose = methodsToExpose || []; | |
| var modelName = model.sharedClass.name; | |
| var methods = model.sharedClass.methods(); | |
| var relationMethods = []; | |
| var hiddenMethods = []; |
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
| # | |
| # Shared definition of ruby microservice | |
| # | |
| microservice: | |
| command: "runsvdir /etc/service" | |
| environment: | |
| PORT: 3000 | |
| RAILS_ENV: development | |
| SERVICE_PLATFORM: "mia" | |
| ports: |
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
| Example code for exporting data in a table to a csv file. |
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
| function parseLodash(str){ | |
| return _.attempt(JSON.parse.bind(null, str)); | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| .ot { | |
| width: 400px; | |
| height: 400px; | |
| border: 1px solid #FF6600; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>多行文本未知高度垂直居中-by一丝</title> | |
| <style id="jsbin-css"> | |
| *{margin:0;padding:0;} | |
| .box{ | |
| height:200px; |
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
| /** @jsx React.DOM */ | |
| var LopMonHoc = React.createClass({ | |
| getInitialState: function(){ | |
| return {data: []} | |
| }, | |
| loadData: function(){ | |
| $.ajax({ | |
| url: '/daotao/lops', | |
| success: function(data){ |
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
| const React = require('react') | |
| const Landing = require('./Landing') | |
| const Search = require('./Search') | |
| const Layout = require('./Layout') | |
| const Details = require('./Details') | |
| const ReactRouter = require('react-router') | |
| const data = require('../public/data') | |
| const { Router, Route, hashHistory, IndexRoute } = ReactRouter | |
| const Store = require('./Store') | |
| const { store } = Store |
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 log = require('./lib/logger')(module); | |
| log.info('foo'); |