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
<template lang="pug"> | |
.tictactoe | |
.board | |
.row(v-for="(row, y) in currentMatrix", :key="y") | |
button.cell(v-for="(cell, x) in row", :key="x", :position="x, y", @click="userPlays(x,y)", :disabled="end || currentMatrix[y][x] !== 0")="{{setIcon(x,y)}}" | |
.status="{{status}}" | |
button(v-if="end" @click="rebootGame")="Reboot" | |
</template> | |
<script> |
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
### certbot-autorenewal.sh | |
#!/bin/bash | |
cd /home/{your-docker-compose-folder} | |
echo "--------------- RENEWING CERTS ---------------" | |
docker-compose up certbot-site1.com | |
docker-compose up certbot-site2.com | |
etc... | |
echo "--------------- RESTARTING NGINX ---------------" | |
service nginx restart |
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
# Integrating Weechat IRC client with Facebook via Bitlbee, Freenode and Gitter using a VPS and Tmux. | |
# Installing Weechat and Bitlbee. | |
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 11E9DE8848F2B65222AA75B8D1820DB22A11534E | |
$ sudo apt-get install apt-transport-https | |
$ echo "deb https://weechat.org/ubuntu bionic main" | sudo tee /etc/apt/sources.list.d/weechat.list | |
$ echo "deb-src https://weechat.org/ubuntu bionic main" | sudo tee -a /etc/apt/sources.list.d/weechat.list | |
$ echo "deb http://download.opensuse.org/repositories/home:/jgeboski/xUbuntu_18.04 ./" | sudo tee -a /etc/apt/sources.list.d/weechat.list | |
$ echo "deb http://code.bitlbee.org/debian/master/bionic/amd64/ ./" | sudo tee -a /etc/apt/sources.list.d/weechat.list |
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
# /etc/systemd/system/yournodeservice.service | |
[Unit] | |
Description=Docker Compose Application Service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Type=simple | |
RemainAfterExit=yes |
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
image: docker:stable | |
variables: | |
DOCKER_DRIVER: overlay2 | |
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH | |
STAGE_CONTAINER: dev | |
PROD_CONTAINER: prod | |
DEV_FOLDER: /path/to/repo/dev | |
PROD_FOLDER: /path/to/repo/prod |
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: '3' | |
services: | |
local: | |
restart: always | |
container_name: local | |
volumes: | |
- ./config-dev.js:/app/config.js | |
- .:/app | |
build: . |
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 an official Node runtime as a parent image | |
FROM node:latest | |
# Set the working directory to /app | |
WORKDIR /app | |
# Copy the current directory contents into the container at /app | |
COPY . /app | |
# Install any needed packages specified in package.json as well as PM2 to ensure the app integrity. |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
# In[2] importing libs: | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.stats as stats |