Skip to content

Instantly share code, notes, and snippets.

View mremond's full-sized avatar

Mickaël Rémond mremond

View GitHub Profile
@mremond
mremond / docker_migration.sh
Last active January 14, 2021 14:32
Migrate from Docker Hub to Github Container Registry
#!/bin/bash
# Script to move an image from Docker Hub to Github container registry
original_image="ejabberd/ecs"
target_image="processone/ejabberd"
target_acr="ghcr.io"
# list of tag matches to ignore (i.e. "beta|rc")
grep_filter="<none>"
# Download all image tags
docker pull $original_image --all-tags
@mremond
mremond / ejabberd.yml
Created October 15, 2019 09:36
OAuth2 example
###
### ejabberd configuration file
###
### The parameters used in this configuration file are explained at
###
### https://docs.ejabberd.im/admin/configuration
###
### The configuration file is written in YAML.
### *******************************************************
### ******* !!! WARNING !!! *******
@mremond
mremond / xmpp_websocket.go
Created October 11, 2019 14:06
xmpp_websocket.go
/*
xmpp_websocket is a demo client that connect on an XMPP server using websocket and prints received messages.ß
*/
package main
import (
"fmt"
"log"
"os"
@mremond
mremond / ejabberd.yml
Created April 19, 2019 08:46
ejabberd.yml file
###
### ejabberd configuration file
###
### The parameters used in this configuration file are explained at
###
### https://docs.ejabberd.im/admin/configuration
###
### The configuration file is written in YAML.
### *******************************************************
### ******* !!! WARNING !!! *******
@mremond
mremond / AppDelegate.swift
Created November 21, 2018 13:24
Fluux XMPP client example for Fluux XMPP v0.0.1
//
// AppDelegate.swift
// XMPPClientTest
//
// Created by Mickaël Rémond on 21/11/2018.
// Copyright © 2018 ProcessOne. All rights reserved.
//
import UIKit
import CoreData

Keybase proof

I hereby claim:

  • I am mremond on github.
  • I am mickael (https://keybase.io/mickael) on keybase.
  • I have a public key ASCxiwrSIj1XvUrO9-uGl5CXnWEUpIrwQh9Zj145PyPF_wo

To claim this, I am signing this object:

@mremond
mremond / MobileProvision.swift
Created November 9, 2018 09:11
Read mobile provisioning profile from Swift
//
// MobileProvision.swift
// Fluux.io
//
// Created by Mickaël Rémond on 03/11/2018.
// Copyright © 2018 ProcessOne.
// Distributed under Apache License v2
//
import Foundation
@mremond
mremond / things3-to-of3.applescript
Created September 19, 2018 09:37 — forked from matellis/things3-to-of3.applescript
Script to import from Things 3 into Omnifocus 3
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2 && https://gist.github.com/cdzombak/11265615
-- Added: OF3 & Things 3 compatibility; task order; areas/folders; tags
-- Empty your Things Trash first.
--
@mremond
mremond / dep.md
Last active February 9, 2018 09:40 — forked from subfuzion/dep.md
Concise guide to golang/dep

Overview

This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.

I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.

At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:

@mremond
mremond / writing-a-tsung-plugin.md
Last active January 7, 2024 14:29
Writing a Tsung Plugin

Writing a Tsung plugin

This is a simple tutorial on writing a tsung plugin and a repost of our ProcessOne tutorial.

Since tsung is used to test servers lets define a simple server for testing. myserver.erl provides 3 operations: echo, add and subtract.

myserver.erl assumes the first byte to be a control instruction followed by 2 or more byte data. The echo operation merely returns the byte data while add and subtract performs these operations on the 2 byte data before returning the results. See the code of myserver.erl for details.

We assume the source files for tsung-1.2.1 are available. This example was compiled using Erlang OTP R11B-3.