Skip to content

Instantly share code, notes, and snippets.

View euccas's full-sized avatar

Euccas Chen euccas

View GitHub Profile
@euccas
euccas / image_hover_overlay.html
Last active June 8, 2020 02:09
Add an overlay effect on a link (image).Example: http://carmentang.co/
<a class="post-overlay" href="http://carmentang.co/callahan-realty-group/" rel="bookmark" title="Callahan Realty Group">
<p class="view">View →</p>
</a>
.posts .post .post-overlay, .post-navigation a, .post-navigation a p {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
@JosephPecoraro
JosephPecoraro / shell-execution.rb
Last active September 10, 2023 10:12
Shell Execution in Ruby
# 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: http://ruby-doc.org/core/classes/Kernel.html#M001111