Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View revelt's full-sized avatar
🤗
hello

Roy Revelt revelt

🤗
hello
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>Email Title</title>
<style>
.ExternalClass * {
line-height: 100%;
@revelt
revelt / hexo - body with conditional classes
Created January 15, 2015 20:53
Hexo Body with conditional classes
<body class="<% if(is_home()){ %>body-front-page<% } %><% if(is_post()){ %>body-single-page<% } %><% if(is_archive()){ %>body-archive<% } %><% if(is_year()){ %>body-year<% } %><% if(is_month()){ %>body-month<% } %><% if(is_category()){ %>body-category<% } %><% if(is_tag()){ %>body-tag<% } %>">
//for example rrDivideCols
//#1:
rrDivideCols();
//#2:
$(window).bind('load', function() {
rrDivideCols();
});
@revelt
revelt / Hugo - categories or tags conditional title
Created April 7, 2015 06:54
Hugo - conditional title for tags/categories page
All articles
{{ if eq .Data.Plural "categories" }}
under category:
{{ else if eq .Data.Plural "tags" }}
tagged:
{{ end }}
@revelt
revelt / HTML - Read It Later share URLs
Created April 7, 2015 07:14
Various read-it-later content share URL's - Instapaper, Readability and Pocket
http://www.instapaper.com/hello2?url=____&title=____&description=____
http://www.readability.com/save?url={URLOFARTICLE}
https://getpocket.com/save?url=URL&title=TITLE
@revelt
revelt / dabblet.css
Last active August 29, 2015 14:26 — forked from Daniel-Hug/dabblet.css
A "deeper" indented text effect with the :before and :after pseudo-elements.
/**
* A "deeper" indented text effect with the :before and :after pseudo-elements.
*/
html, body {
height: 100%;
}
body {
margin: 0;
@revelt
revelt / css - pre code CSS setup
Created September 17, 2015 07:23
if you want fluid pre-code boxes that wrap their code content, but don't introduce hardcoded line breaks when you copy-paste, you need this
/*this is the best CSS setup for <pre> <code> chunks: */
pre{
display: block;
word-break: break-all;
word-wrap: break-word;
white-space: pre-wrap;
}
@revelt
revelt / gear.md
Last active November 19, 2016 13:10 — forked from joelhooks/gear.md
Podcasting Gear List
@revelt
revelt / run_letsencrypt
Created January 17, 2016 19:17 — forked from lgg/run_letsencrypt
Let's encrypt auto authenticator runner for multiply domains
#!/bin/bash
#Vars
web_service='nginx'
config_path='/usr/local/letssl/'
le_path='/opt/letsencrypt'
exp_limit=20;
#Func
function check_ssl {
@revelt
revelt / lazy-load-files.js
Last active April 1, 2016 21:15 — forked from seantunwin/lazy-load-files.js
Lazy load JavaScript files
/* This is a technique to lazy load your javascript files
* Handy for those pesky slow, load blocking off-site scripts
* function lazyLoad
* @s: String of path to file
*/
function lazyLoad(s) {
var d = window.document;
var b = d.body; /* appends at end of body, but you could use other methods to put where you want */
var e = d.createElement('script');