Skip to content

Instantly share code, notes, and snippets.

@fedme
fedme / Ionic Android Development on WSL.md
Last active May 7, 2023 16:21
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@fedme
fedme / Run Visual Studio Code for Linux from WSL.md
Last active November 8, 2023 09:33
Run Visual Studio Code for Linux from WSL on Windows 10

Run Visual Studio Code for Linux from WSL

Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.

This process was tested on WSL Ubuntu 18.04.

Install VcXsrv on Windows

  1. Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
  2. Install the software on Windows

Add VS Code repositories

@fedme
fedme / access-ionic-storage-sqlite-db-from-console.md
Created September 5, 2018 15:57
How to access Ionic Storage SQLite DB from the console

How to access Ionic Storage SQLite DB from the console

var db = window.sqlitePlugin.openDatabase({name: 'NAME_OF_YOUR_STORAGE', location: 'default', androidDatabaseImplementation: 2});
db.transaction(function(tx) {
    tx.executeSql("SELECT * FROM _ionickv", [], function(tx, rs) {
 var records = [];
@fedme
fedme / install-virtualenv-ubuntu-zsh-wsl.md
Last active July 3, 2023 11:23
Install virtualenv on Ubuntu + ZSH (on WSL)

Virtualenv on WSL with ZSH

Install PIP

sudo apt install python-pip
sudo apt install python3-pip

pip --version
pip3 --version

WSL does now have native support for USB devices, which means it can't detect the Yubikey plugged into your computer. It seems like USB support will come soon, but for now we need to use a workaround.

The workaround consists in exposing a GPG socket from Windows to your WSL Linux instance. That way, your WSL's gpg command will connect to your Windows's gpg software and will be able to detect your USB Yubikey.

  1. Install GnuPG on Windows

  2. Install Putty on Windows

  3. Run the following 2 commands in Powershell to create your GPG conf file:

@fedme
fedme / USB WSL
Last active October 5, 2022 12:15
# Install the following on Windows:
# - Install CLI https://github.com/dorssel/usbipd-win/releases
# - and GUI https://gitlab.com/alelec/wsl-usb-gui/-/releases
# - Build custom WSL kernel following the "Build Custom Kernel" instructions at https://github.com/dorssel/usbipd-win/wiki/WSL-support
# BUT also enable the following:
# Device Drivers --->
# HID Support --->
# Check /dev/hidraw raw HID device support
# Check HID Support -> User-space I/O driver support for HID subsystem
@fedme
fedme / message_types_example.exs
Last active May 4, 2023 14:11
Process any kind of message in Stacks
# Example Stack that shows how to process every possible WhatsApp message type
# This is still under development and the syntax might change before it's finalized and
# published in our docs.
card Start, then: ProcessResponse do
response =
ask("""
Please reply with any kind of message.
Supported message types are: