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 8, 2024 22:39
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:

@EtienneLem
EtienneLem / ajax_worker.js
Created June 10, 2013 19:40
Ajax Web Worker
var handleRequest = function(data) {
postMessage(data)
}
addEventListener('message', function(e) {
var xhr = new XMLHttpRequest
xhr.open('GET', e.data)
xhr.onreadystatechange = function(e) {
if (xhr.readyState === 4 && xhr.status === 200) {
handleRequest(xhr.responseText)
@bitonic
bitonic / configuration.nix
Last active May 8, 2024 22:38
NixOS configuration for a remote ZFS server on Hetzner
# Full NixOS configuration for a ZFS server with full disk encryption hosted on Hetzner.
# See <https://mazzo.li/posts/hetzner-zfs.html> for more information.
{ config, pkgs, ... }:
let
# Deployment-specific parameters -- you need to fill these in where the ... are
hostName = "...";
publicKey = "...";
# From `ls -lh /dev/disk/by-id`
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 8, 2024 22:38
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@notnotrobby
notnotrobby / cgp.md
Last active May 8, 2024 22:36
List of free resources to study computer graphics programming.
@msrose
msrose / combining-git-repositories.md
Last active May 8, 2024 22:35
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@0xOsprey
0xOsprey / raycastParseAndOpen.py
Created May 6, 2024 18:07
Raycast Python script for parsing clipboard and opening a link
#!/usr/bin/python3
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Parse and Open
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🔍
# @raycast.packageName Developer Util
@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active May 8, 2024 22:32 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->
@Aldaviva
Aldaviva / wmp_h.265_hevc.md
Last active May 8, 2024 22:30
Play H.265/HEVC videos in Windows Media Player (Classic) without a third-party codec pack or media player. Tested using Microsoft.HEVCVideoExtension_2.0.60091.0_x64__8wekyb3d8bbwe with WMP 12.0.20348.1311 on Windows Server 2022 21H2 and 12.0.22621.1105 on Windows 11 22H2.

Download

  1. Go to https://store.rg-adguard.net.
  2. Search for the HEVC Video Extensions from Device Manufacturer (Microsoft.HEVCVideoExtension) app by entering the following store URL.
    https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    
    • Do not use the normal HEVC Video Extensions app URL, because that can't play HEVC videos in Windows Media Player for some inscrutable reason.
  3. Download the x64 appx file, or whatever your Windows architecture is.
    • You may have to right click › Save Link As because the URL scheme is http, not https, if your browser is set to enforce HTTPS-only mode.
  • If it tries to save as a filename that's just a GUID, you may copy the correct .appx filename and save it as that instead.
@vanga
vanga / create-self-signed-certs.sh
Created September 8, 2022 14:41
Create self signed certificates using Elasticsearch util scripts
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.1-linux-x86_64.tar.gz
tar -zxf elasticsearch-8.4.1-linux-x86_64.tar.gz
cd elasticsearch-8.4.1/
./bin/elasticsearch-certutil ca --pem
unzip elastic-stack-ca.zip
./bin/elasticsearch-certutil cert --ca-cert ca/ca.crt --ca-key ca/ca.key --pem --name elk.example.com
unzip certificate-bundle.zip
cd ../