Skip to content

Instantly share code, notes, and snippets.

@bighunter513
bighunter513 / Blog: Installing Docker.md
Created March 3, 2023 11:27 — forked from Jaykul/Blog: Installing Docker.md
Docker in PowerShell on Windows 10

Using Docker on Windows 10 (Updated at the end of 2019)

Since I wrote this originally, Docker on Windows has become a first-class supported tool, with a Windows Installer and well-documented installation processes from docker and from Microsoft.

Today, I actually install docker using boxstarter scripts where I can Enable-WindowsOptionalFeature -Online -FeatureName containers -All and then choco upgrade -y docker-desktop as well as installing tooling for VS Code code --install-extension "ms-azuretools.vscode-docker".

I've left the rest of these notes here as a historical record, more than anything else. You should not expect the script below to work, but you certainly don

@bighunter513
bighunter513 / j2p
Created May 9, 2019 06:16 — forked from wweir/j2p
json to protobuf definition transfer tool
#!/usr/bin/env php
<?php
if ($argc == 1) {
$data = fgets(STDIN);
} else {
$file = fopen($argv[1], 'r') or die('read file ' . $argv[1] . ' fail');
$data = fread($file, filesize($argv[1]));
}
@bighunter513
bighunter513 / escape_uri.erl
Created April 19, 2017 02:58 — forked from vans163/escape_uri.erl
Erlang escape uri for POST request
%escape uri
escape_uri(S) when is_list(S) ->
escape_uri(unicode:characters_to_binary(S));
escape_uri(<<C:8, Cs/binary>>) when C >= $a, C =< $z ->
[C] ++ escape_uri(Cs);
escape_uri(<<C:8, Cs/binary>>) when C >= $A, C =< $Z ->
[C] ++ escape_uri(Cs);
escape_uri(<<C:8, Cs/binary>>) when C >= $0, C =< $9 ->
[C] ++ escape_uri(Cs);
escape_uri(<<C:8, Cs/binary>>) when C == $. ->