Skip to content

Instantly share code, notes, and snippets.

View koobitor's full-sized avatar
😁

Sakol Assawasagool koobitor

😁
View GitHub Profile

Docker

docker run --name surrealdb -d -p 8000:8000 surrealdb/surrealdb:latest start --user root --pass root

Connect DB

DATA="INFO FOR DB;"
curl --request POST \
	--header "Content-Type: application/json" \

1 Install the adapter into your project.

npm install -D @sveltejs/adapter-netlify@next

2 Add the adapter to your project’s svelte.config.js file and pass any options you need.

path svelte.config.js

import adapter from '@sveltejs/adapter-netlify';
import preprocess from "svelte-preprocess";

1 Install Svelte Kit

npm init svelte@next my-app
cd my-app

2 Install Tailwind CSS

npm install -D tailwindcss postcss autoprefixer svelte-preprocess
npx tailwindcss init tailwind.config.cjs -p
/**
* @example HTTP1.1 via undici
* @description Before using script. Please insert apiKey before run this script.
*/
// Dependency Section
import { request } from "undici"
/**
* @function isValidJSONString

Setup Jupyter Text File

pip install jupytext --upgrade
jupyter notebook --generate-config

Edit jupyter_notebook_config.py

c.NotebookApp.contents_manager_class="jupytext.TextFileContentsManager"
c.ContentsManager.default_jupytext_formats=".ipynb,.Rmd"
~/loadnvm.sh
```
#!/bin/zsh
#delete the aliases
unalias nvm
unalias npm
unalias node
#(this is the loader code nvm put in my .bashrc)
~/loadnvm.sh
```
#!/bin/zsh
#delete the aliases
unalias nvm
unalias npm
unalias node
#(this is the loader code nvm put in my .bashrc)

Step 1 – Installing Nginx

apt update
apt install -y nginx

Step 2 – Adjusting the Firewall

ufw app list
ufw allow 'Nginx Full'
#!/bin/bash
index=1
while [ $index -le 100 ]
do
node index.js $index
index=$(( $index + 1 ))
done
node --max-old-space-size=10240 index.js
node --max-old-space-size=4086 index.js