Skip to content

Instantly share code, notes, and snippets.

View scottzach1's full-sized avatar
💭
🐧

Zac Scott scottzach1

💭
🐧
View GitHub Profile
@dlqqq
dlqqq / ryzen_bug.md
Last active February 22, 2024 22:22 — forked from wmealing/C-states.md
AMD Ryzen "Freezing" Bug on GNU/Linux Systems

Random "Freezing" with AMD Ryzen CPUs

It seems that numerous GNU/Linux users (including myself) have been having issues with the system randomly "freezing" during light usage. From journalctl output and anecdotal accounts, it is speculated that the AMD Ryzen CPUs do not support other C-states for power management very well (at least on GNU/Linux distributions), and the freezing may be resolved by limiting the C-state of the CPU.

Possible Solution

Limiting the C-state of the CPU can be done through the addition of the following kernel boot parameter.

processor.max_cstate=1
def docx_replace(doc, data):
paragraphs = list(doc.paragraphs)
for t in doc.tables:
for row in t.rows:
for cell in row.cells:
for paragraph in cell.paragraphs:
paragraphs.append(paragraph)
for p in paragraphs:
for key, val in data.items():
key_name = '${{{}}}'.format(key) # use placeholders in the form ${PlaceholderName}
@ag-michael
ag-michael / FalconHuntqueries.md
Last active November 23, 2023 12:02
Falcon hunt queries

timestamp convert:


 convert ctime(timestamp/1000)

.top,.club,.xyz,.ru domain lookups where the amount of lookup for the domain is more than 1 and less than 4 per computer


aid=* event_simpleName=DnsRequest | regex DomainName=".*\.top$|.*\.club$|.*\.xyz$|.*\.ru$|[0-9]+.*\.\w$" | stats values(ComputerName) count by DomainName| where count <4 | sort – count
@claudiobizzotto
claudiobizzotto / downgrade-vbox-guest-additions.md
Last active November 3, 2022 07:39
Virtual Box conflicting guest additions ("Got different reports about installed GuestAdditions version") - Ubuntu 16.04

Downgrade Virtualbox guest additions in your virtual machine (Ubuntu 16.04)

Make sure your VM is running and ssh into it. From there, run the contents of downgrade-vbox-guest-additions.sh below.

Stop vagrant-vbguest automatic updates

From your host machine, if you have the vagrant-vbguest plugin installed, make sure you deactivate it for this specific VM. To do that, set auto_update to false in your Vagrantfile:

config.vbguest.auto_update = false
@nipunsadvilkar
nipunsadvilkar / Different_style_guide_python.md
Last active March 20, 2024 22:39
What is the standard Python docstring format?

Formats

Python docstrings can be written following several formats as the other posts showed. However the default Sphinx docstring format was not mentioned and is based on reStructuredText (reST). You can get some information about the main formats in that tuto.

Note that the reST is recommended by the PEP 287

There follows the main used formats for docstrings.

- Epytext

@cobyism
cobyism / gh-pages-deploy.md
Last active May 23, 2024 10:55
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).