Skip to content

Instantly share code, notes, and snippets.

View darthShadow's full-sized avatar
💭
I may be slow to respond.

Anagh Kumar Baranwal darthShadow

💭
I may be slow to respond.
  • Lavelle Networks
  • Bangalore, India
  • 21:14 (UTC +05:30)
View GitHub Profile
@DavidBuchanan314
DavidBuchanan314 / widevine_fixup.py
Last active July 9, 2024 05:13
Patch aarch64 widevine blobs from ChromeOS to work on non-ChromeOS linux, including platforms with 16K page size like Apple Silicon / Asahi Linux
"""
MIT License
Copyright (c) 2023 David Buchanan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@JonnyWong16
JonnyWong16 / plexAPIPerformanceTest.py
Last active August 23, 2021 05:35
Test Plex API performance
from plexapi.server import PlexServer
import time
SERVER_URL = 'http://localhost:32400'
SERVER_TOKEN = 'xxxxxxxxxxxxxxxxxxxx'
LIBRARY_NAME = 'Movies'
plex = PlexServer(SERVER_URL, token=SERVER_TOKEN)
movies = plex.library.section(LIBRARY_NAME)
totalItems = movies.totalSize
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UnifiedBar</key>
<dict>
<key>DisclosureRequired</key>
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string>
<key>Enabled</key>
<false/>
--- openssl-1.0.2u/Configure 2019-12-20 14:02:41.000000000 +0100
+++ openssl-1.0.2u/Configure 2020-11-22 16:23:13.000000000 +0100
@@ -650,7 +650,9 @@
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:".eval{my $asm=$x86_asm;$asm=~s/cast\-586\.o//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(
@FHRNet
FHRNet / lambda_function.py
Created January 4, 2020 20:42
HetrixTools - Make Twilio calls through webhooks with AWS Lambda
#
# This microservice links HetrixTools and Twilio together through webhooks.
# If HetrixTools detects downtime, this microservice is called, which calls your phone/SIP number
# and announces which monitor detected an issue using TTS.
#
# GET Parameters:
# - token = Must match SecretKey
# - repeat = How many times should the message be repeated (optional, default 2)
# - to = Which number / SIP destination to call
#
@robertbaker
robertbaker / .env
Last active March 26, 2021 08:34
Traefik 2.0 example config with google forward-auth
UID=1000
TLD=mydomain.com
# ACME
ACME_EMAIL=admin@mydomain.com
CLOUDFLARE_EMAIL=admin@mydomain.com
CLOUDFLARE_API_KEY=xxxx
# OAUTH
OAUTH_CLIENT_ID=xxxx
@fryfrog
fryfrog / Android-SHIELD Android TV.xml
Last active November 8, 2022 18:31
A customized Plex profile for the Nvidia Shield, which goes in ./Library/Application Support/Plex Media Server/Profiles/
<!-- Put in ./Library/Application Support/Plex Media Server/Profiles/Android-SHIELD Android TV.xml -->
<!-- Author: Donald Webster fryfrog@gmail.com -->
<?xml version="1.0" encoding="utf-8"?>
<Client name="SHIELD Android TV">
<Identification>
<Header name="User-Agent" substring="SHIELD Android TV" />
</Identification>
<TranscodeTargets>
<VideoProfile container="mkv" codec="h264" audioCodec="aac" context="streaming" />
<MusicProfile container="flac" codec="flac" id="StereoMusicTranscodeProfile" />
#!/usr/bin/env python3
'''
calisuck: index, filter-out smartly and download ebooks from Calibre open directories
Installation:
You need python 3.5 installed
Download the file as a zip and unzip-it and get into the dir
@e00E
e00E / airvpn.md
Last active October 3, 2023 20:28
Why does a client connected to the AirVPN vpn service prefer IPv4 over IPv6 addresses?
@smammy
smammy / macOS-IPv6-Tunnel-DNS-HOWTO.md
Created December 13, 2018 19:14
How to convince macOS to do IPv6 DNS lookups when your only IPv6 address is via a VPN or tunnel of some sort

This was a huge hassle to figure out, so I wrote up a little guide in hopes that others would find it helpful:

How to convince macOS to do IPv6 DNS lookups when your only IPv6 address is via a VPN or tunnel of some sort

The Problem

macOS's domain name resolver will only return IPv6 addresses (from AAAA records) when it thinks that you have a valid routable IPv6 address. For physical interfaces like Ethernet or Wi-Fi it's enough to set or be assigned an IPv6 address, but for tunnels (such as those using utun interfaces) there are some extra annoying steps that need to be taken to convince the system that yes, you indeed have an IPv6 address, and yes, you'd like to get IPv6 addresses back for DNS lookups.

I use wg-quick to establish a WireGuard tunnel between my laptop and a Linode virtual server. WireGuard uses a utun user-space tunnel device to make the connection. Here's how that device gets configured: