Skip to content

Instantly share code, notes, and snippets.

View DarkSector's full-sized avatar
🎯
Focusing

Pronoy Chopra DarkSector

🎯
Focusing
View GitHub Profile
@DarkSector
DarkSector / cognito-change-password-challenge.py
Created February 20, 2022 07:59 — forked from tuliocasagrande/cognito-change-password-challenge.py
Responds to the new password challenge on Amazon Cognito
import boto3
def generate_password(length=16):
"""Generate a random alphanumeric password.
More recipes and best practices can be found here:
https://docs.python.org/3/library/secrets.html#recipes-and-best-practices.
Args:
@DarkSector
DarkSector / nato.json
Created August 7, 2020 06:10 — forked from zekesonxx/nato.json
NATO Phonetic Alphabet in JSON. Just in case someone needs it.
{
"A": "Alfa",
"B": "Bravo",
"C": "Charlie",
"D": "Delta",
"E": "Echo",
"F": "Foxtrot",
"G": "Golf",
"H": "Hotel",
"I": "India",
@DarkSector
DarkSector / Makefile
Created July 27, 2020 10:54 — forked from holachek/Makefile
AVR Tutorial Makefile
# Name: Makefile
# Author: <insert your name here>
# Copyright: <insert your copyright message here>
# License: <insert your license reference here>
# DEVICE ....... The AVR device you compile for
# CLOCK ........ Target AVR clock rate in Hertz
# OBJECTS ...... The object files created from your source files. This list is
# usually the same as the list of source files with suffix ".o".
# PROGRAMMER ... Options to avrdude which define the hardware you use for
@DarkSector
DarkSector / python_decorator_guide.md
Created May 19, 2020 22:07 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@DarkSector
DarkSector / unfollow-all.md
Created May 4, 2020 06:51 — forked from xeloader/unfollow-all.md
Unfollow everyone on LinkedIn

Unfollow everyone on Social Media

Unfollow everyone on LinkedIn

LinkedIn is even more clickbait than Facebook nowadays. Adios. 💣

Visit https://www.linkedin.com/feed/following/

Scroll down to load all of your contacts

Open developer console, run the following

@DarkSector
DarkSector / iterm2-solarized.md
Created April 12, 2020 08:02 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@DarkSector
DarkSector / The Technical Interview Cheat Sheet.md
Created March 20, 2018 19:06 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@DarkSector
DarkSector / celery.sh
Created July 23, 2017 08:04 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@DarkSector
DarkSector / massflash.py
Created July 21, 2017 07:04 — forked from geekman/massflash.py
automated ESP8266 programming station to mass flash large quantity of devices quickly
#!/usr/bin/env python
#
# automated ESP8266 programming station
# monitors for inserted serial devices and calls esptool to flash them
# written to mass flash entire batches of ESP8266 devices quickly
# $ pip install esptool pyudev
#
# 2016.06.16 darell tan
#
@DarkSector
DarkSector / middleware.py
Created June 29, 2017 08:28 — forked from antonagestam/middleware.py
JSONRequestMiddleware
import json
from .utils import copy_body
class JSONRequest(dict):
def __init__(self, request):
try:
data = json.loads(copy_body(request))
self.is_valid = True