I hereby claim:
- I am skynode on github.
- I am skynode (https://keybase.io/skynode) on keybase.
- I have a public key ASBoSMtTabQZR_8psQIWjT63BD3vxAkkXFViS9ZpmV4WJAo
To claim this, I am signing this object:
using System; | |
using System.Net.Http; | |
using System.Net.Http.Formatting; | |
using System.Threading.Tasks; | |
namespace MyProject.Extensions | |
{ | |
public static class HttpClientEx | |
{ | |
public const string MimeJson = "application/json"; |
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/ | |
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch | |
// async function | |
async function fetchAsync () { | |
// await response of fetch call | |
let response = await fetch('https://api.github.com'); | |
// only proceed once promise is resolved | |
let data = await response.json(); | |
// only proceed once second promise is resolved |
I hereby claim:
To claim this, I am signing this object:
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
## | |
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | |
# User-specific files | |
*.suo | |
*.user | |
*.userosscache | |
*.sln.docstates |
import { GraphQLSchema, GraphQLObjectType } from 'graphql'; | |
import { nodeField, nodesField } from './types/Node'; | |
import StoryType from './types/StoryType'; | |
import UserType from './types/UserType'; | |
import StoryMutations from './mutations/StoryMutations'; | |
import CommentMutations from './mutations/CommentMutations'; | |
export default new GraphQLSchema({ | |
query: new GraphQLObjectType({ |
namespace project | |
{ | |
// ... | |
public class AccountsController : Controller { | |
// ... | |
[HttpGet, Route("accounts/manage/change-passwords", Name="change-password")] | |
[Authorize(Roles="Admin")] |
var expect = require('chai').expect; | |
var Sequelize = require('sequelize'); | |
var db = new Sequelize('postgres://localhost/amazon_db'); | |
var User = db.define('user', { | |
name: { | |
type: Sequelize.STRING, | |
allowNull: false | |
}, | |
foo: { |
import User from './User' | |
import Session from './Session' | |
/* Associations */ | |
User.hasMany(Session) | |
/* Hooks */ | |
User.afterDestroy(async (user, options) => { | |
await Session.destroy({ | |
where: { userId: user.id }, |
var Sequelize = require('sequelize') | |
var db = new Sequelize('mydb', null, null, { | |
dialect: 'postgres' | |
}) | |
var Post = db.define('post', { | |
id: { | |
type: Sequelize.INTEGER, | |
primaryKey: true, | |
autoIncrement: true |