ssh-copy-id -o 'Port={PORT}' USER@IP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Button } from "@/components/ui/button" | |
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card" | |
import { Badge } from "@/components/ui/badge" | |
import { | |
CheckCircle, | |
ArrowRight, | |
Zap, | |
BarChart2, | |
Clock, | |
Users, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TO Run Docker Conatiner | |
docker run -it --name devserver -p 2200:22 --mount src="/Volumes/code",target=/root/coding,type=bind -d ubuntu:latest | |
// Arm64 Dev Setup with Root User | |
chown -R $(whoami) . && | |
apt update && | |
apt upgrade -y && | |
apt install git curl -y && | |
apt-get install build-essential && | |
apt-get install snapd && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:worktime_client/src/extensions/email_validator.dart'; | |
import 'package:worktime_client/src/config/constants.dart'; | |
import 'package:worktime_client/src/services/http-client.dart'; | |
class LoginFormState extends State<LoginForm> { | |
final _formKey = GlobalKey<FormState>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH into a WSL2 host remotely and reliably | |
Motivation 🐼 | |
My MacBook is screaming at me while working on my heavy Webpack project. I have a powerful Windows 10 PC in my living room and my project runs just fine with WSL2 + VSCode remote, but how do I SSH into WSL from my MacBook remotely? | |
Let’s get into it 🔥 | |
Make sure openssh-server is installed on your WSL Linux distro (In my case Ubuntu): | |
sudo apt install openssh-server | |
2. We need to set a different port for our SSH process, since Windows already uses the default one which usually is 22. I think 2222 is easy to remember. | |
# edit /etc/ssh/sshd_config with the following three changes |
We can use openssl Command-line utility to generate private key which will be used for generating certificate Signing Request and Certificate.
openssl genpkey -out server.key -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -aes-128-cbc
You can name your key whatever you like for example key.pem | key.key | sample.hello doesn’t matter what you name the key but the general convention is to use .pem extension.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('hello world') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"key": "ctrl+pagedown", | |
"command": "workbench.action.nextEditor" | |
}, | |
{ | |
"key": "ctrl+pageup", | |
"command": "workbench.action.previousEditor" | |
}, | |
{ |