From | To | Expression |
---|
$ curl -O ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz | |
$ tar -xzvf ncurses-5.9.tar.gz | |
$ cd ./ncurses-5.9 | |
$ ./configure --prefix=/usr/local \ | |
--without-cxx --without-cxx-binding --without-ada --without-progs --without-curses-h \ | |
--with-shared --without-debug \ | |
--enable-widec --enable-const --enable-ext-colors --enable-sigwinch --enable-wgetch-events \ | |
&& make | |
$ sudo make install |
/*** Edits to wp-includes/post.php ***/ | |
// Add this method | |
// | |
function wp_get_pages( $args = array(), $output = ARRAY_A ) { | |
if ( is_numeric( $args ) ) { | |
_deprecated_argument( __FUNCTION__, '3.1', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) ); | |
$args = array( 'numberposts' => absint( $args ) ); | |
} |
""" | |
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 |
A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.
The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.
What can you say?
from fabric.api import * | |
import os | |
import fabric.contrib.project as project | |
# Local path configuration (can be absolute or relative to fabfile) | |
env.theme = 'themes/your-theme' | |
env.deploy_path = '/absolute/path/for/generated/output' | |
# Remote server configuration | |
prod = '[email protected]:22' |
from pelican import signals | |
""" | |
Neighbor Articles Plugin for Pelican | |
==================================== | |
Adds ``next_article`` (newer) and ``prev_article`` (older) variables | |
to the articles context | |
Usage: |
Prerequisites:
- One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
- A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.
Software components used:
// 1. Go to page https://www.linkedin.com/settings/email-frequency | |
// 2. You may need to login | |
// 3. Open JS console | |
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
// 4. Copy the following code in and execute | |
// 5. No more emails | |
// | |
// Bookmarklet version: | |
// http://chengyin.github.io/linkedin-unsubscribed/ |
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
- Publishing (Draft->Approved->Published->Expired->Deleted)