Skip to content

Instantly share code, notes, and snippets.

@lagz0ne
lagz0ne / readme.md
Created December 12, 2022 10:24
Getting WSA to work with expo debug

Install React-Native dependencies

Visit react-native to refer to their list. React-Native requires Android SDK to be installed, including adb

Install WSA on Windows, assume that you are on Windows 11

  • Install Amazon App Store, it'll ask you to install Windows Subsystem for Android
  • Once installation is done, go ahead and open Windows Subsystem for Android on Windows. This is the app to control Android settings.
  • Uncheck Advanced Networking. You may not be able to connect to server hosted in WSL from Android in this mode (similar to WSL trying to connect to application running in Windows). This put Android in non-magic WSL networking
  • Turn off WSA (there's button to do that). Optional: Set System resources to Continuos so the Android is left running when all apps are closed
  • Visit Developer tab to access Manage developer settings. This to trigger Android app to start again.
@xquangdang
xquangdang / rn-with-wsl-wsa.md
Last active March 22, 2024 14:39
Develop React Native app with WSL and WSA

Develop React Native app with WSL and WSA

Requirement

  • Windows Subsystem for Linux 2 (WSL2)
  • Windows Subsystem for Android (WSA)
  • NodeJS install inside WSL2

Steps

WSA

@lorisleiva
lorisleiva / AppWithLocalStorage.vue
Last active May 24, 2024 21:25
Abstraction of the local storage using Vue3's composition API
<script setup>
import useLocalStorage from './useLocalStorage'
const publicKey = useLocalStorage('solana-wallet-public-key')
</script>
<template>
<div>
<input type="text" v-model="publicKey">
<div v-text="publicKey"></div>
</div>
@SiddharthShyniben
SiddharthShyniben / ninja-code.md
Last active October 25, 2022 09:35
Ninja Code from javascript.info. For my self reference.

Ninja code

Learning without thought is labor lost; thought without learning is perilous.

Confucius

Programmer ninjas of the past used these tricks to sharpen the mind of code maintainers.
Code review gurus look for them in test tasks.
Novice developers sometimes use them even better than programmer ninjas.
Read them carefully and find out who you are – a ninja, a novice, or maybe a code reviewer?

@abmohan
abmohan / pip-save.sh
Last active November 14, 2020 01:59
pip install and save dependencies (i.e. Python equivalent of `npm install --save`)
# pip install and save to (and sort + dedupe) requirements.txt
function pip-save {
# loop through all listed requirements
for var in "$@"
do
# attempt to install it
pip install $var
# add it to the requirements.txt file
pip freeze | grep -i "^$var=" >> requirements.txt

It's impossible to install PyQt5 out of the box with pip in Raspbian Buster

Here is what I did

It's quite long beat with me. (First part is from official guide with extended dependencies https://wiki.qt.io/Building_Qt_5_from_Git) First we enable source repo

sudo nano /etc/apt/sources.list

To enable it we need to uncomment in the following way

@Gems
Gems / docker-compose.sh
Last active October 20, 2023 07:38
A `docker-compose` wrapper for multiple configuration files with relative paths
#!/usr/bin/env bash
TMP_FILE=/tmp/docker-compose.$$.yaml
finish() {
rm ${TMP_FILE} ${TMP_FILE}.tmp 2>/dev/null
}
trap finish EXIT
@ilbunilcho
ilbunilcho / How to remove Windows paths from WSL path.md
Created November 1, 2018 16:41
How to remove Windows paths from WSL path

after Build 17093

  • can override settings by edit "/etc/wsl.conf"
  • normally this file is not exists at first
$ sudo vi /etc/wsl.conf

[interop]
appendWindowsPath = false
@vik-y
vik-y / NOTES.md
Created December 5, 2017 23:46
Docker-compose cheat sheet
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active July 5, 2024 19:17
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings