sudo apt-get install numlockx -y
sudo vim /usr/share/lightdm/lightdm.conf.d/40-pantheon-greeter.conf
# add this line:
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
# This app is an API only, that's why we set :json as response and as params. | |
# This is the Roda Router. | |
# This app used roda + hanami model + TRB; | |
# Those methods `present Ami::V1::Customer::Collection` are calls to the app Operations | |
# #present and #run are helper methods added to handle the response of an Operation. | |
# Basically when I `run` and operation and it is successful I'll just call Operation#decorated hash and transform it into JSON; | |
# If the operation failed then I'll create a json response with status: :unprocessable_entity and call the Operation#error.messages and add it to the json response. | |
module Ami | |
module V1 | |
class Routes < Roda |
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
class ManageableTimeRange < Range | |
def <=>(other) | |
leg_min(other) | |
end | |
def leg_min(other) | |
return -1 if self.min < other.min | |
return 0 if self.min == other.min | |
return 1 |
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
source 'https://rubygems.org' | |
ruby "2.2.3" | |
gem 'rack' | |
gem 'lotus-router' | |
gem 'lotus-validations' | |
gem 'trailblazer' | |
gem 'roar' | |
gem 'multi_json' |
https://gist.github.com/mrbongiolo/bbabbda0bbd8f57769a0
I receive a simple customer hash like that:
{ provider: 'local', name: 'Wilhelm Reich', email: '[email protected]' }
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
# Including this will change the way the Operation renders the contract | |
# | |
# TODO: so far, we only support JSON, but it's two lines to change to support any kind of format. | |
module Trailblazer::Operation::Decorator | |
def self.included(base) | |
base.inheritable_attr :_decorator_class | |
base.extend ClassMethods | |
end | |
module ClassMethods |
https://packagecontrol.io/installation
- Side Bar Enhancements
- Theme - Soda
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
<!-- app/views/associates/edit/_tab_relatives.html.erb --> | |
<!-- The render method is used to get the same data for the resourcesCollection | |
as I would get if I did a GET request later on to associates/relatives path | |
TODO: use a Decorator or something like it to fetch this data without the need | |
to render a view. --> | |
<%= react_component('RelativesPage', { | |
resourcesCollectionJSONInitialData: render( | |
template: 'relatives/index', | |
formats: :json, | |
locals: { :@relatives => @associate_relatives }), |