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:
#!/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) |
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 |
I hereby claim:
To claim this, I am signing this object:
# 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] } |
# Use it by including it directly in the unix-ruby script | |
def run_script_once | |
emails = %w[[email protected]] | |
path = "#{$0}.pid" | |
if File.exists?(path) | |
pid = IO.read(path).to_i | |
begin | |
if Process.getpgid(pid) |
# | |
# 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 } ) | |
# ] |
# 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<------ |
#!/bin/sh | |
emit() { | |
if [ "$arg_commit" = "1" ]; then | |
#echo " | $@" | |
echo " | $@" | |
$@ ## << make this the main command or run with `eval $@` | |
else | |
echo " | $@" | |
(exit 0) |
If you hate git submodule
, then you may want to give git subtree
a try.
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add
command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.
When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.
Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this: