Skip to content

Instantly share code, notes, and snippets.

defmodule ExJob.Pipeline do
@moduledoc """
A Pipeline represents the workflow for enqueueing and consuming work
from a single queue.
Each pipeline can have different queue, worker pool and dequeue strategies.
"""
use Supervisor
require 'spec_helper'
require 'tracker_flow/web/lib/auth/token'
describe TrackerFlow::Web::Auth::Token do
let(:user) do
evt = TrackerFlow::Events::UserCreated.new(
user_id: 1,
login: 'jon',
name: 'Jon Brown',
email: 'jon@brown.com',
require 'jwt'
module TrackerFlow
module Web
module Auth
class Token
class InvalidToken < StandardError; end
PRIVATE_KEY = ENV['JWT_PRIVATE_KEY'] || fail('no private key found')
KEY = OpenSSL::PKey::RSA.new(PRIVATE_KEY)
let(:resources_hash) do
{
interactions: {
create: [{
uuid: 'this-is-a-uuid',
service_id: Service.first.id,
manual_alarm_state: 'ok',
finish_at: Time.zone.now,
responsible_person_ids: [carer.id]
},
require 'socket'
require 'uri'
class Proxy
def initialize(port)
@port = port
end
attr_reader :port
require 'erubi'
# # Problem
#
# Creating reports involves rendering HTML from templates. We are currently
# using Rails for this, but as Rails is meant to serve web requests, their
# template rendering engine will render templates in memory.
#
# This is a constraint for reports as they might have hundred of pages and
# therefore occupy hundreds of megabytes of memory.
set listchars=tab:>.,trail:.,extends:#,nbsp:. " show white space
(function() {
'use strict';
var HelpVideos = function() {
return {
videos: [{
category: {
id: 1,
title: 'Administration'
},
@eidge
eidge / .zshrc
Created September 27, 2017 12:48
export PATH="$GOPATH/bin:./node_modules/.bin/:./bin:$HOME/.rbenv/bin:$HOME/npm/bin:$HOME/.rbenv/shims:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$PATH"
- role: geerlingguy.nodejs
tags: node
become: yes
nodejs_version: "6.x"
nodejs_install_npm_user: "{{ deploy_user }}"
nodejs_npm_global_packages:
- yarn