HTML5 shiv: http://code.google.com/p/html5shiv/
Modernizr: http://www.modernizr.com/
Colors: http://mattpatenaude.com
Compatibilidade de fonts:
$.expr[':'].seletor = function(objNode, intStackIndex, arrProperties, arrNodeStack){ | |
// código que deve retornar true para incluir o objeto ou false | |
}; |
{% load i18n %} | |
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3> | |
<ul> | |
<li {% if choices.0.selected %}class="selected"{% endif %}><a href="?"><strong>All</strong></a></li> | |
{% for choice in choices|dictsort:"display" %} | |
{% if choice.query_string != "?" %} | |
<li {% if choice.selected %}class="selected"{% endif %}><a href="{{ choice.query_string|iriencode }}">{{ choice.display }}</a></li> | |
{% endif %} | |
{% endfor %} | |
</ul> |
import httplib, urllib | |
origin = 'file.js' | |
destination = 'file.min.js' | |
params = urllib.urlencode({'file1': open(origin).read()}) | |
headers = {'Content-Type': 'application/x-www-form-urlencoded'} | |
conn = httplib.HTTPConnection('reducisaurus.appspot.com') | |
conn.request('POST', '/js', params, headers) | |
response = conn.getresponse() |
require 'nokogiri' | |
def sanitize_preserving_code(content) | |
doc = Nokogiri::HTML::DocumentFragment.parse content | |
doc.css('code').each do |code| | |
code.inner_html = h code.inner_html | |
end | |
sanitize doc.to_html, :tags => %w(strong em code br a) | |
end |
[alias] | |
co = checkout | |
st = status | |
cm = commit | |
hist = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an>%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s' --graph | |
histfull = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an>%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s%n' --graph --name-status |
body { color: #222; font: normal normal 400 100%/1.5em georgia,serif; margin: 3em auto; width: 40em } | |
a:link { color: #3366CC } | |
a:visited { color: #224488 } | |
blockquote,ol,p,ul { display: block; margin: 0 0 1.5em } | |
blockquote { border-left: solid .1em #E4E4E4; color: #919191; padding: 0 1.5em 0 1.4em } | |
code { font: normal normal 87.5%/1.71428571em monospace,sans-serif } | |
img { display: block; margin: 1.5em auto } | |
pre { display: block; font: normal normal 87.5%/1.71428571em monospace,sans-serif; margin: 1.71428571em } | |
h1,h2,h3,h4,h5,h6 { font-weight: 400 } | |
h1 { font-size: 225%; line-height: 1.3334em; margin: 0 0 .1666em } |
# add this to your virtualenv activate script | |
export GEM_HOME="$VIRTUAL_ENV/gems" | |
export GEM_PATH="" |
HTML5 shiv: http://code.google.com/p/html5shiv/
Modernizr: http://www.modernizr.com/
Colors: http://mattpatenaude.com
Compatibilidade de fonts:
# based on http://www.paulund.co.uk/smooth-scroll-to-internal-links-with-jquery | |
$ -> | |
$('a[href^="#"]').on 'click.smoothscroll', (e) -> | |
e.preventDefault() | |
target = @hash | |
$target = $(target) |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |