Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)
$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
# The refinement module helps to inspect a composed source of meta-generated methods, | |
# which were defined via Module#module_eval or Module#class_eval methods | |
# in strings with interpolations. | |
# | |
# Unless this refinement is using, looking up for an actual source of such | |
# kind of method will result with a raw string literal with no interpolation applied. | |
# | |
# It's monkey patch the Module#module_eval and Module#class_eval methods to | |
# write a source with applied interpolation into a temporary file per method owner and | |
# substitutes an evaluted located path & lineno for the string. |
# frozen_string_literal: true | |
# Before (creates prepared statement for each varying size of given array): | |
# | |
# $ Post.where(id: [uuid1, uuid2]) | |
# => Post Load (0.6ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" IN ($1, $2) [["id", "a830f21d-a27b-4bde-8c05-6e5dd088712e"], ["id","531ee026-d60d-4a59-a9a5-d44c44578a98}"]] | |
# | |
# After (the only one statement for varying size of given array): | |
# | |
# $ Post.where(id: [uuid1, uuid2]) |
/* | |
* MIT License | |
* | |
* Copyright (c) 2023-2024 Fabio Lima | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
-- +--------+-------+-------+ | |
-- | init | mod | exp | | |
-- |--------+-------+-------| | |
-- | 6 | -1 | 5 | | |
-- | 5 | 0 | 4 | | |
-- | 4 | 1 | 6 | | |
-- | 3 | 0 | 3 | | |
-- | 2 | -1 | 1 | | |
-- | 1 | 0 | 2 | | |
-- +--------+-------+-------+ |
# This module can be used to easy make callable object or class | |
# to be used as a block argument with the <tt>&</tt> operator. It just | |
# implements the +to_proc+ method. | |
# | |
# == Examples: | |
# | |
# class Foo | |
# extend Yieldable | |
# | |
# def self.call(key, value) |
on run {input, parameters} | |
tell application "iTunes" | |
set theTrack to get current track | |
if theTrack's loved then | |
set loved of theTrack to false | |
display notification "Now is not loved" with title ¬ | |
"iTunes" subtitle theTrack's artist & " - " & theTrack's name ¬ | |
sound name "Tink" | |
else | |
set loved of theTrack to true |
on run {input, parameters} | |
tell application "iTunes" | |
set theTrack to get current track | |
if theTrack's disliked then | |
set disliked of theTrack to false | |
display notification "Now is not disliked" with title ¬ | |
"iTunes" subtitle theTrack's artist & " - " & theTrack's name ¬ | |
sound name "Tink" | |
else | |
next track |
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
#!/usr/bin/env bash | |
# | |
#/ Usage: app-env [[-e <DOTENV_FILE>]... ] [[-s <SOURCE_FILE>]... ] [--] <command> [<args>...] | |
#/ app-env [-h|--help] | |
#/ | |
#/ Executes a given command with environment variables loaded from dotenv files. | |
#/ Dotenv files are executed in current shell context, wrapped with `set -e'. | |
#/ Source files, which are set with the `-s' flag will be included after `set +e' | |
#/ It is possible to provide several files, just by using flags as many tymes as you need. | |
#/ |