Skip to content

Instantly share code, notes, and snippets.

View erikvdwal's full-sized avatar
👻
Boo!

Erik van der Wal erikvdwal

👻
Boo!
View GitHub Profile
@billwang1990
billwang1990 / ObjectMapper+Alamofire+RxSwift
Created October 30, 2015 06:24
ObjectMapper+Alamofire+RxSwift
//
// RxAlamofireObjMapper.swift
// RXDemo
//
// Created by Yaqing Wang on 10/30/15.
// Copyright © 2015 billwang1990.github.io. All rights reserved.
//
import Foundation
import Alamofire
/*:
Brandon Williams
# Lenses in Swift
*/
/*:
## i.e. Functional getters and setters
@mattweldon
mattweldon / up-and-running-with-edeliver-on-do.md
Last active September 3, 2021 16:48
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
@jmcd
jmcd / KeyExchange.swift
Last active April 8, 2022 17:37
Diffie–Hellman key exchange simple implementation
import Foundation
protocol Cipher {
func encrypt(message: String, secret: Int) -> String
func decrypt(message: String, secret: Int) -> String
}
struct XOR: Cipher {
private func impl(message: String, secret: Int) -> String? {
@gonzaloserrano
gonzaloserrano / log.go
Created August 18, 2015 17:56
logrus wrapper
package log
import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
"strings"
)
var logger = logrus.New()
@ostinelli
ostinelli / jenkins_ci_on_osx.md
Last active February 28, 2023 02:38
Setup Jenkins CI on OSX.

Jenkins CI on OSX

Instructions on how to setup a secured Jenkins CI on a Mac.

Download & Install dependencies

All of these operations are done with your admin user.

Developer tools

Install the command line developer tools.

Deploying Elixir and Phoenix applications using Docker and Exrm

Goal

By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.

Assumptions

  1. You already have a working Elixir environment with the Phoenix Framework installed
  2. You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment
@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@holtbp
holtbp / BuildingPhoenixAPI.md
Last active June 26, 2023 18:01
Build and test Phoenix JSON API

Build and test a blazing fast JSON API with Phoenix, an Elixir framework

Original Post

Note: This guide was written for Phoenix 1.1.4. Parts of it may no longer work if you are using a newer version.

Let’s build a JSON API that serves a list of contacts. We’ll be writing it using Elixir (version 1.2.5) and Phoenix (version 1.1.4). Phoenix is a framework written in Elixir that aims to make writing fast, low latency web applications as enjoyable as possible.

Source Code: The source code after finishing this guide can be found here.