Skip to content

Instantly share code, notes, and snippets.

View khayyamsaleem's full-sized avatar
🏠
Working from home

khayyam khayyamsaleem

🏠
Working from home
View GitHub Profile
#include <iostream>
using namespace std;
// width and height of the board
const int width = 7, height = 6;
//pieces
const char EMPTY = '_', X = 'X', O = 'O';
//board is represented with a 2-dimensional char array
char board[height][width];
#include <iostream>
using namespace std;
const int width = 7, height = 6;
const char EMPTY = '_', X = 'X', O = 'O';
char board[height][width];
void setup(){
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
board[i][j] = EMPTY;
#include <iostream>
using namespace std;
const int width = 7, height = 6;
const char EMPTY = '_', X = 'X', O = 'O';
char board[height][width];
void setup(){
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
board[i][j] = EMPTY;
EXPOSE 8080
ENV API_ENV "docker"
CMD ["/app/cxp-toolkit"]
EXPOSE 8080
ENV API_ENV "docker"
CMD ["/app/cxp-toolkit"]
# building frontend
FROM node:alpine
COPY ./frontend /frontend
WORKDIR /frontend
RUN npm install
RUN npm run build
# building api
FROM golang:alpine
# building frontend
FROM node:alpine
COPY ./frontend /frontend
WORKDIR /frontend
RUN npm install
RUN npm run build
# building api
FROM golang:alpine
pipeline {
agent any
stages {
stage('Checkout Source'){
steps {
checkout scm
}
}
stage('Deploy') {
agent any
FROM node:alpine
COPY ./frontend /frontend
WORKDIR /frontend
RUN npm install
RUN npm run build
FROM golang:alpine
ENV GO111MODULE on
RUN apk add --no-cache git
FROM node:latest
COPY ./frontend /frontend
WORKDIR /frontend
RUN npm install
RUN npm run build
FROM golang:alpine
ENV GO111MODULE on
RUN apk add --no-cache git