STRONGHOLD_DEFAULTS = True
STRONGHOLD_PUBLIC_URLS = (
r'^/__debug__/.+$',
)
The STRONGHOLD_DEFAULTS tells Stronghold to include regex patterns for Static and Media file urls so your static assets will work too.
STRONGHOLD_DEFAULTS = True
STRONGHOLD_PUBLIC_URLS = (
r'^/__debug__/.+$',
)
from urlparse import urlparse
es = urlparse(os.environ.get('BONSAI_URL'))
port = es.port or 80
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': es.scheme + '://' + es.hostname + ':' + str(port),
'INDEX_NAME': 'your_index_name',
},
}
if es.username:
HAYSTACK_CONNECTIONS['default']['KWARGS'] = {"http_auth": es.username + ':' + es.password}
For some reason my third generation Dell Sputnik (aka Dell XPS13 with Ubuntu pre-installed) sometimes has a frozen or broken mouse / cursor after I suspend or sleep my laptop. You can easily get it working again (this is not a permanent fix) by switching to a different TTY and then back to the TTY that holds the x-server GUI.
If anyone has a permanent fix, please let me know.
I went around and around trying to get Cython install on my Ubuntu 14.04 LTS box. I kept getting:
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’
Turns out that the ‘-fstack-protector-strong’ option was not added to the GCC compiler until version 4.9. Upgraded my GCC to the latest available fixed the issue.
Munich’s much vaunted migration to Linux could be about to unravel, sending the city back into the fee-driven bosom of Microsoft.
http://www.omgubuntu.co.uk/2014/08/munich-city-linux-switching-back-windows
The City of Munich, Germany has been a Linux user for over 10 years but it appears that city employees are clamoring to switch back to Windows.
The issue I see is that they built their own distribution - LiMux. It was originally based on Debian and then switched to Ubuntu. The last stable release of LiMux was in 2011 and is based on Ubuntu 10.04 LTS which was released in April 2010. That version of Ubuntu is seriously old in the tooth now -- even Microsoft releases new version of Windoze faster.
Seems to me that the City of Munich suffers from "Not invented here" syndrome and would be better off if they just switch to an vendor with commercial support like Ubuntu or Red Hat instead of trying to build and maintain their own distro.
This is for my future reference because it's really handy if you don't want to drop a virtualenv or doing some crazy work on a vagrant box. Even ignores any packages you installed from git or vcs sources with the -e flag
pip freeze | grep -v "^-e" | xargs pip uninstall -y
This post is mostly for my future reference. Really simple to pair a new mouse with an existing receiver on Linux.
ltunify is a program resulting from the gathered knowledge on the Logitech HID++ protocol. It allows you to pair additional devices like keyboards and mice to your Unifying receiver, unpair existing devices and list information about connected devices. This section will show you how to install the ltunify program.
Besides a C compiler and a way to fetch sources (wget+tar or git), you will need Linux 3.2 or newer with the hid-logitech-dj module. On Debian and Ubuntu distributions, the required packages can be installed using:
sudo apt-get install git gccFetch the sources and install
ltunifyto$HOME/bin/using the next commands:git clone https://git.lekensteyn.nl/ltunify.git
cd ltunify
make install-homeThe following steps will assume that
$HOME/binis available in your path. If not, run:export PATH="$HOME/bin:$PATH"If everything went well, you should be able to run
ltunify --helpto show the available options:Usage: ltunify [options] cmd [cmd options]
Logitech Unifying tool version dev
Copyright (C) 2013 Peter Wu <lekensteyn@gmail.com>
Generic options:
-d, --device path Bypass detection, specify custom hidraw device.
-D Print debugging information
-h, --help Show this help message
Commands:
list - show all paired devices
pair [timeout] - Try to pair within "timeout" seconds (1 to 255,
default 0 which is an alias for 30s)
unpair idx - Unpair device
info idx - Show more detailed information for a device
receiver-info - Show information about the receiver
In the above lines, "idx" refers to the device number shown in the
first column of the list command (between 1 and 6). Alternatively, you
can use the following names (case-insensitive):
Keyboard Mouse Numpad Presenter Trackball TouchpadThe below session shows you how to use a device index to unpair a mouse.
$ sudo ltunify list
Devices count: 1
Connected devices:
idx=1 Mouse M525
$ sudo ltunify unpair 1
Device 0x01 Mouse successfully unpaired
$ sudo ltunify list
Devices count: 0
Connected devices:
$ sudo ltunify pair
Please turn your wireless device off and on to start pairing.
Found new device, id=0x01 Mouse
$ sudo ltunify list
Devices count: 1
Connected devices:
idx=1 Mouse M525It is also possible to select a device by device type (case-insensitive). When multiple devices of the same type are available, the first one will be selected.
$ sudo ltunify unpair mouse
Device 0x01 Mouse successfully unpaired