start new:
tmux
start new with session name:
tmux new -s myname
| This playbook has been removed as it is now very outdated. |
| #!/usr/bin/env ruby | |
| # Invoke with `ruby md2cre.rb filename.md` | |
| # | |
| # Setup: `gem install redcarpet` | |
| require 'rubygems' | |
| require 'redcarpet' | |
| class Creole < Redcarpet::Render::Base | |
| def normal_text(text) |
| var express = require('express'), | |
| httpProxy = require('http-proxy'), | |
| app = express(); | |
| var proxy = new httpProxy.RoutingProxy(); | |
| function apiProxy(host, port) { | |
| return function(req, res, next) { | |
| if(req.url.match(new RegExp('^\/api\/'))) { | |
| proxy.proxyRequest(req, res, {host: host, port: port}); |
| {% if grains['os'] == 'Ubuntu' %} | |
| {% from "pkg_repo/apt.sls" import apt_repo with context %} | |
| {% if pillar['pkg_mirrors_enabled'] %} | |
| {% set mirrors = ['http://' + pillar['pkg_mirror'] + '/10gen/repo/upbuntu-upstart/', | |
| 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart/'] %} | |
| {% else %} | |
| {% set mirrors = ['http://downloads-distro.mongodb.org/repo/ubuntu-upstart/'] %} | |
| {% endif %} | |
| {{ apt_repo('10gen', mirrors, codename='dist', components=['10gen'], key_id='7F0CEB10') }} |
| class ViewManager(models.Manager): | |
| def bulk_create(self, *args, **kwargs): | |
| raise NotImplementedError | |
| def create(self, *args, **kwargs): | |
| raise NotImplementedError | |
| def get_or_create(self, *args, **kwargs): | |
| raise NotImplementedError |
| ;; Coloring | |
| (global-font-lock-mode t) | |
| (defvar my/cpanfile-keywords | |
| (rx (group (or "on" | |
| "requires" | |
| "recommends" | |
| "suggests" | |
| "conflicts" | |
| "feature" |
This guide will walk you through how you can use a GitHub repository to house your wiki content, have DocPad render it, and automatically update on changes. It's also really nice as we get to benefit from the github project workflow for our wiki, that is issues, pull requests, etc.
We use this workflow heavily by linking the DocPad Website and the DocPad Documentation repositories allowing us to have users edit and submit pull requests for improvements to our documentation, and once merged, the website regenerates automatically.
| get '/' => sub { | |
| my $self = shift; | |
| my $ua = Mojo::UserAgent->new; | |
| my $tx = $ua->build_tx(GET => 'http://tempi.re'); | |
| $tx->on(finish => sub { | |
| my $tx = pop; | |
| warn $tx->error; # premature connection close |