Skip to content

Instantly share code, notes, and snippets.

View joshschmelzle's full-sized avatar
👻
༼ つ ◕_◕ ༽つ🛜

jsz joshschmelzle

👻
༼ つ ◕_◕ ༽つ🛜
View GitHub Profile
@joshschmelzle
joshschmelzle / wireshark-notes-and-cheatsheet.md
Last active February 28, 2020 19:02
wireshark-notes-and-cheatsheet.md

Display Filters

Wildcards

wlan.vs.aruba.ap_name ~ "name."
wlan.vs.aruba.ap_name matches "name."

Multicast

@joshschmelzle
joshschmelzle / windows-notes-and-cheatsheet.md
Created October 18, 2019 13:18
windows-notes-and-cheatsheet.md

Networking

802.11

netsh wlan show interfaces
netsh wlan show wirelesscapabilities
netsh wlan show networks
netsh wlan show drivers
netsh wlan show interface
@joshschmelzle
joshschmelzle / linux-notes-and-cheatsheet.md
Last active November 18, 2022 01:42
linux notes and cheatsheet
@joshschmelzle
joshschmelzle / jemail.py
Last active October 18, 2019 03:46
python send electronic mail example
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
jemail.py
~~~~~~~~~
a script for learning about sending email with Python
"""
@joshschmelzle
joshschmelzle / graphql-requests-example.py
Created October 7, 2019 00:17
Example GraphQL client query using Python and Requests
import requests
url = "https://GRAPHQL-ENDPOINT/graphql"
headers = {"api-token": "TOKEN HERE"}
def run_query(url, query, headers) -> dict:
""" Run query and return result. """
request = requests.post(url=url, json={"query": query}, headers=headers)
if request.status_code == 200:
@joshschmelzle
joshschmelzle / center-align-values-example.py
Created September 12, 2019 03:12
Center align values on a specific character with Python
def at_aligned(seq):
snums = [str(n) for n in seq]
ats = [len(s.split('@', 1)[0]) for s in snums]
m = max(ats)
return [' '*(m - d) + s for s, d in zip(snums, ats)]
channelInfo = ["36@160",
"1@20",
"161@40",
"161@40",
@joshschmelzle
joshschmelzle / sayings.md
Last active May 18, 2020 23:40
random tech/code aphorisms/sayings/philosophy

Groups of words I've come across that have helped me in one way or another (these are not mine)

Failure

  • Failure is not falling down, failure is not getting back up
  • Action will always win. Even in failure

Design

@joshschmelzle
joshschmelzle / powershell-cmd-reference.md
Last active December 20, 2019 19:53
PowerShell Command Reference

Get Event Log messages specific to netwtwXX errors

Get-EventLog System -Newest 10 -EntryType error -Source 'netw*' | Select Index, TimeGenerated, Source, EventID, InstanceID, Message | Format-Table -wrap  

 Index TimeGenerated        Source   EventID InstanceId Message
 ----- -------------        ------   ------- ---------- -------
124567 12/2/2019 6:26:10 AM Netwtw08    5005 3221230477 Intel(R) Wi-Fi 6 AX200 160MHz : Has encountered an internal error and has failed.
124566 12/2/2019 6:26:10 AM Netwtw08    5002 3221230474 Intel(R) Wi-Fi 6 AX200 160MHz : Has determined that the network adapter is not functioning properly.
124565 12/2/2019 6:26:10 AM Netwtw08 5005 3221230477 Intel(R) Wi-Fi 6 AX200 160MHz : Has encountered an internal error and has failed.
@joshschmelzle
joshschmelzle / learn-code.md
Last active July 8, 2019 12:59
One approach that might help someone start learning code. I created this for a friend. Please suggest updates or comment if you like!

before first things first (with code/tech in mind)

  • What do you want to learn?
  • Why do you want to code? Check out Start with Why by Simon Sinek. Video, Book
  • What interests you?
  • What excites you?
  • What problems are you trying to solve?

Try letting your answers to these questions guide what technologies you learn. Also ponder on this from @js_tut:

@joshschmelzle
joshschmelzle / netsh_quality_to_rssi_example.py
Last active June 29, 2019 02:36
Convert Signal Quality to RSSI using Python (short version)
"""
- there are known issues with this approach.
- consider that this does not force the driver to refresh it's RSSI reading.
- if you want to monitor RSSI, you need to use the wlanapi.
"""
import subprocess
command = ['netsh', 'wlan', 'show', 'interface']
out = subprocess.check_output(command)
out = out.decode("utf-8").lower()