Skip to content

Instantly share code, notes, and snippets.

JosephPecoraro / shell-execution.rb
Last active March 12, 2023 21:44
Shell Execution in Ruby
View shell-execution.rb
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Synchronous (blocking)
# Returns the output of the shell command
# Docs:
dzuelke / flagged_mails_to_thl.applescript
Created January 29, 2012 22:46
AppleScript to import flagged messages from Mail into The Hit List
View flagged_mails_to_thl.applescript
on run
if not (application "Mail" is running and application "The Hit List" is running) then
end if
tell application "Mail"
repeat with _account in imap accounts
set _inbox to _account's mailbox "INBOX"
set _messages to (a reference to (every message of _inbox whose flagged status is true))
-- We must use this workaround, because the reference will self-update once we unflag a message, and that will get us just one of two flagged messages imported
gubi / fa-bounce.css
Last active November 24, 2022 20:58
Pulse animation for FontAwesome icons
View fa-bounce.css
.fa-bounce {
display: inline-block;
position: relative;
-moz-animation: bounce 1s infinite linear;
-o-animation: bounce 1s infinite linear;
-webkit-animation: bounce 1s infinite linear;
animation: bounce 1s infinite linear;
@-webkit-keyframes bounce {