##Refs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement | |
from kombu import BrokerConnection | |
from collections import defaultdict | |
import gevent | |
from gevent import monkey | |
monkey.patch_all() | |
class WorkerHub(): | |
""" | |
WorkerHub controls the local mailboxes that the @worker decorator assigns. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # exit on error | |
### README | |
# * installs your desired ruby versions using rbenv | |
# ** including openssl (needed by bundler) | |
# ** including sqlite (probably needed for rails apps) | |
# | |
# Before you start: | |
# * put ssh-keys in place |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CentOS rbenv system wide installation script | |
# Forked from https://gist.github.com/1237417 | |
# Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
# Install pre-requirements | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
make bzip2 autoconf automake libtool bison iconv-devel git-core |
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
- install packages for vim, git
- create user accounts, as specified in included JSON config files
- install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository
Afterwards, we'll see how easy it is to package our newly provisioned VM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Tested with OCaml 3.12.1/4.00.1 *) | |
(* A standard state monad with an integer state *) | |
module IntStateMonad = | |
struct | |
type 'a t = int -> 'a * int | |
(* val return : 'a -> 'a t *) | |
let return (x : 'a) : 'a t = | |
(fun s -> (x, s)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type z | |
type 'a s | |
(* Sadly enough, without kind restrictions, this still allows nonsense types like *) | |
type nonsense = int s | |
(* GHC 7.6 supports this (lifting types to kinds & kind constraints) ;-) *) | |
type (_, _) llist = | |
| Nil : (z, 'a) llist | |
| Cons : ('a * ('l, 'a) llist) -> ('l s, 'a) llist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Attempt to check if the folder exist. | |
# If it exist echo out a string. You have to echo something | |
# if the directory does exist or else the task is considered failed | |
# Output is set to $is_default_created. Note that this variable is | |
# object and not an atomic value. | |
- name: Attempt to check if a directory exist | |
action: shell test -d /my/folder && echo "exist" || echo "" | |
register: is_folder_created |
OlderNewer