This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
class PostPublisher < Generator | |
safe false | |
def replace(filepath, regexp, *args, &block) | |
content = File.read(filepath).gsub(regexp, *args, &block) | |
File.open(filepath, 'wb') { |file| file.write(content) } | |
end | |
def generate(site) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# collections_filter.rb | |
# | |
# Filter individual Jekyll collections items based on arbitrary yam front matter variables. | |
# | |
# input - the collection array | |
# property - key to filter by | |
# value - desired value | |
# | |
# Returns the filtered array of objects | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a file named 'curl-format.txt': | |
time_namelookup: %{time_namelookup} s\n | |
time_connect: %{time_connect} s\n | |
time_appconnect: %{time_appconnect} s\n | |
time_pretransfer: %{time_pretransfer} s\n | |
time_redirect: %{time_redirect} s\n | |
time_starttransfer: %{time_starttransfer} s\n | |
----------\n | |
time_total: %{time_total} s\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<video width="1100" height="619" preload="metadata" poster="/wp-content/uploads/2014/10/here-they-come-16x9.jpg" controls> | |
<source src="/wp-content/uploads/2014/10/Sample-16x9-HD.mp4" type="video/mp4"> | |
<source src="/wp-content/uploads/2014/10/Sample-16x9-HD.webm" type="video/webm"> | |
<source src="/wp-content/uploads/2014/10/Sample-16x9-HD.ogv" type="video/ogg"> | |
</video> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- from http://backgrounds.cm/ --> | |
<table cellpadding="0" cellspacing="0" border="0" width="100%"> | |
<tr> | |
<td background="http://i.imgur.com/YJOX1PC.png" bgcolor="#7bceeb" valign="top"> | |
<!--[if gte mso 9]> | |
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;"> | |
<v:fill type="tile" src="http://i.imgur.com/YJOX1PC.png" color="#7bceeb" /> | |
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0"> | |
<![endif]--> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can do this relatively simple from the command line. Save your HTML, but also include the necessary SMTP headers at the top in the source. For this example I'll save the source as example.html in my home directory. | |
~/example.html: | |
From: sender@example.com | |
To: recipient@example.com | |
Subject: Test email | |
Mime-Version: 1.0 | |
Content-Type: text/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- For more info: http://www.emailonacid.com/blog/details/C13/a_how_to_guide_to_embedding_html5_video_in_email --> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Video in Email Test</title> | |
<style type="text/css"> | |
@media screen and (max-width:800px) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa | |
ssh username@remotehost mkdir -p .ssh | |
cat ~/.ssh/id_rsa.pub | ssh username@remothost 'cat >> .ssh/authorized_keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vim /etc/postfix/main.cf | |
Add the following to the 'relayhost' section: | |
relayhost = [smtp.gmail.com]:587 | |
smtp_sasl_auth_enable = yes | |
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd | |
smtp_sasl_security_options = noanonymous | |
smtp_use_tls = yes | |
smtp_sasl_mechanism_filter = plain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
OlderNewer