##Scala eXchange 2014 slides
collected by Adam Warski
Feel free to complete the list!
The Binary Compatibility Challenge by Martin Odersky
A Skeptic's Look at scalaz' "Gateway Drugs”: A Practical Exploration by Brendand McAdams
#!/bin/bash | |
echo "Make data dirs...." | |
mkdir ~/data | |
mkdir ~/data/config | |
mkdir ~/data/db | |
mkdir ~/data/shard0 | |
mkdir ~/data/shard0/rs0 | |
mkdir ~/data/shard0/rs1 | |
mkdir ~/data/shard0/rs2 |
To install this init script, you should save mongodb to /etc/init.d/ and mongosharding.conf to /etc/ | |
then run the following commands as root or with sudo: | |
chmod 755 /etc/init.d/mongodb | |
chown root:root /etc/init.d mongodb | |
update-rc.d mongodb defaults | |
This installation procedure was tested on UBUNTU 11.10 |
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
import com.walterinsh.datacompass.exception.OperationForbiddenException; | |
import org.apache.commons.lang.StringUtils; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.ControllerAdvice; | |
import org.springframework.web.bind.annotation.ExceptionHandler; | |
/** |
package com.abc.model; | |
import java.util.List; | |
public class Email { | |
private String from; | |
private List<String> to; | |
private List<String> cc; | |
private List<String> bcc; |
##Scala eXchange 2014 slides
collected by Adam Warski
Feel free to complete the list!
The Binary Compatibility Challenge by Martin Odersky
A Skeptic's Look at scalaz' "Gateway Drugs”: A Practical Exploration by Brendand McAdams
2014-03-04 | 15dfb8e6cc4111e3a5bb600308919594 | 11 | |
---|---|---|---|
2014-03-06 | 81da510acc4111e387f3600308919594 | 61 |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)
I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.
A functor is something that supports map
.