ThirdPinion
11Jun/140

Build and Test Elixir Projects with Travis CI

I've been toying with Elixir a bit lately, and decided to see if I could Travis CI to build my project (currently named "ProjectTynamo").  Travis CI has support for erlang, so I figured it was possible (spoiler: it was).

So here's my .travis.yml file:
language: erlang
otp_release:
- 17.0
before_install:
- git clone https://github.com/elixir-lang/elixir
- cd elixir
- git checkout v0.12.5
- cd ..
- make -C elixir
before_script: "export PATH=`pwd`/elixir/bin:$PATH"
script: "MIX_ENV=test mix do deps.get, test"

Line by line:

1:  Specify that it's an erlang project
2-3:  Specify the 17.0 release of erlang (elixir needs that or newer)
4-9:  Download and build elixir.  My project is using Dynamo, so I'm specifically targetting elixir v0.12.5 for now.
10:  Make sure the elixir binaries are added to PATH
11:  Run the mix command.  I'm just getting the dependencies and doing "test", so I set the MIX_ENV to "test".

11Jun/142

Node-Gyp on OSX

If you have Xcode installed on your Apple laptop, then you should have gotten a C++ compiler in the form of CLang.  You'd think this would work fine with Node-Gyp...and it does.  With a tweak.

Add something like this to the "targets" section of the binding.gyp file:


"xcode_settings": {
"GCC_ENABLE_CPP_RTTI": "YES",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"OTHER_CPLUSPLUSFLAGS":["-stdlib=libc++"],
"OTHER_LDFLAGS":["-stdlib=libc++"],
"CLANG_CXX_LANGUAGE_STANDARD":"c++11",
"MACOSX_DEPLOYMENT_TARGET":"10.7"
}

Otherwise you'll probably get a litany of errors like

"cannot use typeid with -fno-rtti"

and

"cannot use 'throw' with exceptions disabled"

by Tagged as: , , 2 Comments
13Jul/125

Encode and Decode Base64 Within MS Excel

Did someone hand you a large amount of data in an Excel spreadsheet encoded in base64?  Or do you have data in an Excel sheet that you need converted to base64? No problem!

Side note: This page has another way to do it with a project reference to a Microsoft XML library.  However, we're going to do it our own way, so you can see the entire code.