Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@teichopsia
teichopsia / SecurityAudit-expanded.txt
Created July 31, 2022 21:18 — forked from 0xdabbad00/SecurityAudit-expanded.txt
SecurityAudit IAM privileges expanded
acm:ListCertificates
application-autoscaling:DescribeScalableTargets
application-autoscaling:DescribeScalingActivities
application-autoscaling:DescribeScalingPolicies
application-autoscaling:DescribeScheduledActions
autoscaling:DescribeAccountLimits
autoscaling:DescribeAdjustmentTypes
autoscaling:DescribeAutoScalingGroups
autoscaling:DescribeAutoScalingInstances
autoscaling:DescribeAutoScalingNotificationTypes
@teichopsia
teichopsia / GitHub-Forking.md
Created November 8, 2020 12:16 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

// ==UserScript==
// @name Netflix minimal
// @description netflix minimal attract mode // disable attract sound and purge attract mode elements
// @namespace example.com
// @author kehlarn
// @homepageURL https://teichopsia.github.io/
// @version 1
// @match https://www.netflix.com/browse
// @grant none
// ==/UserScript==
after upgrading to pro this feature reset my registry to park cpus. in windows7 the attribute is masked from the gui by default it seems so unhide it then you can modify it in the gui. the relevant guid doesnt work in powercfg directly for some reason though.
powercfg -attributes 54533251-82be-4824-96c1-47b60b740d00 0cc5b647-c1df-4637-891a-dec35c318583 -ATTRIB_HIDE
in windows server 2016 you can hit it directly of course:
Powercfg -setacvalueindex scheme_current sub_processor CPMINCORES 100
Powercfg -setacvalueindex scheme_current sub_processor CPMINCORES 100
Powercfg -setactive scheme_current
@teichopsia
teichopsia / powercfg-win7-all-settings.bat
Created May 10, 2019 07:23 — forked from theultramage/powercfg-win7-all-settings.bat
Show/hide all hidden settings in Win7 Power Options
@echo off
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Harddisk settings
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 0b2d69d7-a2a1-449c-9680-f91c70521c60 %attrib%
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 dab60367-53fe-4fbc-825e-521d069d2456 %attrib%
REM Sleep transition settings
@teichopsia
teichopsia / 1.google-analytics-proxy-nginx.conf
Created July 28, 2018 01:09 — forked from paivaric/1.google-analytics-proxy-nginx.conf
Google Analytics Proxy using Nginx to bypass Adblock and other blockers
server {
listen 80;
server_name your.domain.com;
location = /analytics.js {
# you have to compile nginx with http://nginx.org/en/docs/http/ngx_http_sub_module.html (this is not default)
# and http://nginx.org/en/docs/http/ngx_http_proxy_module.html (it's a default module)
proxy_set_header Accept-Encoding "";
$ cat test.js
function foo () { while (true) { } }
function bar () { return foo(); }
bar();
$ node test.js &
$ gdb attach $(pidof node)
0x00000bf778c63d5f in ?? ()
(gdb) b v8::internal::Runtime_StackGuard
Breakpoint 1 at 0x84a1f0
(gdb) print 'v8::V8::TerminateExecution'(0)
@teichopsia
teichopsia / regex-trap
Last active August 29, 2015 14:21
[interview traps] how to properly scan a line of input for an ip address
if you have an interviewer ask this question and they want a regex. get up and walk out the door. These goonies probably still use tn-3270, cobol and ftp (cutting edge). they also have no idea what regexes are for; how to anchor them; nor how not to expose excessive backreferencing, backtracking and other nfa promotions. they also probably have production code you can regex bomb or worse lfi.
at best the regex is used to capture the result that gets passed to a primitive designed to detaint/parse. go read up on the GHOST attacks if you think these are easy to write securely.
the only correct answer to anybody using a dynamic language is to invoke your libc binding for standard posixish primitives. bypassing these basically means you're ignoring how getaddrinfo modern resolution primitives work on dual stacks and generally taking a piss on ipv6. welcome to the 90s kid ipv6 is real. you're decades behind already in your regex. I dare you to write a correct folding implementation of ipv6 in a regex. Welcome ba
@teichopsia
teichopsia / blender-keymap-dump.py
Last active December 11, 2015 15:18
dump all keymap bindings for blender 2.65. the word 'key' here is in the colloquial sense as there are keyboard, mouse, and other map binding types. it's really an event dispatch mapping that happens to cover keyboards and other sources.
#there may be a better way to find keybindings but until I do, this will have to suffice...
#likewise, until i figure out blender addons proper, this will need to be pasted to the python console
import operator
import bpy
import os
wm=bpy.context.window_manager
kmlut={