Skip to content

Instantly share code, notes, and snippets.

View hdformat's full-sized avatar

EJ Lee hdformat

View GitHub Profile
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
@hdformat
hdformat / pwsh_w_py.md
Last active February 22, 2021 03:29
PowerShell with Python
PS > $exp = "python -c `"import json, datetime; print(json.dumps({'date': datetime.datetime.now().strftime('%Y%m%d')}))`""

PS > Invoke-Expression $exp | % { convertfrom-json $_ }
date
----
20210222

PS >
@hdformat
hdformat / termux_ssh.md
Last active January 22, 2021 06:21
Termux SSH

install openssh

$ pkg install openssh

run sshd (default port is 8033 not 22)

$ sshd
@hdformat
hdformat / pwsh_cron_in_mac_osx.md
Last active October 10, 2020 04:52
How to make scheduled Powershell scripts on Mac OS X

create a script named greet.ps1

$ vi greet.ps1
#/usr/bin/env pwsh
write-host "🤡"