Skip to content

Instantly share code, notes, and snippets.

View SXHRYU's full-sized avatar
🤡
I'm just a little jokester. A silly little guy.

Slava M. SXHRYU

🤡
I'm just a little jokester. A silly little guy.
View GitHub Profile
@vskrachkov
vskrachkov / pipe.py
Created January 13, 2020 22:01
python, pipe, chain, monad, functor
from typing import Callable, Union
class Pipe:
def __init__(self, callable_: Callable):
self.callable_ = callable_
def __rshift__(self, then: Union[Callable, "Pipe"]) -> "Pipe":
if not isinstance(then, Pipe):
then = Pipe(then)
@1kastner
1kastner / reflect.py
Last active April 3, 2024 13:52 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@nishantmodak
nishantmodak / nginx.conf.default
Last active February 29, 2024 13:48
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@jonashaag
jonashaag / 0-howto-listfield-django-admin.rst
Created September 7, 2011 09:41
Howto use ListFields in Django's admin

Howto use ListFields in Django's admin

Problem

Consider this blog post model:

models.py

: