This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
project_name=$1 | |
python_version=$2 | |
echo " --- Install/configure pyenv ---" | |
pyenv_dir="$HOME/.pyenv" | |
pyenv_cmd="$pyenv_dir/bin/pyenv" # to avoid modifying $PATH in this script | |
current_dir="$PWD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import SimpleTestCase | |
from django.urls import get_resolver | |
def walk_url_names(patterns, namespace=None): | |
""" | |
Generator yielding the URL names (including namespaces and named capture | |
groups) of all URLs in the given sequence of URL patterns. Can be used to | |
detect duplicates. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this script to automate the process of logging in to the Sencha private | |
# NPM repository, as "npm login" does not support a non-interactive mode. | |
# Adapted from: https://stackoverflow.com/a/35831310/405174 | |
sencha_username='' # set appropriately | |
sencha_password='' # set appropriately | |
sencha_registry='npm.sencha.com' | |
sencha_token=$(curl -s \ | |
-H "Accept: application/json" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: ============================================================================= | |
:: When using Vagrant with VirtualBox under Windows, with VirtualBox shared | |
:: folders, creating symlinks in the synced folder requires "vagrant up" be run | |
:: with Administrator privileges. | |
:: dev.cmd is a script designed to open a command prompt with Administrator | |
:: privileges, ready for running Vagrant commands. | |
:: It accepts the full path to a Vagrant project directory and does the following: | |
:: 1. Uses UAC to request Administrator privileges. |