Skip to content

Instantly share code, notes, and snippets.

@mbrownnycnyc
mbrownnycnyc / piano_training_month_1.ipynb
Last active February 15, 2025 16:21
piano_training_month_1.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mbrownnycnyc
mbrownnycnyc / midi_training_scales.ipynb
Last active February 10, 2025 13:17
chatgpt generated: "can you generate midi files i can use to train with the piano that cover each major scale solo? provide me code to execute in google collab. correct the above to download multiple files, one per scale and one per solo. Allow me to download them as a zip."
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mbrownnycnyc
mbrownnycnyc / android_docker.md
Last active November 29, 2024 20:26
Using android in docker to router notifications

summary

The purpose of this document is to capture the configuration and setup to run Android on docker on a synology NAS. The purpose of running android is to capture and route notifications via MQTT.

  • this is still not done

precursor

  • I assume you've set up internet access to a VLAN presented to your docker network.
  • VLAN 10, which carries subnet 192.168.10.0/24, is our target VLAN.
@mbrownnycnyc
mbrownnycnyc / notebooklm.md
Last active November 26, 2024 12:50
notebooklm guidelines

Audio overview prompts

  • Be serious in your delivery.
  • Do not be jovial or excessively friendly with each other. And do not interject with casual items like "uh huh", "yea", "right", "okay". Just cut that completely out.
  • Do not repeat items between speakers.
  • Do not split sentences between speakers. Do NOT ignore this instruction.
  • Be critical of the sources and form your own opinions, but identify them as your own.
  • Dispute one point is a ridiculous fashion, but when you banter about it for about 30 seconds, have both of you identify the item as ridiculous.
@mbrownnycnyc
mbrownnycnyc / youtube.md
Last active April 9, 2024 12:12
youtube channels that are worth watching. I would be disappointed if they stopped putting out content. (note that I specifically am not posting anything related to software development, cybersec or AI)

travel/cultures/experiences/self help/philosophy

@mbrownnycnyc
mbrownnycnyc / generate-att&ckjson.ps1
Created February 8, 2023 21:22
quick way to produce att&ck navigator layers
#baseline_layer.json is exported layer from the navigator... there certainly is a way to create the json from scratch reviewing specs, but it was very fsat to just do this.
$sourcefile = ".attack nav layers\baseline_layer.json"
$offtechoutfile = ".\attack nav layers\offensive_techs.json"
$deftechoutfile = ".\attack nav layers\defensive_techs.json"
#goal here is to:
# define two att&ck navigator layer json files
# one is for offensive techniques
@mbrownnycnyc
mbrownnycnyc / modify-attackjson.ps1
Last active January 12, 2023 00:22
modify an att&ck navigator json
$orcacomplianceframework = @"
Collection - Automated Collection - T1119
Collection - Data from Cloud Storage - T1530
Collection - Data from Information Repositories - T1213
Collection - Data Staged - T1074
Collection - Email Collection - T1114
Credential Access - Brute Force - T1110
Credential Access - Forge Web Credentials - T1606
Credential Access - Modify Authentication Process - T1556
Credential Access - Multi-Factor Authentication Request Generation - T1621
@mbrownnycnyc
mbrownnycnyc / get-chokepointtechniques.ps1
Last active January 19, 2023 19:08
Process ATT&CK and D3FEND data to indicate likelihood an ATT&CK technique is a choke point as defined in this article (https://medium.com/mitre-engenuity/where-to-begin-prioritizing-att-ck-techniques-c535b50983f4). This theory considers the following conjecture: MITRE will assign research hours to align with prioritization of offensive technique…
# summary:
# Process ATT&CK and D3FEND data to indicate likelihood an ATT&CK technique is a choke point as defined in this article (https://medium.com/mitre-engenuity/where-to-begin-prioritizing-att-ck-techniques-c535b50983f4). This theory considers the following conjecture: MITRE will assign research hours to align with prioritization of offensive technique (resulting severity, frequency of observation, etc). This theory considers the following facts: ATT&CK procedure examples are well documented, D3FEND offensive blast radius is well documented.
# Remember to see "Limitations and future work" section of the above blog post/article.
# also see "BIASES WHEN MAPPING TO MITRE ATT&CK" section of (https://www.cisa.gov/uscert/sites/default/files/publications/Best%20Practices%20for%20MITRE%20ATTCK%20Mapping.pdf)
# this covers the following biases: Novelty bias, Visibility bias, Producer bias, Victim bias, Availability bias...
# you won't ever be able to eliminate these, either within yourself, on your team, o
@mbrownnycnyc
mbrownnycnyc / foreach-concurrentdict.ps1
Last active December 21, 2022 14:17
Thread safe disctionary and using -parallel switch with foreach in powershell
# summary of code covered here: https://isc.sans.edu/diary/Port%20Scanning%20in%20Powershell%20Redux%3A%20Speeding%20Up%20the%20Results%20%28challenge%20accepted!%29/29324
$gkeclusters = [System.Collections.Concurrent.ConcurrentDictionary[string,object]]::new()
$gcpprojects.projectId | % -ThrottleLimit 10 -Parallel {
write-host "checking $($_)"
$dict = $using:gkeclusters
$dict.TryAdd($(gcloud container clusters list --project $_ --format json), $_) | out-null
}