Skip to content

Instantly share code, notes, and snippets.

View DarkSector's full-sized avatar
🎯
Focusing

Pronoy Chopra DarkSector

🎯
Focusing
View GitHub Profile
@armenr
armenr / cdn-cloudformation-template.yml
Created May 20, 2021 18:24
CloudFormation Template for Amplify Custom Resource (S3 + CDN w/out hosting)
AWSTemplateFormatVersion: "2010-09-09"
# revisit this: https://github.com/aws-amplify/amplify-cli/issues/3240#issuecomment-623080190
Parameters:
env:
Type: String
Description: The environment name. e.g. Dev, Test, or Production.
Default: NONE
authRoleName:
Type: String
Description: Name of authRole
@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
@zekesonxx
zekesonxx / nato.json
Created September 16, 2015 00:13
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",
@Zearin
Zearin / python_decorator_guide.md
Last active July 18, 2024 00:10
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].

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active July 20, 2024 16:44
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.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@willurd
willurd / web-servers.md
Last active July 23, 2024 17:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@baliw
baliw / mlnotifications.py
Created November 5, 2012 21:53
Mountain Lion Notification Center via Python
import Foundation
import objc
import AppKit
import sys
NSUserNotification = objc.lookUpClass('NSUserNotification')
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}):
notification = NSUserNotification.alloc().init()
@holachek
holachek / Makefile
Created August 9, 2012 14:53
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