A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
from AppKit import NSPoint | |
from mojo.events import MeasurementTool | |
measurement = MeasurementTool.measurementClass() | |
measurement.startPoint = NSPoint(100, 100) | |
measurement.endPoint = NSPoint(200, 200) | |
g = CurrentGlyph() | |
g.naked().measurements.append(measurement) | |
g.update() |
# Main entry point | |
SOURCE = src/app.js | |
# The dependencies (other than node_modules/**) | |
LIBS = $(shell ls src/lib/*.js src/components/*.js) | |
# The target | |
TARGET = build/app.js | |
# Compilation flags |
from fontTools.pens.basePen import BasePen | |
def pointOnCurve(p1, c1, c2, p2, value): | |
dx = p1[0] | |
cx = (c1[0] - dx) * 3.0 | |
bx = (c2[0] - c1[0]) * 3.0 - cx | |
ax = p2[0] - dx - cx - bx | |
dy = p1[1] | |
cy = (c1[1] - dy) * 3.0 |
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
(function($){ | |
function dragEnter(e) { | |
$(e.target).addClass("dragOver"); | |
e.stopPropagation(); | |
e.preventDefault(); | |
return false; | |
}; | |
function dragOver(e) { | |
e.originalEvent.dataTransfer.dropEffect = "copy"; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
/* | |
--- | |
name: guilloche | |
script: guilloche.js | |
description: guilloche | |
provides: [Guilloche] | |
... | |
*/ |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o