Skip to content

Instantly share code, notes, and snippets.

View grawity's full-sized avatar

Mantas Mikulėnas grawity

View GitHub Profile
@13xforever
13xforever / windows terminal colors.json
Last active February 3, 2023 14:08
Windows Terminal color schemes, put this in the appropriate section of your profile.json
{
"name": "Ayu Mirage",
"background": "#1f2430",
"foreground": "#cbccc6",
"black": "#191e2a",
"red": "#ed8274",
"green": "#a6cc70",
"yellow": "#fad07b",
"blue": "#6dcbfa",
"purple": "#cfbafa",
@xpn
xpn / LAPSDecrypt.cs
Last active October 26, 2023 01:43
Quick POC looking at how encryption works for LAPS (v2)
using System;
using System.Collections.Generic;
using System.DirectoryServices.Protocols;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
@jborean93
jborean93 / Trace-TlsHandshake.ps1
Last active December 7, 2023 14:49
Debug TLS Handshakes using .NET
# Copyright: (c) 2022, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Trace-TlsHandshake {
<#
.SYNOPSIS
TLS Handshake Diagnostics.
.DESCRIPTION
Performs a TLS handshake and returns diagnostic information about that
@ohsix
ohsix / perf.md
Last active December 29, 2023 22:52
stuff I should write down: perf

Intro

perf is very handy, it comes with linux and works without a lot of setup (contrast: oprofile, systemtap)

probes work for kernel and userspace and you can record function arguments and local frame and other variables in the trace

you can use perf script to view the output of such traces, and it will display the variables bundled with the trace, by name, and with the format given when the probe was added

Context

recently someone was asked to record what happened in systemd at source_dispatch, in sd-event; to see what the value of s->description was at the time, they were advised to use gdb

function Get-RdpLogonEvent
{
[CmdletBinding()]
param(
[Int32] $Last = 10
)
$RdpInteractiveLogons = Get-WinEvent -FilterHashtable @{
LogName='Security'
ProviderName='Microsoft-Windows-Security-Auditing'
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@p01
p01 / LICENSE.txt
Last active March 9, 2024 13:40 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Juul
Juul / lte_mbim_from_scratch.md
Last active March 29, 2024 03:06
How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM

The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.

This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.

High level overview

These are the steps required:

  • Physically connect antennas
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active April 25, 2024 17:28
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.