Skip to content

Instantly share code, notes, and snippets.

@bato3
bato3 / 1-production.md
Last active March 23, 2022 09:23
SvelteKit `adapter-node` self hosted

Do I need to set nginx and proxy or there is a better way to directly running build without giving :3000?

No, you can use also Apache or Caddy xD

The Node http server takes a lot of effort to do what classic web servers like nginx/...

For example: request queuing. There are no restrictions in Node. It opens new connections until the server use all resources. Also I have experienced problems with keep-alive header. And HTTPS should be provided...

:root {
color-scheme:dark light;
--background-light: #fafdfb;
--on-background-light: #191c1c;
--surface-light: #eef1ef;
--on-surface-light: #191c1c;
--surface-variant-light: #f1e0d0;
--on-surface-variant-light: #504539;
--primary-light: #865300;
--on-primary-light: #ffffff;
@bato3
bato3 / gist:d4174c9fb4b3ac4ae5ff7ce0fe9aa213
Created April 30, 2017 12:58 — forked from danbev/gist:9887071
SockJS curl commands

Open or poll a xhr polling session:

curl -v http://localhost:8081/echo/123/123/xhr

Send to a xhr polling session:

curl -i --header "Content-Type: application/javascript" -X POST -d '["data"]' http://localhost:8081/echo/123/123/xhr_send
@bato3
bato3 / predictionio_readme.md
Last active April 30, 2017 12:01 — forked from rojosinalma/predictionio_readme.md
PredictionIO Install Instructions

PredictionIO Setup Guide

--

This is a pretty much self-noted guide to setting up PredictionIO in a cluster of 3 servers (for this guide in particular).

You can also setup more servers and distribute the services mentioned here differently, but for the scope of this guide I won't explain how to do that, although you might use the references here to guide yourself into doing that.

  1. Requirements:
@bato3
bato3 / __clener.php
Created July 31, 2014 05:50
UTF-8Y fixer
<pre><?php
set_time_limit(3600);
ini_set('max_execution_time',3600);
$dirs = Array();
$files = array();
function fixUTF8($dir)
{
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
@bato3
bato3 / l2s.php
Created July 31, 2014 05:46
Lineage II walker syntax
<?php
/*************************************************************************************
* l2s.php
* --------
* Author: Wojciech Bajon (wojciech.bajon g;)mail.com)
* Copyright: (c) 2010 Wojciech Bajon
* Release Version: 0.1
* Date Started: 2010/07/22
*
* L2.net script language file for GeSHi.
<?php
/**
* Twitter Bootstrap Kohana helper
*
* example of use:
* <?=Bootstrap::grid($grid, Bootstrap::FLUID);?>
* <?=$grid->span($view, 4);?>
* <?=Bootstrap::icon('download', TRUE);?>
* <?=Bootstrap::button('Button'); ?>