Skip to content

Instantly share code, notes, and snippets.

View lazerl0rd's full-sized avatar
🌐
Handing DNS so you don't have to.

Diab Neiroukh lazerl0rd

🌐
Handing DNS so you don't have to.
View GitHub Profile
@erfanoabdi
erfanoabdi / compatibility_matrix_checker.py
Last active March 30, 2023 05:26
kernel defconfig compatibility matrix checker script
import xml.etree.ElementTree as ET
# Parse the compatibility matrix XML
compatibility_matrix = ET.parse('<path to compatibility_matrix xml>')
# Extract the kernel version and required configs from the XML
kernel_version = '4.19.191'
required_configs = []
for kernel in compatibility_matrix.findall('.//kernel'):
if kernel.attrib['version'] == kernel_version:
@spenserhale
spenserhale / git-batch-push.sh
Last active May 15, 2024 06:44
When your repo exceeds upload limit (GitHub 2GB), you can push in batches so you can store up to total size limit. (100GB) (Warning uses force push, ideally should be used for setting up new remote, once)
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=250
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
@mavaddat
mavaddat / Invoke-DownloadAppxPackage.ps1
Last active October 12, 2023 17:00
This correctly downloads neutral and x64 packages but untested for arm and 32bit systems. The path must point to a folder.
# Usage (for one URI):
<#
Import-Module -Name Invoke-DownloadAppxPackage.ps1
$URI = 'https://www.microsoft.com/store/productId/9P6RC76MSMMJ' # From Windows Store 'share'
if( Get-Command -Name Get-AppxPackageDownload -CommandType Function ) {
Get-AppxPackageDownload -Uri $URI -Path $env:TEMP # Use -Force to skip confirmation
} else {
Write-Host 'Get-AppxPackageDownload function not found'
}

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@seyoon20087
seyoon20087 / Activate Office 2019 for macOS VoL.md
Last active August 18, 2022 07:43 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
Activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@marcan
marcan / m1cat.c
Last active October 26, 2023 15:42
m1cat: a PoC for the M1RACLES covert channel vulnerability in the Apple M1
/*
* m1cat: a proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program implements a covert channel that can be used to transmit data
* between two processes when run on the Apple Silicon "M1" CPUs.
*
* The channel is slightly lossy due to (presumably) the scheduler sometimes
* scheduling us on the wrong CPU cluster, so this PoC sends every byte twice
* together with some metadata/framing bits, which is usually good enough.
* A better approach would be to use proper FEC or something like that.
@marcan
marcan / asm.py
Created December 22, 2018 10:07
Python module to assemble snippets of code
#!/usr/bin/env python
import os, tempfile, shutil, subprocess
class AsmException(Exception):
pass
class BaseAsm(object):
def __init__(self, source, addr = 0):
self.source = source
self._tmp = tempfile.mkdtemp() + os.sep
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 21, 2024 06:25
crack activate Office on mac with license file
@marcan
marcan / bloom.py
Last active February 29, 2024 19:55
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
#!/usr/bin/python3
#
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
# Licensed under the terms of the MIT license
#
# Written to be used with the Have I been pwned? password list:
# https://haveibeenpwned.com/passwords
#
# Download the pre-computed filter here (968MB, k=11, false positive p=0.0005):
@raspi
raspi / windows-advanced-power-settings-to-markdown.ps1
Created June 14, 2017 22:10
List Windows advanced power settings as MarkDown
# List Windows advanced power settings as MarkDown
# Use:
# this-script.ps1 | Out-File power.md
# Use powercfg to show hidden settings:
# powercfg -attributes <Group GUID> <GUID> -ATTRIB_HIDE
# example:
# powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 06cadf0e-64ed-448a-8927-ce7bf90eb35d -ATTRIB_HIDE
# (c) Pekka "raspi" Järvinen 2017-
$powerSettingSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingSubgroup | Where-Object {$_.ElementName -ne $null}