In the apps config/puma.rb
file:
Change to match your CPU core count
# Check using this on the server => grep -c processor /proc/cpuinfo
workers 4
# Min and Max threads per worker
threads 1, 6
app_dir = File.expand_path('../..', FILE)
In the apps config/puma.rb
file:
Change to match your CPU core count
# Check using this on the server => grep -c processor /proc/cpuinfo
workers 4
# Min and Max threads per worker
threads 1, 6
app_dir = File.expand_path('../..', FILE)
extends Camera | |
# How fast the camera speeds up to the moveSpeed and slows down to zero. | |
export var acceleration = 50.0 | |
# The top speed of the camera. | |
export var moveSpeed = 8.0 | |
# The speed of the mouse input. | |
export var mouseSpeed = 300.0 |
{config, pkgs, ...}: | |
{ | |
# Enable Nginx | |
services.nginx = { | |
enable = true; | |
# Use recommended settings | |
recommendedGzipSettings = true; | |
recommendedOptimisation = true; |
Notes on how to set up a new Ubuntu LTS x64 environment, how to build a recent Mainline Kernel and place it on a Raspberry Pi OS SD card.
$ apt install git make gcc g++ device-tree-compiler bc bison flex libssl-dev libncurses-dev python3-ply python3-git libgmp3-dev libmpc-dev
class CreateNoIdModels < ActiveRecord::Migration | |
def change | |
create_table :no_id_models, id: false do |t| | |
t.integer :pk1 | |
t.integer :pk2 | |
end | |
end | |
end |
#!/bin/sh | |
# | |
# Read-only Root-FS for Raspian | |
# | |
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with | |
# overlayfs integrated in Linux Kernel >= 3.18. | |
# | |
# Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10. | |
# This version can be found here: | |
# https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs |
<?xml version="1.0" encoding="utf-8"?> | |
<EntityDescriptor ID="_271f377f-78d8-4133-8c46-a73c4936bb1f" entityID="https://example.com" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"> | |
<RoleDescriptor xsi:type="fed:ApplicationServiceType" xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706" protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<fed:TargetScopes> | |
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> | |
<wsa:Address>https://example.com/</wsa:Address> | |
</wsa:EndpointReference> | |
</fed:TargetScopes> | |
<fed:PassiveRequestorEndpoint> | |
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> |
var WebSocketServer = require('ws').Server; | |
var wss = new WebSocketServer({port: 8080}); | |
var jwt = require('jsonwebtoken'); | |
/** | |
The way I like to work with 'ws' is to convert everything to an event if possible. | |
**/ | |
function toEvent (message) { | |
try { |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.