This diff is a modified version of a diff written by Arnis Lapsa. | |
[ The original can be found here: https://gist.github.com/ArnisL/6156593 ] | |
This diff adds support to tmux for 24-bit color CSI SRG sequences. This | |
allows terminal based programs that take advantage of it (e.g., vim or | |
emacs with https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch) | |
to display 16 million colors while running in tmux. | |
The primary change I made was to support ":" as a delimeter as well |
At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.
Over the past few months, I have been working on two Haskell services:
- A reimplementation of an existing socket.io service, previously written for NodeJS using TypeScript.
- A new service, which would interact with third-party components using standard data formats from the medical industry.
I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces
#!/usr/bin/env python | |
""" | |
Consumer example to use the shared object created in Rust. | |
Ref: http://blog.skylight.io/bending-the-curve-writing-safe-fast-native-gems-with-rust/ | |
Rust program: points.rs | |
use std::num::pow; | |
pub struct Point { x: int, y: int } | |
struct Line { p1: Point, p2: Point } |
// Generated on 2014-09-03 using | |
// generator-webapp 0.5.0 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// If you want to recursively match all subfolders, use: | |
// 'test/spec/**/*.js' |
Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.
For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.
But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.
SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil
{-# LANGUAGE FlexibleInstances #-} | |
module Main where | |
import Control.Applicative ((<$>)) | |
import Control.Monad.State.Lazy as S | |
class Monad m => World m where | |
writeLine :: String -> m () | |
instance World IO where |
Quick summary:
Alienation is one of the ways that capitalism sucks. It's a symptom that something's not right, not the underlying cause. Alienation is something that happens because of the way that capitalism is built.
In short, alienation is a separation between things that should be together. This separation causes tension.
Four ways that capitalism is alienating:
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps