Skip to content

Instantly share code, notes, and snippets.

View thedrow's full-sized avatar
🤩
Working on Celery 5.3

Omer Katz thedrow

🤩
Working on Celery 5.3
View GitHub Profile
PS C:\Users\Omer\vagrant\development environment> vagrant up puppetmaster
[puppetmaster] VM already created. Booting if it's not already running...
[puppetmaster] Clearing any previously set forwarded ports...
[puppetmaster] Forwarding ports...
[puppetmaster] -- 22 => 2222 (adapter 1)
[puppetmaster] Creating shared folders metadata...
[puppetmaster] Clearing any previously set network interfaces...
[puppetmaster] Preparing network interfaces based on configuration...
[puppetmaster] Booting VM...
[puppetmaster] Waiting for VM to boot. This can take a few minutes.
@thedrow
thedrow / test_import.py
Created August 6, 2012 16:30
Verification of issue #308 of virtualenv - virtualenv does not isolate itself from the global site packages
try:
import django
print("Django was imported.")
except ImportError:
print("Django was not imported.")
@thedrow
thedrow / gist:5153782
Created March 13, 2013 16:25
The working settings.py prototype that allows you to load packages and modules as settings.
def monkey_patch():
"""
Monkeypatches
"""
import logging
import pkgutil
import warnings
import os
from django.core.exceptions import ImproperlyConfigured
@thedrow
thedrow / class_and_module_settings.py
Last active December 15, 2015 01:29
django-configurations implementation in 5 minutes. This loads settings from a class instead of a module. To use it just clone https://github.com/thedrow/django/ and set the DJANGO_CONFIGURATION environment variable to whichever object you'd like to use and import this settings module instead of django.conf.settings. The class shouldn't inherit f…
"""
Demonstrates loading settings from a module and overriding it by a class
"""
import os
from django.utils import importlib
from django.conf.default import *
class ConfigurationLoader(SettingsSourcesLoader):
@thedrow
thedrow / gist:5518143
Created May 4, 2013 17:20
How to install git-sh
git clone git://github.com/rtomayko/git-sh.git
cd git-sh
make
sudo make install
@thedrow
thedrow / gist:5518156
Created May 4, 2013 17:25
How to install Posh-Git
cinst poshgit
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
@thedrow
thedrow / gist:5635322
Last active December 17, 2015 15:59
How to change the default git hooks templates directory
git config --global init.templatedir /path/to/your/templates/
@thedrow
thedrow / gist:5635358
Created May 23, 2013 11:18
How to set the GIT_TEMPLATE_DIR environment variable so templates will be copied from there first.
export GIT_TEMPLATE_DIR=/path/to/templates/
@thedrow
thedrow / gist:5644828
Created May 24, 2013 16:46
How to initialize a git repository with a different hooks templates directory
git init --template=/path/to/your/templates/directory/
@thedrow
thedrow / gist:5644884
Created May 24, 2013 16:53
How to clone a git repository with a different hooks templates directory
git clone https://url/to/your/repository --template=/path/to/your/templates/directory/