steps to reproduce:
curl 'http://thequeue.org/cr?id=https%3A%2F%2Faaronsw.jottit.com%2Fhowtoget&title=Aaron%20Swartz:%20howtoget' > how-to-get.html
html2text.py how-to-get.html > how-to-get.md
gist < how-to-get.md
# total size of current dir | |
du -hs | |
# total size of all level 1 directories in current dir | |
du -h --max-depth=1 | sort -n | grep M |
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
docpad: { | |
files: [ "./src/**/*.*" ], | |
out: ["out"] | |
}, | |
watch: { |
sudo rm -rf /usr/local/git /usr/bin/git /etc/paths.d/git /etc/manpaths.d/git |
Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.
// iterate through enums | |
for (EnumType tt : EnumType.values()) { | |
System.out.println( tt.toString() ); | |
} | |
// iterate through lists | |
List<String> list = new ArrayList<>(); | |
for (String id : list) { | |
System.out.println( id ); | |
} |
#include <ctime> | |
void f() { | |
using namespace std; | |
clock_t begin = clock(); | |
code_to_time(); | |
clock_t end = clock(); | |
double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC; |
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_objects import RGBColor | |
import argparse | |
import math |
<div class="sprite"> | |
</div> |
$("#tree-container").jstree("create", $("#new_node"), "inside", {"data":"new_node"}, false, true); |