Skip to content

Instantly share code, notes, and snippets.

View annibuliful's full-sized avatar
😥
stressful

jarupong pajakgo annibuliful

😥
stressful
View GitHub Profile
const fastify = require('fastify')()
// Declare a route
fastify.get('/', async (request, reply) => {
return { hello: 'world' }
})
// Run the server!
const start = async () => {
try {
#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;
}
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;
}
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;
version: "2"
services:
backend:
build: './backend'
volumes:
- './backend:/app'
ports:
- "3030:3030"
links:
- mongodb
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;
'use strict'
const fastify = require('fastify')()
const {
makeExecutableSchema
} = require('graphql-tools')
const {
graphqlFastify,
graphiqlFastify
} = require('./')
<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>
public class FullBinaryTreeTester {
public static void inOrderTraverse(Node root)
{
//YOUR CODE GOES HERE
if (root == null){
return;
}
if(root.left != null){
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