-
$ sudo pacman -S tor $ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.
$ sudo pacman -S nyx
$ sudo pacman -S tor
$ ## nyx provides a terminal status monitor for bandwidth usage, connection details and more.
$ sudo pacman -S nyx
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
package plugins; | |
import play.PlayPlugin; | |
import play.mvc.Http; | |
import play.mvc.Http.Request; | |
import play.mvc.Http.Response; | |
import play.mvc.Router.Route; | |
import play.vfs.VirtualFile; | |
import util.MetricsUtil; |
/** tap implementation for C++11 */ | |
template<typename T, typename F> | |
T tap(T &&obj, F const &fn) { | |
fn(obj); | |
return obj; | |
} | |
// usage | |
tap(new User(params), [](User *u) { | |
if (u->isValid()) { |
-- PostgreSQL 9.2 beta (for the new JSON datatype) | |
-- You can actually use an earlier version and a TEXT type too | |
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
-- Inspired by | |
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html | |
-- http://ssql-pgaustin.herokuapp.com/#1 | |
-- JSON Types need to be mapped into corresponding PG types | |
-- |
For a tmux status line as seen in the example image for the wemux project:
The session on the left in the example screen shot uses a patched font from the vim-powerline project. Inconsolata-dz, you beautiful creature.
To duplicate the left status line add the following lines to your ~/tmux.conf
set -g status-left-length 32
set -g status-right-length 150
function! GrepPartial(partial) | |
if (a:partial) | |
let pattern = "partial.*" . partial | |
else | |
let path = substitute(expand("%:h"), "app/views/", "", "") | |
let action = substitute(expand("%:t:r:r"), "^_", "", "") | |
let pattern = "partial.*" . path . "/" . action | |
endif | |
if (exists('g:loaded_fugitive')) |
Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.
class Calculator::Bogo < Calculator | |
preference :number_to_buy, :integer, :default => 1 | |
preference :number_to_get, :integer, :default => 1 | |
def self.description | |
"Buy One Get One" | |
end | |
def self.register | |
super |
It was so simple. All you wanted was a local copy of your browser history so you could read offline. So you hacked up a script and it worked pretty well. But there were gaps. Sometimes pages didn't work by the time you tried to download them. Sometimes the server errored out. Once, the jerk next door dug up a cable line and your net connection went down entirely.
Errors are going to happen, so how do you handle them in code?