Skip to content

Instantly share code, notes, and snippets.

@Batou99
Batou99 / apue.h
Created April 11, 2011 14:00
apue.h
/* Our own header, to be included before all standard system headers */
#ifndef _APUE_H
#define _APUE_H
#if defined(SOLARIS)
#define _XOPEN_SOURCE 500 /* Single UNIX Specification, Version 2 for Solaris 9 */
#define CMSG_LEN(x) _CMSG_DATA_ALIGN(sizeof(struct cmsghdr)+(x))
#elif !defined(BSD)
#define _XOPEN_SOURCE 600 /* Single UNIX Specification, Version 3 */
### Keybase proof
I hereby claim:
* I am batou99 on github.
* I am batou99 (https://keybase.io/batou99) on keybase.
* I have a public key ASAM_UF6Qy0vvaGS9fQqtW5W5ZLf93uH4aOVbPozs4kcVQo
To claim this, I am signing this object:
package com.manning.gia.todo.repository;
import com.manning.gia.todo.model.ToDoItem;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.*;
package com.manning.gia.todo.repository;
import com.manning.gia.todo.model.ToDoItem;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
public class H2ToDoRepository implements ToDoRepository {
@Override
package com.manning.gia.todo.repository;
import com.manning.gia.todo.model.ToDoItem;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.*;

Why

Keeping a changelog and tagging the releases serve various purposes

Easy identification

It's easy to identify the differences between versions (e.g. Production vs Staging) so everyone is aware of what is running at a server just looking at the CHANGELOG.md

Helping the Product Team

Sometimes the product team may not be fully aware of what are we deploying or what the differences are between what is deployed vs what we are testing. The CHANGELOG.md will be easier to understand than checking commit messages. Commit messages are much more technical oriented and written for developers instead of customers/managers.

Visibility

Steps to update the CHANGELOG

  1. When branching out, edit the CHANGELOG.md and add an "Unreleased" section on top
  2. The section will have subsections (in needed) for
    • Added
    • Changed
    • Deprecated
    • Removed
    • Fixed
    • Security
defmodule MyList do
def flatten([]), do: []
def flatten([head | tail]), do: flatten(head) ++ flatten(tail)
def flatten(x), do: [x]
end
defmodule MyListTest do
use ExUnit.Case
defmodule Flatten do
def flatten([]), do: []
def flatten([head | tail]), do: flatten(head) ++ flatten(tail)
def flatten(x), do: [x]
end
defmodule FlattenTest do
use ExUnit.Case

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around