Skip to content

Instantly share code, notes, and snippets.

@michaelkarrer81
michaelkarrer81 / diff_freeze.py
Created November 2, 2018 18:34 — forked from qgerome/diff_freeze.py
How to compare or diff 2 pip freeze or 2 requirements.txt in Python
"""
pip install click
"""
import click
import itertools
@michaelkarrer81
michaelkarrer81 / cors.nginxconf
Created March 18, 2019 07:57 — forked from pauloricardomg/cors.nginxconf
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
@michaelkarrer81
michaelkarrer81 / remote_dev.py
Created March 23, 2020 14:12 — forked from ilyasProgrammer/remote_dev.py
Remote Debug Odoo in Pycharm Prof
On your remote server, run: pip install cython pydevd
IMPORTANT: Make sure that your computer is visible to server's IP by pinging your computer's IP
AND make port forwarding if necessary
Create debug folder localy using same path as on remote server. Necessary for correct break points work.
Connect remote content for debug:
sshfs bar:/srv/odoo /srv/odoo/
Use this path for mapping.
On your computer, configure a Python Remote Debug in run configurations.
@michaelkarrer81
michaelkarrer81 / img_utils.python
Created May 26, 2021 08:30 — forked from dangtrinhnt/img_utils.python
Autorotate and autoresize images in mass with Python and PIL
#!/usr/bin/env python
"""
File: autorotate.py
Origial Author: Damien Riquet <[email protected]>
Current Maintainer: Trinh Nguyen <dangtrinhnt[at]gmail[dot]com>
Description: This script provides an auto-rotate feature of pictures
USAGE: autorotate.py [-h] [--recursive] directory [directory ...]
positional arguments: