Skip to content

Instantly share code, notes, and snippets.

View alxpck's full-sized avatar

Alex Peck alxpck

View GitHub Profile
@alxpck
alxpck / preheader_preview_text.html
Created November 6, 2018 20:30
Adding preheader preview text to emails
<div style="display: none !important; visibility:hidden; mso-hide:all; font-size:1px; color:#ffffff; line-height:1px; max-height:0px; max-width:0px; opacity:0; overflow:hidden;">
Insert hidden preheader text here
</div>
<div style="display: none !important; visibility:hidden; mso-hide:all; font-size:1px; color:#ffffff; line-height:1px; max-height:0px; max-width:0px; opacity:0; overflow:hidden;">
&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;
@alxpck
alxpck / discourse_tag_filter_response.js
Created April 25, 2018 18:54
Response object from using a tag filter on Discourse
{
"users": [{
"id": 8,
"username": "altmba",
"avatar_template": "/user_avatar/altmba00.altmba.com/altmba/{size}/13_1.png"
}],
"primary_groups": [],
"topic_list": {
"can_create_topic": true,
"draft": null,
def ipn_listener(ipndata):
'''
This module processes PayPal Instant Payment Notification messages (IPNs).
Code via PayPal's examples on GitHub: https://github.com/paypal/ipn-code-samples/blob/master/python/paypal_ipn.py
'''
import datetime
import sys
import urllib.parse
import requests
<?php
/**
* This config file is yours to hack on. It will work out of the box on Pantheon
* but you may find there are a lot of neat tricks to be used here.
*
* See our documentation for more details:
*
* https://pantheon.io/docs
*/
/* FIND .page.logged-out and change from 50px to 0px */
.page.logged-out { padding-top: 0px; }
/* FIND .logged-out .navbar-static-top {margin-top: 0px !important;} and remove the "!important" */
.logged-out .navbar-static-top { margin-top: 0px; }
/* ADD below to bottom of main css file */
.logged-out .navbar-static-top { margin-top: 50px; }
@media (max-width: 600px) {
.logged-out .navbar-static-top { margin-top: -20px; }
@media (min-width: 768px) and (max-width: 1200px) {
.navbar-static-top .navbar-nav>li>a,
.navbar-static-top .navbar-nav>li>a:focus,
.navbar-static-top .navbar-nav>li>a:hover {
padding-left: 10px;
padding-right: 10px;
}
}
/**
* Logged-out body class
*/
function logged_out_body_class($classes) {
if (! ( is_admin_bar_showing() ) ) {
$classes[] = 'logged-out';
}
return $classes;
}
add_filter('body_class', __NAMESPACE__ . '\\logged_out_body_class');
<div class="embed-responsive embed-responsive-16by9">
<iframe src="https://player.vimeo.com/video/125930979" width="500" height="281" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>
@media (min-width: 601px) and (max-width: 782px) {
body.logged-in .navbar-fixed-top {
top: 46px !important;
}
body.logged-in a.navbar-brand {
top: 44px !important;
}
}