$ mysql_secure_installation
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
begin | |
require 'guard/zeus' | |
guard :zeus do | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^Gemfile.lock$}) | |
end | |
rescue LoadError | |
nil | |
end |
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
#!/usr/bin/env ruby | |
# Snippet to build command line executables like this: | |
# ./my_script command --opt-a "opt A" | |
require 'optparse' | |
require 'singleton' | |
require 'pry' | |
class Command |
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
# We can't use dynamic segment for the festivals because ActiveAdmin can't | |
# include it to default_url_options. So all named routes in admin will break. | |
Festival::KEYS.each do |festival_key| | |
scope festival_key do | |
scope ':locale', defaults: {locale: I18n.locale} do | |
devise_for :admin_users, ActiveAdmin::Devise.config | |
ActiveAdmin.routes(self) | |
end | |
end | |
end |
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
= attraction-weight($font-size) | |
&[data-weight="100"] | |
.name | |
span | |
font-size: $font-size * 1 | |
opacity: 1 | |
small | |
&.size-65 | |
font-size: $font-size * .65 |
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 middleware redirects routes without locale to a prefixed ones. | |
* Useful for links included on email templates. | |
*/ | |
export default function(context) { | |
const { route, redirect, app } = context | |
const { path, query } = route | |
const previousLocaleCode = app.i18n.getLocaleCookie() | |
const localeCodes = app.i18n.locales.map(l => l.code) |
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
/** | |
* from: | |
* "Decoupling Logic with Domain Events [Guide] - Domain-Driven Design w/ TypeScript" | |
* https://khalilstemmler.com/articles/typescript-domain-driven-design/chain-business-logic-domain-events/ | |
*/ | |
import { UseCase } from '../../../../core/domain/UseCase'; | |
import { CreateUserDTO } from './CreateUserDTO'; | |
import { Either, Result, left, right } from '../../../../core/logic/Result'; | |
import { UserEmail } from '../../domain/userEmail'; |
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
ActiveAdmin.register Event do | |
#Menu display index | |
menu :priority => 1 | |
#Scopes | |
scope :all | |
scope :pending | |
scope :approved | |
scope :rejected | |
scope :cancelled |
OlderNewer