Skip to content

Instantly share code, notes, and snippets.

Joakim Kolsjö joakimk

Block or report user

Report or block joakimk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@smpallen99
smpallen99 / constants.ex
Created Apr 5, 2014
Approach for constants shared between modules in Elixir
View constants.ex
defmodule Constants do
@moduledoc """
An alternative to use @constant_name value approach to defined reusable
constants in elixir.
This module offers an approach to define these in a
module that can be shared with other modules. They are implemented with
macros so they can be used in guards and matches
## Examples:
@joakimk
joakimk / pxe_server_install.sh
Created Oct 12, 2010
Script to install a PXE boot server for diskless clients
View pxe_server_install.sh
# This installs a PXE boot server.
#
# It's based on https://help.ubuntu.com/community/DisklessUbuntuHowto.
# It's been used with ubuntu-10.10-server-amd64.iso and ubuntu-10.10-server-i386.iso.
#
# It requires two network cards. One for access to the outside world and one
# for a private network of PXE clients. I've choosen this setup to not cause problems
# with DHCP on the normal network.
#
# It also requires that you have a second partition mounted on /nfsroot.
@joakimk
joakimk / Testbot stats (for rspec)
Created Jan 26, 2010
Example test runtimes using testbot
View Testbot stats (for rspec)
1 computers - 1 cpus: 29 minutes (rake spec)
5 computers - 13 cpus: 4 minutes (rake testbot:spec)
10 computers - 25 cpus: 2 minutes (rake testbot:spec) (about 60% cpu efficiency)
The testbot communication overhead is about 2-5 seconds per run. Fetching the code
and setting up the test environment takes a bit longer. The jobs are not being
perfectly balanced. There is still plenty of room for optimizations.
You can’t perform that action at this time.