This file contains 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
set -ex | |
sudo apt install python3-pip | |
sudo pip install virtualenv virtualenvwrapper | |
mkdir ~/.virtualenvs | |
export shell_resource_file='~/.zshrc' | |
cat <<EOT >> ~/.zshrc # it should $shell_resource_file | |
echo export WORKON_HOME=~/.virtualenvs |
This file contains 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
{ | |
"hello":"world", | |
"number": [ | |
1,2,3,4,5,6,7 | |
] | |
} |
This file contains 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
# NGINX UFW Cheatsheet | |
# Nginx Full: This profile opens both port 80 (normal, unencrypted web traffic) and port 443 (TLS/SSL encrypted traffic) | |
# Nginx HTTP: This profile opens only port 80 (normal, unencrypted web traffic) | |
# Nginx HTTPS: This profile opens only port 443 (TLS/SSL encrypted traffic) | |
sudo apt update | |
sudo apt install nginx ufw -y | |
sudo ufw allow 'Nginx HTTP' | |
sudo ufw allow 'OpenSSH' # Just in case ssh not allowed |
This file contains 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: | |
influxdb: | |
image: 'influxdb:latest' | |
container_name: influxDB | |
networks: | |
- tick-network | |
volumes: | |
- './tick-stack/influxdb/data:/var/lib/influxdb' | |
- './tick-stack/influxdb/config/:/etc/influxdb/' |
This file contains 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
set -ex | |
# Preparation | |
sudo apt update | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
source /etc/lsb-release # Get current version codename | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $DISTRIB_CODENAME stable" | |
sudo apt update |
This file contains 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
<problem> | |
<coderesponse queuename="test-pull"> | |
<html> | |
<style> | |
p.label { | |
margin-bottom: 0 !important; | |
} | |
.sample-input-output { | |
display: block; | |
padding: 5px; |
This file contains 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 flask import Flask, request, jsonify | |
from flask_sqlalchemy import SQLAlchemy | |
# http://flask-sqlalchemy.pocoo.org/2.3/quickstart/#a-minimal-application | |
app = Flask(__name__) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://my_user:my_password@127.0.0.1/my_database' | |
db = SQLAlchemy(app) |
This file contains 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
docker run --rm -v $(pwd):/app composer/composer install | |
# Error: | |
# Loading composer repositories with package information | |
# Installing dependencies (including require-dev) from lock file | |
# Your requirements could not be resolved to an installable set of packages. | |
# Problem 1 | |
# - Installation request for symfony/event-dispatcher v3.4.17 -> satisfiable by symfony/event-dispatcher[v3.4.17]. | |
# - symfony/event-dispatcher v3.4.17 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.0.7) does not satisfy that requirement. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder