using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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
| // using browserify with express http://makerlog.org/posts/express-and-browserify/ | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var source = require('vinyl-source-stream'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babelify = require('babelify'); | |
| var exorcist = require('exorcist'); | |
| var browserSync = require('browser-sync').create(); |
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
| import _ from 'lodash' | |
| import { | |
| GraphQLObjectType, | |
| GraphQLSchema, | |
| GraphQLInt, | |
| GraphQLString, | |
| GraphQLList | |
| } from 'graphql'; |
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 request = require("supertest"); | |
| const Hapi = require('hapi'); | |
| const server = new Hapi.Server(); | |
| server.connection({ port: 3000, host: 'localhost' }); | |
| server.route({ | |
| method: 'GET', | |
| path: '/', |
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
| /* | |
| * Copyright (c) 2015 Martin Donath | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to | |
| * deal in the Software without restriction, including without limitation the | |
| * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| * sell copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
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
| import Relay, { | |
| RootContainer, | |
| Route | |
| } from 'react-relay' | |
| class SeasonRoute extends Route { | |
| static paramDefinitions = {}; | |
| static queries = { | |
| currentSeason: () => Relay.QL`query { currentSeason }`, |
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
| // TodoList GraphQL | |
| // ----------------- | |
| import Foundation | |
| struct Todo: Codable { | |
| let id, text: String? | |
| let complete: Bool? | |
| var description: String { | |
| get { |
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
| *** Cluster Setup for Google Container Engine *** | |
| 0/ Install and configure local gcloud and kubectl: https://cloud.google.com/sdk/docs/ | |
| > gcloud components install kubectl | |
| 1/ Configure Google Cloud account: | |
| > gcloud config set account YOUR_EMAIL_ADDRESS | |
| > gcloud config set project YOUR_PROJECT_ID | |
| > gcloud config set compute/zone us-west1-a | |
| > gcloud config set container/cluster example |
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
| package main | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "math/big" | |
| b64 "encoding/base64" |
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
| FROM --platform=linux/amd64 docker.io/golang:1.17.5@sha256:90d1ab81f3d157ca649a9ff8d251691b810d95ea6023a03cdca139df58bca599 AS bitcoin-build | |
| ARG ARCH=amd64 | |
| ENV GO111MODULE=on | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install git netcat |