Skip to content

Instantly share code, notes, and snippets.

Alex Peck alxpck

Block or report user

Report or block alxpck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alxpck
alxpck / preheader_preview_text.html
Created Nov 6, 2018
Adding preheader preview text to emails
View preheader_preview_text.html
<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 Apr 25, 2018
Response object from using a tag filter on Discourse
View discourse_tag_filter_response.js
{
"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,
View paypal_ipn_listener__draft.py
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
View wp-config (alt16)
<?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
*/
View stickynav_fix_logged_out.css
/* 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; }
View More videos link
View nav_menu_padding_fix.css
@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;
}
}
View stickynav_fix_php_template.php
/**
* 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');
View video embed for student site
<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>
View stickynav_fix.css
@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;
}
}
You can’t perform that action at this time.