This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'uri' | |
class Proxy | |
def initialize(port) | |
@port = port | |
end | |
attr_reader :port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set listchars=tab:>.,trail:.,extends:#,nbsp:. " show white space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var HelpVideos = function() { | |
return { | |
videos: [{ | |
category: { | |
id: 1, | |
title: 'Administration' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- role: geerlingguy.nodejs | |
tags: node | |
become: yes | |
nodejs_version: "6.x" | |
nodejs_install_npm_user: "{{ deploy_user }}" | |
nodejs_npm_global_packages: | |
- yarn |
NewerOlder