Skip to content

Instantly share code, notes, and snippets.

View datvm's full-sized avatar
✝️
✞ Jesus Saves ✞

Luke Vo datvm

✝️
✞ Jesus Saves ✞
View GitHub Profile
@datvm
datvm / ConnectAdbWireless.MD
Last active December 27, 2022 04:18
Commands for connecting to Android phone over Wifi (Wireless Debugging) with ADB

Setup the Phone

To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version:

Android 9 (API level 28) and higher: Settings > About Phone > Build Number

  • Enable Wireless Debugging: Settings > search Wireless Debugging.
@datvm
datvm / PowerPointPNGRenamer.js
Created January 11, 2020 16:01
A NodeJS script to rename output PNG files by PowerPoint so they can be sorted by file name
const readline = require("readline");
const fs = require("fs");
const path = require("path");
class Renamer {
input() {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
@datvm
datvm / Create unencrypted CRT and KEY from PFX.MD
Created March 4, 2019 10:30
Create (no password/unencrypted) CRT and KEY certificates from PFX

Sometimes you may need an unencrypted pair for your certificate (in my case, I need it for Docker Registry).

You can use OpenSSL to generate one. You will need:

  • OpenSSL (if you use Windows, you can get OpenSSL for Windows)
  • A certificate in PFX format inputfile.pfx (you can convert from other formats using OpenSSL too). You will of course need its password. It is useless if you do not have it, just throw that file away.

Create (encrypted) key file:

First, you need to create a key file using the following command:

@datvm
datvm / Enable Async Main.MD
Last active August 21, 2018 04:29
Using async Task for entry Main method in C# (Enable C# 7.1 in Visual Studio Build)

The C# async/await syntax is very useful. However, even as of current latest major C# version 7.0, your program entry point has to use Wait() or similar methods if you need an async method.

This is solved in C# 7.1 (and with many other useful features). However, by default, Visual Studio 2017 uses latest MAJOR version (x.0). You need to change it into specific version, or latest MINOR version in order for the new features to be built successfully. And here's how:

Screenshot

  • Navigate menu Project Properties...

  • Build tab → Advanced...