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
"MyModel" : { | |
"array" : true, | |
"shared" : false, | |
"attributes" : { | |
"my16bitIntField" : {"type" : "int16"}, | |
"my32BitIntField" : {"type" : "int32"}, | |
"my64BitIntField" : { | |
"type" : "int64", | |
}, | |
"myBooleanField" : {"type" : "boolean"}, |
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
{ | |
# ...(snip)... | |
"myResourceField" : { | |
"get" : "https://my.resource.url?with=parameter", | |
"put" : "https://my.resource.url?with=parameter", | |
"type" : "sandbox.type.net" | |
}, | |
# ...(snip)... | |
} |
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
{ | |
"get" : "https://path/to/get", | |
"put" : "https://path/to/post", | |
"type" : "none" | |
} |
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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
let request = require('superagent'); | |
let agent = request.agent(); | |
let account = {username: '[email protected]', password: 'xxxxx'}; | |
const URI = 'http://xxx:3000/api/v1'; | |
request.post(`${URI}/user_session`).send(account).type('json') | |
.end((err, res) => { | |
agent.saveCookies(res); |
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 Backtracable | |
def self.included(klass) | |
klass.class_eval do | |
include InstanceMethods | |
end | |
end | |
module InstanceMethods | |
def backtrace(e: nil, logger: Rails.logger, method: :warn) |
OlderNewer