Skip to content

Instantly share code, notes, and snippets.

View nwkm's full-sized avatar
🏠
Working from home

nawin nwkm

🏠
Working from home
  • France
View GitHub Profile
@nwkm
nwkm / docker-wsl2.md
Created September 11, 2024 14:17 — forked from martinsam16/docker-wsl2.md
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

@nwkm
nwkm / markdown-to-email
Created November 28, 2023 22:16 — forked from cleverdevil/markdown-to-email
markdown-to-email A simple script to send beautifully formatted emails that you write in Markdown. The email will have an HTML payload and a plain-text alternative, so you'll make everyone happy, including yourself.
#!/usr/bin/env python
'''
Send an multipart email with HTML and plain text alternatives. The message
should be constructed as a plain-text file of the following format:
From: Your Name <your@email.com>
To: Recipient One <recipient@to.com>
Subject: Your subject line
---
@nwkm
nwkm / .__init.md
Created August 2, 2023 07:22 — forked from rickyalmeidadev/.__init.md
vite + react + @swc/jest
yarn create vite
@nwkm
nwkm / multiple-repository-and-identities-git-configuration.md
Created December 15, 2021 06:40 — forked from bgauduch/multiple-repository-and-identities-git-configuration.md
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@nwkm
nwkm / Install pyenv on MacOS or Ubuntu + fish shell
Last active October 21, 2020 22:06 — forked from entropiae/Install pyenv on Ubuntu 18.04 + fish shell
Install pyenv on MacOS/Ubuntu 18.04 + Fish shell
Installation
- Install the packages required to compile Python
Ubuntu
$ sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
MacOS
$ brew install pyenv
@nwkm
nwkm / README.md
Created December 30, 2019 22:07 — forked from mochadwi/README.md
Setup and Install JDK 8, 9, 10 in macOS with Homebrew

Oracle now force user to signup and accept the license agreement in the oracle website.

JDK 8 is still mostly used among java developer especially Android Developer.

Unfortunately, if we're on macOS there's a bad news that the homebrew community delete the entire JAVA/JDk cask and give replacement support to use AdoptOpenJDK.

brew tap adoptopenjdk/openjdk

brew cask install adoptopenjdk8
@nwkm
nwkm / fish_shell.md
Created October 13, 2019 12:58 — forked from idleberg/fish_shell.md
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish
@nwkm
nwkm / README.md
Created July 14, 2019 13:11 — forked from rstacruz/README.md
How to install Docker in Mac, Windows, and Linux

Getting Docker

Docker is available for Linux, MacOS, and Windows.

MacOS

Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.

brew cask install docker # Install Docker
@nwkm
nwkm / chart.helpers.ts
Created June 28, 2019 09:48
Chart helper to get rounded bar
//draws a rectangle with a rounded top
Chart.helpers.drawRoundedTopRectangle = function(
ctx: any,
x: number,
y: number,
width: number,
height: number,
radius: number,
) {