Skip to content

Instantly share code, notes, and snippets.

@HimDek
HimDek / Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md
Last active May 3, 2024 13:49
This Guide will show you how to install and run apk files or Android apps in any Edition of Windows 11 using Windows Subsystem for Android. WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator.

Install Android apps or apk files in Windows using Windows Subsystem for Android

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • Windows Subsystem for Android or WSA must be Installed.

Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.

How to Install Android Apps or apk files in Windows Subsystem for Android:

@munrocket
munrocket / wgsl_2d_sdf.md
Last active May 3, 2024 13:49
WGSL 2D SDF Primitives

WGSL 2D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/398

Circle - exact

fn sdCircle(p: vec2f, r: f32) -> f32 {
  return length(p) - r;
}
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 13:48
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@HimDek
HimDek / Hyper-V in Windows 10 and Windows 11 Home Edition.md
Last active May 3, 2024 13:48
Hyper-V is supported in Pro, Enterprise and Education Edition of Windows 10 and Windows 11. This guide will show you how to enable Hyper-V in Home Editions of Windows 10 and Windows 11.

Hyper-V in Windows 10 and Windows 11 Home Edition

Hyper-V in Windows 10 and Windows 11 allows running Virtual Machine. It is supported only in Pro, Enterprise and Education Edition of Windows 10 and Windows 11 by default. But this guide will show you how to enable it in Home Editions of Windows 10 and Windows 11.

Check if virtualization is enabled:

  • Search for Command Prompt in Windows Start Menu and open it.
  • Type systeminfo and press Enter. Wait for the process to finish
  • Once the results appear, search for the Hyper-V Requirements section which is usually the last one. 11
    • If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed. that means Hyper-V is already enabled and there is no reason following this guide anymore.
  • Otherwise, check for Virtualization Enabled in Firmware:.
@VideoCarp
VideoCarp / lexing.md
Last active May 3, 2024 13:43
Basics of lexing

Lexing for beginners

This is a guide that should teach you how to perform basic lexing in a functional programing language.
Everything was written in Elixir, but you should be able to follow it if you are using any functional programming language.
Or even an imperative programming language like Python, C or Java.\

What is lexing?

The first question you should ask yourself is, what is lexing? It's the same as tokenising, scanning or lexical analysis.
That might not help you if you haven't heard of these either. Put simply, lexing is the process of breaking down a string
into meaningful units, indepdendent of context.
What a lexer will do is make the following happen:

@Kartones
Kartones / postgres-cheatsheet.md
Last active May 3, 2024 13:42
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@pirate
pirate / docker-compose-backup.sh
Last active May 3, 2024 13:42
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@dannanelli
dannanelli / ContactPage-Schema.jsonld
Last active May 3, 2024 13:42
ContactPage Schema Example Template for Local SEO
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ContactPage",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{CONTACT PAGE URL}}"
},
"publisher": {
"@type": "LocalBusiness",
@tyhoff
tyhoff / progress_bar_requests_upload.py
Last active May 3, 2024 13:42
Python requests HTTP PUT with tqdm progress bar
from tqdm import tqdm
from tqdm.utils import CallbackIOWrapper
file_path = os.path.abspath(__file__)
upload_url = https://some-bucket.s3.amazonaws.com
file_size = os.stat(file_path).st_size
with open(file_path, "rb") as f:
with tqdm(total=file_size, unit="B", unit_scale=True, unit_divisor=1024) as t:
wrapped_file = CallbackIOWrapper(t.update, f, "read")
#!/bin/bash
getAWSCredentials()
{
hotctl sso accounts apply -a
hotctl sso accounts apply -n buildstaging=default
hotctl sso accounts apply -n buildstaging=local
hotctl sso accounts apply -n vulcano -r Vulcano-DevOps
hotctl sso accounts apply -n analytics -r Analytics-OnCall
}