This is a Terraria Server Setup Guide for Digital Ocean
This guide might not do everything the right way, but it works.
No bullshit. Straight up what I did to get it working. (Ubuntu 16.04 64bit)
ssh into your droplet
Update your shit
| from os import environ | |
| from logging.config import dictConfig | |
| from werkzeug.security import generate_password_hash | |
| class BaseConfig(object): | |
| def _config_logger(self): | |
| """ |
| add_filter('woocommerce_get_price_html', "xa_only_sale_price", 99, 2); | |
| function xa_only_sale_price($price, $product) | |
| { | |
| if(!is_cart() && !is_checkout() && !is_ajax()){ | |
| if ($product->is_type('simple') || $product->is_type('variation')) { | |
| return regularPriceHTML_for_simple_and_variation_product($price, $product); | |
| } | |
| } | |
| return $price; |
| from functools import wraps | |
| from flask import Flask, g, session, request, abort, jsonify | |
| from flask_migrate import MigrateCommand, Migrate | |
| from flask_script import Manager | |
| from flask_sqlalchemy import SQLAlchemy | |
| flask_app = Flask(__name__, static_folder='./static') | |
| db = SQLAlchemy() | |
| migrate = Migrate() |
This is a Terraria Server Setup Guide for Digital Ocean
This guide might not do everything the right way, but it works.
No bullshit. Straight up what I did to get it working. (Ubuntu 16.04 64bit)
ssh into your droplet
Update your shit
Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.
| /* | |
| C socket server example, handles multiple clients using threads | |
| Compile | |
| gcc server.c -lpthread -o server | |
| */ | |
| #include<stdio.h> | |
| #include<string.h> //strlen | |
| #include<stdlib.h> //strlen | |
| #include<sys/socket.h> |
An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.
Where:
REGION: AWS region.ACCOUNT_ID: AWS account ID.APPLICATION_NAME: Desired target Elastic Beanstalk application name(space).IAM_INSTANCE_PROFILE_ROLE: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.| #!/usr/bin/env ruby | |
| # | |
| # This code snippet shows how to enable SSL in Sinatra. | |
| # | |
| require 'sinatra/base' | |
| class Application < Sinatra::Base | |
| configure do | |
| set :bind, '0.0.0.0' |
| #!/usr/bin/env ruby | |
| # | |
| # This code snippet shows how to enable SSL in Sinatra+Thin. | |
| # | |
| require 'sinatra' | |
| require 'thin' | |
| class MyThinBackend < ::Thin::Backends::TcpServer | |
| def initialize(host, port, options) |
| from datetime import date | |
| from sqlalchemy import cast, DATE | |
| Match.query.filter(cast(Match.date_time_field, DATE)==date.today()).all() |