Skip to content

Instantly share code, notes, and snippets.

View sfmohassel's full-sized avatar
😄
Happy

Aria Mohassel sfmohassel

😄
Happy
View GitHub Profile
@sfmohassel
sfmohassel / .prettierrc
Created June 22, 2022 22:28
prettierrc
{
"singleQuote": true,
"trailingComma": "all",
"semi": false,
"tabWidth": 2,
"endOfLine": "lf",
"arrowParens": "always",
"printWidth": 120
}
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "@typescript-eslint/eslint-plugin"],
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
@sfmohassel
sfmohassel / launch.json
Created January 4, 2022 12:57
Debug ts-node in Visual Studio Code
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
@sfmohassel
sfmohassel / Readme.md
Last active November 13, 2021 13:44
Virtual Box - Ubuntu 20.04 Guest on Windows 11 Host

Install dependencies and virtualbox guest tools

sudo apt install build-essential dkms virtualbox-guest-x11

Allow 1920 x 1080 resolution

Create ~/.xprofile with this content

@sfmohassel
sfmohassel / xprofile
Created November 13, 2021 13:15 — forked from geek/xprofile
Ubuntu add 1920x1080 resolution forever
~/.xprofile
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual1 1920x1080_60.00
xrandr --output Virtual1 --mode 1920x1080_60.00
@sfmohassel
sfmohassel / hyper-v-enhanced-session-for-ubuntu-20.04.md
Created November 13, 2021 09:12
How to Enable Hyper-V Enhanced Session for Ubuntu 20.04 VMs

Enable Hyper-V Enhanced Session for Ubuntu 20.04 VMs

  • Create an Ubuntu 20.04 VM on Hyper-V. For example: my-ubuntu

  • Connect to your VM and run these commands inside:

wget https://gist.githubusercontent.com/saeidjoker/3d05a608eea14370b772f2dcdd842b7d/raw/0f81231ae321e7dde96f078bc23a9b2151522b51/install.sh
sudo chmod +x install.sh
sudo ./install.sh
@sfmohassel
sfmohassel / vmdk_vhdx.md
Created November 11, 2021 22:20 — forked from rahilwazir/vmdk_vhdx.md
Convert VMWare to Hyper-V (vmdk to vhdx)
@sfmohassel
sfmohassel / rabbitmq-rpc-client.js
Created January 28, 2021 00:09
RabbitMQ RPC client in NodeJs
const amqp = require('amqplib');
const uuid = require('uuid')
const EventEmitter = require('events').EventEmitter
class RabbitMqRpcClient {
constructor() {
/**
* @type {amqp.Connection}
*/
this.connection = null;
@sfmohassel
sfmohassel / dns-dhcp.ps1
Last active January 1, 2021 20:01
PowerShell Core Set DNS servers and DHCP (Run As Administrator in Windows)
# This allows you to set DNS back to DHCP
Get-NetAdapter -Physical
$adapters = Get-NetAdapter -Physical
$adapterIndex = ""
$adapterName
for ($i = 0; $i -lt $adapters.Count; $i++) {
$a = $adapters[$i]
if ($a.Status -eq "Up") {
$adapterIndex = $a.InterfaceIndex
$adapterName = $a.Name