Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
This file contains 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
*.acn | |
*.acr | |
*.alg | |
*.aux | |
*.bak | |
*.bbl | |
*.bcf | |
*.blg | |
*.brf | |
*.bst |
This file contains 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
# Regex to extract error messages from "pylint -f parseable" output | |
import re | |
P_PYLINT_ERROR = re.compile(r""" | |
^(?P<file>.+?):(?P<line>[0-9]+):\ # file name and line number | |
\[(?P<type>[a-z])(?P<errno>\d+) # message type and error number, e.g. E0101 | |
(,\ (?P<hint>.+))?\]\ # optional class or function name | |
(?P<msg>.*) # finally, the error message | |
""", re.IGNORECASE|re.VERBOSE) |
This file contains 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.http import HttpResponse | |
ACC_HEADERS = {'Access-Control-Allow-Origin': '*', | |
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', | |
'Access-Control-Max-Age': 1000, | |
'Access-Control-Allow-Headers': '*'} | |
def cross_domain_ajax(func): | |
""" Sets Access Control request headers.""" | |
def wrap(request, *args, **kwargs): |
This file contains 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
""" | |
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 |
This file contains 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
<div class="guided-edit"> | |
{>_close_action/} | |
{<closeText}{i18n_text_plain__close}{/closeText} | |
{?firstTaskTitleString} | |
<h1>{firstTaskTitleString|s}</h1> | |
{/firstTaskTitleString} | |
<form class="standard-form" id="{name}_id" name="{name}" method="{method}" action="{action}"> | |
<fieldset> | |
<legend>{i18n_text_plain__what_is_your_industry}</legend> |
This file contains 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
var myConfObj = { | |
iframeMouseOver : false | |
} | |
window.addEventListener('blur',function(){ | |
if(myConfObj.iframeMouseOver){ | |
console.log('Wow! Iframe Click!'); | |
} | |
}); | |
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){ |
This file contains 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
""" | |
jQuery templates use constructs like: | |
{{if condition}} print something{{/if}} | |
Or like: | |
{% if condition %} print {%=object.something %}{% endif %} | |
This, of course, completely screws up Django templates, |
This file contains 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
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script set ownership for all table, sequence and views for a given database | |
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
OlderNewer