I hereby claim:
- I am gamecreature on github.
- I am gamecreature (https://keybase.io/gamecreature) on keybase.
- I have a public key ASBZnzJJo6X4cy5Ftg2Hq68ULyE-TxgkagXk9z1fw5HSFAo
To claim this, I am signing this object:
#!/bin/sh | |
emit() { | |
if [ "$commit" = "1" ]; then | |
#echo " | $@" | |
echo " | $@" | |
$@ ## << make this the main command or run with `eval $@` | |
else | |
echo " | $@" | |
fi |
# Load DSL and set up stages | |
require 'capistrano/setup' | |
# Include default deployment tasks | |
require 'capistrano/deploy' | |
require "capistrano/scm/git" | |
install_plugin Capistrano::SCM::Git | |
# -8<-------8<-------8<-------8<-------8<-------8<------ |
# | |
# What does this do: | |
# | |
# Normal: (Basic library usage, without this helper) | |
# -------------------------------------------------- | |
# render turbo_stream: [ | |
# turbo_stream.replace(:flash, partial: 'shared/flash'), | |
# turbo_stream.replace(:object, partial: 'partial/name', locals: { object: object } ) | |
# turbo_stream.replace(:object2, partial: 'partial/name'2, locals: { object2: object2 } ) | |
# ] |
# Use it by including it directly in the unix-ruby script | |
def run_script_once | |
emails = %w[info@example.com] | |
path = "#{$0}.pid" | |
if File.exists?(path) | |
pid = IO.read(path).to_i | |
begin | |
if Process.getpgid(pid) |
# Schema Validations Concern - simple basic replacement for https://github.com/SchemaPlus/schema_validations | |
# | |
# Warning, uniqueness validators are NOT Added | |
# | |
# Constraints: | |
# - null: false => validates ... presence: true | |
# - limit: 100 => validates ... length: { maximum: 100 } | |
# | |
# Data types: | |
# - :boolean => :validates ... inclusion: { in: [true, false] } |
I hereby claim:
To claim this, I am signing this object:
module PunditExtensionHelper | |
# this method is the same as the pundit_scope method | |
# the difference is, it doesn't invoke the resolve method | |
def policy_scoper(scope_in, method = :resolve) | |
scope = scope_in.is_a?(Array) ? scope_in.last : scope_in | |
policy_scope_class = Pundit::PolicyFinder.new(scope).scope! | |
return unless policy_scope_class | |
begin |
#!/usr/bin/env ruby | |
# | |
# EMAIL extractor from Maildir (mbox files) | |
# | |
# extracts all emailadresses from a IMAP directory tree | |
chars = %w{ | / - \\ } | |
def find_email_addresses(base_folder) |