Skip to content

Instantly share code, notes, and snippets.

View johnrichter's full-sized avatar
🐶

John Richter johnrichter

🐶
View GitHub Profile
@DD-ScottBeamish
DD-ScottBeamish / GetProcessByUser.py
Last active February 9, 2021 21:59
Windows - Get process CPU, Private Memory, and Virtual Memory for each user
from checks import AgentCheck
from datadog_checks.utils.subprocess_output import get_subprocess_output
class GetProcessByUser(AgentCheck):
def check(self, instance):
processes, err, retcode = get_subprocess_output(["powershell.exe", "Get-Process -IncludeUserName | where {$_.Username -notlike \"*NT AUTHORITY*\"} | where {$_.Username -notlike \"*SYSTEM*\"} | where {$_.Username -ne $null} | where {$_.Username -notlike \"*Window Manager*\"} | Select ProcessName,Username,CPU,PM,VM"], self.log, raise_on_empty_output=True)
# ProcessName : Code
# UserName : WIN-5OU1M45KDAQ\vagrant
# CPU : 14.28125
@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):