Dominate HTML in Python #

Have you ever wished that you had a sweet little API to generate HTML in Python? Dominate is probably what you are looking for.

Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API.

Now, I’m a self admitted HTML purist, but look at how the dominate API works.

from dominate.tags import ul, li
list = ul()
for item in range(4):
    list += li('Item #', item)

If done correctly HTML generators can blend in with your code nicely.

Checkout Dominate the next time you’re looking for a nice native HTML generator API for python.

Pickadate. Any date. #

If you have need for a mobile-friendly, responsive, and lightweight jQuery date & time input picker, look no further than pickadate.js. Amsul pinged us to say that he just released version 3.4 of his popular library and is quite proud to say that pickadate.js is now ARIA-enabled. He states:

This is an update I would highly recommend everyone to get because of how crucial accessibility is.

If you’re already using pickadate.js, this is a great time to upgrade. If not, give it a look!

The Why and How of Ansible and Docker

Many reading this might be asking, “Why don’t you just use Heroku?”

There is a lot of interest from the tech community in both Docker and Ansible, I am hoping that after reading this article you will share our enthusiasm. You will also gain a practical insight into using Ansible and Docker for setting up a complete server environment for a Rails application.

Node mock in-memory file system for testing #

In Node, the fs module provides file system access. Tim Schaub’s mock-fs module allows Node’s built-in fs module to be temporarily backed by an in-memory file system during testing.

From Tim’s post Mocking the file system:

When writing tests, it’s common to run up against code that relies on file system access. People often end up including a bunch of test fixtures along with their code. Tests might create some temporary space, copy fixtures in place, run code, make assertions about what was read or written, and then clean up. The result can be fragile when working across multiple operating systems and leads to long test run times. In cases like this, a mock file system provides an alternative.

Checkout the source on GitHub.

Better Google Web Fonts #

A sim­ple one-off page to browse multi-variant type­faces. Google Web Fonts is full of awesome free, open source fonts. It’s also full of fonts that may not be worth your time. I’ve been using this to mine Google based on his metrics, and start there.

I quickly discovered that a good metric for higher-quality fonts was the presence of four or more alternates. The Google Web Fonts directory does not allow that type of filtering, so I built this simple one-off page that allows you to browse typefaces that are true families. – Matt Wiebe

Would be neat if each font in the index had its own page with Dribbble shots tagged with “PT Serif” and an email with updates on these worthy fonts.

The source is on GitHub if you want to contribute.


Fun fact. We used Yanone Kaffeesatz in our logo.

Proposed Microformat for site’s source code, rel=“source” #

How awesome would it be to use rel="source" to link a document or project to it’s source code?

From Jeremy’s post:

We were talking about how it would be nice to have some machine-readable way of explicitly marking up those kind of links, whether they’re in the head of the document, or visible in the body. A rel attribute describes the relationship of the current document to the linked document. So I’ve proposed rel="source".

If you agree with Jeremy share his post and help spread the word.

Can you use Python 3? #

Good question. It’s a long road to Python 3, but it’s a little easier to navigate now with the release of caniusepython3.

This script takes in a set of dependencies and then figures out which of them are holding you up from porting to Python 3.

It’s a simple script which makes it just a little easier to use Python 3.

The output of the script will tell you how many (implicit) dependencies you need to transition to Python 3 in order to allow you to make the same transition. It will also list what projects have no explicit dependency blocking their transition so you can ask them consider starting a port to Python 3.

Simple guide to Mobile-First Responsive Design #

Who doesn’t want their web projects to be useable on all devices? If you’ve been looking for a simple primer on the fundamentals of responsive web design, Adam Kaplan’s project, nicely dubbed Grid, is a great resource to visually see what “Responsive” means and how it works.

We want our websites to be useable on all devices by responding to the user’s behavior, screen size and screen orientation.

Check out Grid’s homepage, or the source on GitHub.

An interactive shell for Git #

The only problem I see with gitsh is reversing years of Git muscle memory with git appended to each command.

Git commands tend to come in groups. Avoid typing git over and over and over by running them in a dedicated git shell.

Avoiding typing git over and over isn’t the only reason you should check out this project by thoughtbot — check out the answers to Why should you use gitsh? in the readme.

Want to run SQL on a CSV file? #

Now you can with q, a Python lib.

q allows performing SQL-like statements on tabular text data.

It seems this idea isn’t restricted to Python either. TextQL is a project written in Go that promises to do roughly the same thing.

8 Sass mixins you must have in your toolbox #

Regardless if you’re using Compass, Bourbon, or you’re going full vanilla — these 8 Sass mixins are certainly among the top mixins needed.

Some of the mixins are included in Compass, but since I prefer not to use Compass in my projects, I decided to write them myself. So, here are the 8 mixins I think every developer should have in their toolbox.

Setting a rem font size with pixel fallback is priceless.

Mac PreferencePane for Homebrew and launchd/launchctl #

LaunchRocket

Opening a new tab in your Terminal and remembering to run a service, or running all your services all the time cause you’re like, “Meh, I code all the time so…,” what’s the difference, right?

Well LaunchRocket is a Mac PreferencePane that makes turning those services on/off easier by giving you a tucked away, easy to use UI for adding, scanning and managing your Homebrew and launchd/launchctl services.

Check out the source on GitHub.

You always need another Python task queue #

I kid, diversity is the key to a healthy ecosystem. Huey is a simple offline Python task queue that has relatively few dependencies.

a lightweight alternative: written in python, no deps outside the standard lib except Redis (or you can roll your own backend), and support for Django.

Sometimes a little goes a long way. Checkout Huey if you need a lightweight Python task queue. If you need more features I would recommend RQ, or Celery.

Find the right tools for your Sass projects with Sache #

Sache just launched — it’s a Sass library directory made by Chris Michel and Jared Hardy. They teamed up to create Sache because of their love for the Sass community and to help folks find the right tools to use in Sass/Compass projects.

Jared Hardy on why they built Sache:

Was inspired after SassConf by all the amazing stuff people were building and I wanted a place where we could feature and explore the cool stuff the sass community was producing.

Currently there are just 21 libraries listed. If yours is missing, add it to the directory.

On contributing:

We love open-source projects and community so we’ve kept this repo open for anyone to contribute to. Feel free to open an issue or submit a pull request with an additional feature or even a bug fix. If you are going to contribute: create a new branch off of master and open a pull request against that so we can check out your work. Please make sure you’ve tested your work thoroughly before finalizing your pull request.

Check out the Github repository to submit issues and learn how to contribute, and follow @sache_in on Twitter to stay up to date.

Generate 4 language bindings for your API in one Go #

You just built an API, and want to make sure everyone can use it. Building libraries in every language isn’t only going to be hard, its going to take a lot of time. Time you don’t have. This is where Alpaca can help.

You define your API according to the format, alpaca builds the API libraries along with their documentation. All you have to do is publishing them to their respective package managers.

Right now it can generate API clients in PHP, Python, Ruby, and JavaScript. You can see examples of the generated client libraries here. I can’t speak to the quality of all the generated language bindings, but I took a cursory look at the Python lib and it looks good. Looks like Alpaca could save us all a lot of time.