This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# This script is meant to be used as a `credential_process` in an `~/.aws/config` file, | |
# and triggers an AWS SSO Login flow when necessary then assumes a pre-configured `role_arn`. | |
# This is useful for example to magically render compatible certain generative AI applications which | |
# expect being provided a single valid AWS profile, and cannot by themselves perform the SSO flow required | |
# to make the profile valid. | |
# | |
# - Create a virtual env: `python3 venv -m .venv && source ./.venv/bin/activate | |
# - Install the dependencies: `pip3 install pyinstaller boto3 portalocker` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tracks the origin of net_udp_rcvbuferrors, printing socket metadata associated with the packet drops. | |
// | |
// usage: bpftrace trace_udp_rcvbuferrors.bt | |
// sample output: | |
// 12:32:25 iperf3/3391 ::ffff:192.168.60.3:5201 -> ::ffff:192.168.60.1:50512 retval=-1 dropped=23809 qlen=36 qsize/qmaxsize=213248/212992 bytes | |
kprobe:udp_queue_rcv_skb | |
{ | |
$sock = (struct sock *)arg0; | |
if ($sock->sk_type != SOCK_DGRAM || ($sock->__sk_common.skc_family != AF_INET && $sock->__sk_common.skc_family != AF_INET6)) { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Client name="iOS"> | |
<!-- | |
Description: Allows sync'ing / downloading any PleX content, including 4K HVEC HDR10 content, to the iPad Pro 12.9 with M1 chip. | |
Author: Quentin Machu (https://github.com/Quentin-M) | |
Disclaimer: There might be a few combinations of unplayable content as I haven't tested rigorously, but that ain't my goal today. | |
Instructions: Replace iOS.xml in /usr/lib/plexmediaserver/Resources/Profiles/ (or use /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Profiles), profit $$$ while the battery lasts (if it does). | |
--> | |
<Settings> | |
<Setting name="DirectPlayStreamSelection" value="true" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# tcpretrans - show TCP retransmts, with address and other details. | |
# Written using Linux ftrace. | |
# | |
# This traces TCP retransmits, showing address, port, and TCP state information, | |
# and sometimes the PID (although usually not, since retransmits are usually | |
# sent by the kernel on timeouts). To keep overhead low, only | |
# tcp_retransmit_skb() calls are traced (this does not trace every packet). | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import zlib | |
import re | |
import argparse | |
import os | |
import glob | |
import locale | |
from json import JSONDecoder, JSONDecodeError | |
import aws_encryption_sdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
import botocore.session | |
import botocore.awsrequest | |
# Arguments | |
parser = argparse.ArgumentParser( | |
description= | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
REGION=eu-west-1 | |
DB_INSTANCE= | |
USE_CSV=0 | |
START_DATE=`gdate -u +'%Y-%m-%d'` | |
END_DATE=`gdate -u +'%Y-%m-%d' --date 'tomorrow'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"context" | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
crand "crypto/rand" | |
"crypto/tls" | |
"crypto/x509" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"reflect" | |
"time" | |
"unsafe" | |
"gopkg.in/yaml.v2" | |
) |
NewerOlder