:map ,t :w\|!spec %<cr>
-
vim maps ",t" to the following command
- :w (write, ie save file)
-
| (also)
| module Jekyll | |
| class CategoryIndex < Page | |
| def initialize(site, base, dir, category) | |
| @site = site | |
| @base = base | |
| @dir = dir | |
| @name = 'index.html' | |
| self.process(@name) | |
| self.read_yaml(File.join(base, '_layouts'), 'category_index.html') |
14.3: I'm trying to do some simple trig, and I am #including <math.h>, but I keep getting "undefined: sin" compilation errors.
A: Make sure you're actually linking with the math library. For instance, due to a longstanding bug in Unix and Linux systems, you usually need to use an explicit -lm flag, at the end of
| perl -e 'while(<>) { if (length($_) < 65) { print $_ . "\n";} else { print $_;}}' ebook.txt > ebook2.txt |
drush sqlq "delete from comment where subject like '%viagra%'"
drush sqlq "delete from comment where subject like '%payday loan%'"
drush sqlq "select name,subject from comment where cid > 3002 and cid < 4005"
| #!/bin/bash | |
| SERVER="" | |
| USER="" | |
| if [ -f $1 ] ; then | |
| echo "scping $1 to /home/${USER} on ${SERVER}!" | |
| scp $1 ${USER}@${SERVER}: | |
| fi |
| #!/usr/bin/env python | |
| function server() { | |
| local port="${1:-8000}" | |
| open "http://localhost:${port}/" | |
| python SimpleHTTPServer "$port" | |
| } |
| def index | |
| # select name, count(1) from tags GROUP BY name; | |
| @tags = Tag.count(:all, :group => 'name', :order => 'count_all DESC') | |
| respond_with @tags | |
| end |
| :%s/^.\{5}// |