Instructions:
- Copy and paste the
server.jsinto a new folder calledgenartor whatever - Run
npm init -yto generate apackage.json - Install the dependencies:
npm install body-parser openai express canvas dotenv
These are the steps I took to install and run a nostr relay on a new server.
First, you'll need the server, this tutorial is using the most basic server Hetzner provides (CX11 - €4.15/mo), you don't need much. If you don't know where to get your server from and decide to go with Hetzner, consider using my affiliate link: https://hetzner.cloud/?ref=4FZql6rUwaeQ
Once you have your server running, log into it via SSH. I'm on a MacOS, so I'll use Terminal as my command line tool. open a new Terminal window and paste the following commands:
| // Polyfill so we can run this in Node.js as well | |
| if (typeof atob !== 'function') { | |
| var atob = a => Buffer.from(a, 'base64').toString('binary') | |
| var btoa = b => Buffer.from(b).toString('base64'); | |
| } | |
| // 511 bytes after minify | |
| var a=[ | |
| ["#1b6f3f", "#10c5b4", "#ade4cd", "#29ec19"], | |
| ["#96bde8", "#246a85", "#3483e4", "#b168f6"], |
| tail -f -n 450 storage/logs/laravel*.log \ | |
| | grep -i -E \ | |
| "^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
| --color |
| /* Shadow 0dp */ | |
| box-shadow: none; | |
| /* Shadow 1dp */ | |
| box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20); | |
| /* Shadow 2dp */ | |
| box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20); | |
| /* Shadow 3dp */ |
Based on https://techwombat.com/enable-http2-apache-ubuntu-16-04/
This totorial is for an older Ubuntu 16.04, for a Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831 and for a Ubuntu 20.04 please read here* --> https://gist.github.com/GAS85/38eb5954a27d64ae9ac17d01bfe9898c
| <div class="calendar"> | |
| <div class="calendar-navs"> | |
| <div class="month-nav"> | |
| <button (click)="prevMonth()"><</button> | |
| <span class="p4">{{ currentDate.format('MMMM') }}</span> | |
| <button (click)="nextMonth()">></button> | |
| </div> | |
| <div class="year-nav"> | |
| <button (click)="prevYear()"><</button> | |
| <span>{{ currentDate.format('YYYY') }}</span> |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\ServiceProvider; | |
| use Aws\S3\S3Client; | |
| use League\Flysystem\AwsS3v3\AwsS3Adapter; | |
| use League\Flysystem\Filesystem; | |
| use Storage; |
| <? | |
| // | |
| // [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
| // by @levelsio | |
| // | |
| // 2017-08-23 | |
| // | |
| // 1) buy $40/day BTC | |
| // 2) buy $10/day ETH | |
| // |
| function isInside(p, [a, b]) { | |
| return (b[0] - a[0]) * (p[1] - a[1]) > (b[1] - a[1]) * (p[0] - a[0]); | |
| } | |
| function getEdges(polygon) { | |
| let edges = []; | |
| for (let i = 0; i < polygon.length; i++) { | |
| let edge = [polygon[(i + polygon.length - 1) % polygon.length], polygon[i]]; |