put to /usr/local/bin/git-squash
execute in bash chmod +x /usr/local/bin/git-squash
use git squash
#!/bin/bash | |
sudo apt-get update | |
sudo service docker stop | |
sudo apt-get remove -y docker docker-engine docker.io | |
sudo apt-get -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common \ | |
wget |
package main | |
import ( | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func main() { | |
str := "aaaaaabbbbacccccaaabbbbbc" |
put to /usr/local/bin/git-squash
execute in bash chmod +x /usr/local/bin/git-squash
use git squash
package main | |
import ( | |
"fmt" | |
"reflect" | |
"regexp" | |
"strconv" | |
"unsafe" | |
) |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
) | |
func main() { | |
l, err := net.Listen("tcp", ":8888") |
package main | |
import ( | |
"bytes" | |
"compress/gzip" | |
"encoding/gob" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" |
package main | |
import ( | |
"fmt" | |
"syscall" | |
"unsafe" | |
) | |
// error is nil on success | |
func reboot() error { |
package main | |
import ( | |
"fmt" | |
"unsafe" | |
"reflect" | |
) | |
func main() { | |
var n uint64 = 1 << (1 << 6) - 1 |
version: '3.3' | |
services: | |
frontend: | |
container_name: frontend_${NODE_ENV} | |
image: node:14-stretch | |
command: npm run start | |
restart: always | |
working_dir: /app | |
environment: | |
- VIRTUAL_HOST=${ENDPOINT} |
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