Skip to content

Instantly share code, notes, and snippets.

@psteinweber
psteinweber / functions.php
Created June 18, 2018 12:45 — forked from luizbills/example.php
Google Tag Manager in Elementor Canvas
// please, replace the GTM-XXXX
add_action( 'wp_head', 'custom_add_google_tag_manager_head', 0 );
function custom_add_google_tag_manager_head () {
?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
@psteinweber
psteinweber / iframe.html
Created June 13, 2018 07:21
Embed Responsively
<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='http://alistapart.com/article/responsive-web-design/' style='border:0'></iframe></div>
@psteinweber
psteinweber / gist:2cd6e21af719ef705afe45baac60888b
Created June 13, 2018 07:13
Create symbolic link for network drive (add this to login items)
ln -s /Volumes/Name ~/Desktop
@psteinweber
psteinweber / template.html
Created March 24, 2017 17:12 — forked from tinabeans/template.html
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@psteinweber
psteinweber / Font Awesome checkbox.css
Last active January 4, 2016 02:39
#fontawesome checkboxes
label {
font-weight: 400;
}
label p {
margin-top: -40px;
margin-left: 40px;
}
input[type="checkbox"] {
@psteinweber
psteinweber / functions.php
Last active January 3, 2016 18:29
#wordpress #thesis Custom header logo
/* ==========================================================================
Custom header logo
========================================================================== */
function custom_header() { ?>
<a href="/"><img src="/media/image.jpg" alt="alt text"></a>
<?php
}
remove_action('thesis_hook_header', 'thesis_default_header');
@psteinweber
psteinweber / wordpress-bloginfo-url.php
Created January 19, 2014 09:56
#wordpress bloginfo url link
<a href="<?php bloginfo( 'url' ); ?>/path" title="">
@psteinweber
psteinweber / functions.php
Last active January 3, 2016 18:29
#wordpress #thesis move nav below header
/* ==========================================================================
Move nav below header
========================================================================== */
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');
@psteinweber
psteinweber / wp-config.php
Last active January 3, 2016 16:09
#wordpress Set custom URL in wp-config.php (as described here: http://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php )
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
@psteinweber
psteinweber / Fade-in share buttons.css
Created January 13, 2014 08:56
This small gist allows creating "Share buttons" (or something else) which fade in and while the content is in the viewport.
.post-sharing-side {
position: fixed;
top: 50%;
right: 50%;
margin-right: -530px;
}