Skip to content

Instantly share code, notes, and snippets.

View edermanoel94's full-sized avatar

Eder Costa edermanoel94

  • Rio de Janeiro
View GitHub Profile
@edermanoel94
edermanoel94 / WSL2GUIXvnc-en.md
Created September 19, 2022 12:35 — forked from tdcosta100/WSL2GUIXvnc-en.md
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key components we need to install are tigervnc-standalone-server and systemd-genie.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working [WSL2](https://docs.microsoft.com/pt-br/windows/wsl/w

@edermanoel94
edermanoel94 / main.go
Last active September 10, 2021 01:48
Algoritmo para criar tabela PRICE
package main
import (
"fmt"
"math"
"strconv"
)
type Loan struct {
installments float64
@edermanoel94
edermanoel94 / main.go
Last active April 25, 2020 01:32
read file
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
"runtime"
const fs = require('fs');
const csv = require('fast-csv');
fs.createReadStream('file.json')
.pipe(csv.parse({headers: false}))
.on('data', row => {
readRow(row)
.then((obj) => {
console.log(obj)
// axios aqui