Skip to content

Instantly share code, notes, and snippets.

View Green-m's full-sized avatar
🎯
Focusing

Green-m Green-m

🎯
Focusing
View GitHub Profile
filter Get-PEFeature {
<#
.SYNOPSIS
Retrieves key features from PE files that can be used to build detections.
.DESCRIPTION
Get-PEFeature extracts key features of PE files that are relevant to building detections.
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 24, 2025 19:54
crack activate Office on mac with license file
@arturmkrtchyan
arturmkrtchyan / get_job_status.sh
Last active October 22, 2024 05:45
Apache Spark Hidden REST API
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000
@nerdroychan
nerdroychan / No Baidu
Last active December 17, 2020 03:00
A hosts file to block all .baidu.com domains.
##
# Block Baidu
##
127.0.0.1 baidu.com
127.0.0.1 www.baidu.com
127.0.0.1 pan.baidu.com
127.0.0.1 post-js.baidu.com
127.0.0.1 bbs.baidu.com
127.0.0.1 tieba.baidu.com
127.0.0.1 wapp.baidu.com
@adam-p
adam-p / Local PR test and merge.md
Last active April 1, 2025 20:23
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37