This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
nodes |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
defmodule HttpRequester do | |
use GenServer | |
def start_link(_) do | |
GenServer.start_link(__MODULE__, nil, []) | |
end | |
def fetch(server, url) do | |
# Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/ | |
timeout_ms = 10_000 |
export function actionTypeBuilder(prefix) { | |
return { | |
type: actionType => `${prefix}/${actionType}`, | |
loading: actionType => `${actionType}/loading`, | |
ready: actionType => `${actionType}/ready`, | |
stopped: actionType => `${actionType}/stopped`, | |
changed: actionType => `${actionType}/changed`, | |
error: actionType => `${actionType}/error`, | |
success: actionType => `${actionType}/success` | |
}; |
var npm = require("npm"); | |
var fs = require("fs-extra"); | |
var chokidar = require("chokidar"); | |
var packagePaths = [ | |
"../mobile-app/node_modules/shared-package/lib", | |
"../web-app/node_modules/shared-package/lib", | |
]; | |
var noop = () => {}; |
const Post = new GraphQLObjectType({ | |
name: "Post", | |
description: "This represent a Post", | |
fields: () => ({ | |
_id: {type: new GraphQLNonNull(GraphQLString)}, | |
title: { | |
type: new GraphQLNonNull(GraphQLString), | |
resolve: post => (post.title || "Does not exist") | |
}, | |
content: {type: GraphQLString} |
import React from 'react' | |
import { observer } from 'mobx-react' | |
function ArtistList({ uiState: { artistData } }) { | |
const { data } = artistData; | |
if ( !data || !data.artists || !data.artists.length ) { | |
return <div>No artists bruh.</div> | |
} | |
const { artists } = data | |
return ( |
#!/usr/bin/env ruby | |
print "What is the URL of your Apple Downloads resource?\nURL:" | |
url = gets.strip | |
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: " | |
token = gets.strip | |
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads" |
defmodule MyApp.Checks.UnverifiedMocks do | |
@moduledoc """ | |
#{__MODULE__} looks for test files that import Mox and use | |
the `expect/4` function, but do not enforce any assertions that | |
the expectations have been called or not either by running `verify_on_exit` | |
from a setup block or calling `verify!/0` or `verify!/1` inline | |
in a test block. | |
""" | |
@message """ |