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 fastify = require('fastify')() | |
// Declare a route | |
fastify.get('/', async (request, reply) => { | |
return { hello: 'world' } | |
}) | |
// Run the server! | |
const start = async () => { | |
try { |
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
#include <stdio.h> | |
int main() { | |
int inputArray[9], countArray[9]; | |
int i, j, count; | |
for(i = 0; i < 9; i++){ | |
scanf("%d", &inputArray[i]); | |
countArray[i] = -1; | |
} |
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
upstream app_server { | |
ip_hash; | |
server app_react:3000 max_fails=3 fail_timeout=30s; | |
} | |
upstream api_server { | |
ip_hash; | |
server api_feathers:3040 max_fails=3 fail_timeout=30s; | |
} |
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 java.io.*; | |
import java.net.InetSocketAddress; | |
import java.net.URI; | |
import java.net.URLDecoder; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import com.sun.net.httpserver.HttpExchange; |
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
version: "2" | |
services: | |
backend: | |
build: './backend' | |
volumes: | |
- './backend:/app' | |
ports: | |
- "3030:3030" | |
links: | |
- mongodb |
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
server { | |
listen 80; | |
server_name api.localhost; | |
location / { | |
proxy_pass http://backend:3030; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
'use strict' | |
const fastify = require('fastify')() | |
const { | |
makeExecutableSchema | |
} = require('graphql-tools') | |
const { | |
graphqlFastify, | |
graphiqlFastify | |
} = require('./') |
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
<nav class="navbar navbar-expand-lg navbar-light bg-light"> | |
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation"> | |
<span class="navbar-toggler-icon"></span> | |
</button> | |
<a class="navbar-brand" href="#">Navbar</a> | |
<div class="collapse navbar-collapse" id="navbarTogglerDemo03"> | |
<ul class="navbar-nav mr-auto mt-2 mt-lg-0"> | |
<li class="nav-item active"> | |
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> |
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
public class FullBinaryTreeTester { | |
public static void inOrderTraverse(Node root) | |
{ | |
//YOUR CODE GOES HERE | |
if (root == null){ | |
return; | |
} | |
if(root.left != null){ |
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
map $sent_http_content_type $expires { | |
"text/html" epoch; | |
"text/html; charset=utf-8" epoch; | |
default off; | |
} | |
server { | |
listen 80; # the port nginx is listening on | |
server_name your-domain; # setup your domain here |