Skip to content

Instantly share code, notes, and snippets.

View chaselivingston's full-sized avatar

Chase Livingston chaselivingston

View GitHub Profile
@chaselivingston
chaselivingston / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
function cl_disable_carousel() {
$id = url_to_postid( "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] );
$disable = false;
if ($id == 67) {
$disable = true;
}
return $disable;
}
add_filter('jp_carousel_maybe_disable', 'cl_disable_carousel');
// ==UserScript==
// @name Store Olark Helper
// @include https://chat.olark.com/*
// ==/UserScript==
var $ = unsafeWindow.jQuery;
// ------------------------------------------------------
// TOP BUTTONS
// ------------------------------------------------------
#subscribe-email input {
font-size:12px;
}
#subscribe-text p {
margin-bottom: 0;
}
function jetpackme_related_posts_headline( $headline ) {
$headline = sprintf(
'<h3 class="jp-relatedposts-headline"><em>%s</em></h3>',
esc_html( 'You Might Also Like:' )
);
return $headline;
}
add_filter( 'jetpack_relatedposts_filter_headline', 'jetpackme_related_posts_headline' );
.woocommerce ul.products li:nth-of-type(7) {
display: none;
}
<methodResponse>
<params>
<param>
<value>
<string>Hello!</string>
</value>
</param>
</params>
</methodResponse></pre></code></blockquote>
[response_body] => <div style="display:none;">
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<string>Hello!</string>
</value>
</param>
</params>
</methodResponse>
<?php
function jetpackme_no_related_posts( $options ) {
if ( in_category( array( 4, 10 ) ) ) {
$options['enabled'] = true;
} else {
$options['enabled'] = false;
}
return $options;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Webhosting zdarma pro každého">
<meta name="keywords" content="webhosting, freehosting, zdarma, multihosting">
<meta name="author" content="Endora.cz - info@endora.cz">
<meta name="robots" content="index, follow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="http://www.endora.cz/images/freehosting-endora-facebook.png">