This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MoneyFormat = '$0.0a'; | |
const TimeFormat = '00:00:00'; | |
/** @param {import(".").NS } ns */ | |
export async function main(ns) { | |
/* | |
ns.hacknet-auto.script for Bitburner v0.47.2 | |
Winners don't use copyright | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%sh nc -vz DESTINATIONHOST 6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4WD 1 - 146.430 | |
4WD 2 - 146.460 | |
4WD 3 - 146.490 | |
4WD 4 - 146.580 | |
4WD 5 - 147.420 | |
4WD 6 - 147.450 | |
4WD 7 - 147.480 | |
4WD 8 - 147.540 | |
4WD 9 - 147.570 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --header "Host: xxx.cloudfront.net" http://xxx.AKL50-C2.cloudfront.net/ -iv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir tc | |
$files = Get-ChildItem * -include @("*.mp4", "*.mov") | |
foreach ($file in $files) { | |
$fileDate=(Get-Item $file).creationTime | |
$dateParts = $filedate -split " " | |
$fileParts = $file.Name -split "\." | |
$fbname = $fileParts[0] | |
$fext = $fileParts[1] | |
$ftime = $dateParts[1] | |
$fbase = $file.BaseName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSON.stringify(Game.market.getAllOrders(order => order.resourceType == RESOURCE_GHODIUM && order.type == ORDER_SELL && Game.market.calcTransactionCost(200, 'W12N64', order.roomName) < 500)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Digital Ocean monitoring tool | |
yum_repository 'digitalocean-agent' do | |
description 'DigitalOcean Agent' | |
baseurl 'https://repos.insights.digitalocean.com/yum/do-agent/$basearch' | |
repo_gpgcheck false | |
enabled true | |
gpgkey 'https://repos.insights.digitalocean.com/sonar-agent.asc' | |
sslverify true | |
sslcacert '/etc/pki/tls/certs/ca-bundle.crt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cloud Custodian uses dateutil.parser to read dates, so date fields can be anything handled by this. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kernel warning that appears to be related to Trend Micro / Deep Security Agent (dsa_agent). Correlates to a mass failure of Amazon Linux 2 ECS tasks. | |
Linux xxx 4.14.173-137.229.amzn2.x86_64 #1 SMP Wed Apr 1 18:06:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux | |
[ 641.849894] ------------[ cut here ]------------ | |
[ 641.852726] WARNING: CPU: 10 PID: 5454 at lib/vsprintf.c:2119 vsnprintf+0x2c1/0x4d0 | |
[ 641.857834] Modules linked in: veth xt_REDIRECT nf_nat_redirect xt_nat xt_tcpudp xfs bmhook(OE) tmhook(OE) dsa_filter(POE) dsa_filter_hook(OE) ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack libcrc32c br_netfilter bridge stp llc overlay crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd mousedev evdev glue_helper psmouse cryptd button sunrpc binfmt_misc ena ip_tables x_tables ext4 crc16 mbcache jbd2 fscrypto nvme crc32c_intel nvme_core ipv6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
𝑸: How can I sort an inner array of an object? How can I sort all the arrays in a JSON entity? How can I modify a deeply nested array? | |
A: If the path to the inner entity is known, one can use |= as illustrated here: | |
{"array": [3,1,2] } | |
| .array |= sort | |
To sort all arrays in a JSON entity, no matter where they occur, one option is to use walk/1: | |
walk( if type == "array" then sort else . end ) |
NewerOlder