These are field notes gathered during installation of website search facility for the ElasticSearch website.
You may re-use it to put a similar system in place.
The following assumes:
<?php | |
use Doctrine\ORM\Query\Expr\Join; | |
class OfferFinder extends Blabla | |
{ | |
public function whereTags(array $tags) | |
{ |
These are field notes gathered during installation of website search facility for the ElasticSearch website.
You may re-use it to put a similar system in place.
The following assumes:
#!/bin/bash | |
# Resursively change owner to www-data | |
# | |
# Created: 2011-05-12 | |
# Author: Viktor Stiskala <[email protected]> | |
LOGFILE=/var/log/wwwdata | |
## Add following line tu sudoers file (using visudo command) in order to allow | |
## users from www-data group to change owners under /var/www/ |
#!/bin/bash | |
if [[ $1 = "" || $2 = "" ]] | |
then | |
echo "Chybí povinné parametry" | |
echo "check-io <programPath> <samplesDir>" | |
exit 1 | |
fi | |
pg="$1" |
""" | |
jQuery templates use constructs like: | |
{{if condition}} print something{{/if}} | |
This, of course, completely screws up Django templates, | |
because Django thinks {{ and }} mean something. | |
Wrap {% verbatim %} and {% endverbatim %} around those | |
blocks of jQuery templates and this will try its best |
from django import http | |
try: | |
from django.conf import settings | |
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS | |
XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS | |
XS_SHARING_ALLOWED_HEADERS = settings.XS_SHARING_ALLOWED_HEADERS | |
XS_SHARING_ALLOWED_CREDENTIALS = settings.XS_SHARING_ALLOWED_CREDENTIALS | |
except AttributeError: | |
XS_SHARING_ALLOWED_ORIGINS = '*' |
<!-- Add the following lines to theme's html code right before </head> --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
<!-- | |
Usage: just add <div class="gist">[gist URL]</div> | |
Example: <div class="gist">https://gist.github.com/1395926</div> | |
--> |