Skip to content

Instantly share code, notes, and snippets.

View JayHoltslander's full-sized avatar
💭
I may be slow to respond.

Jay Holtslander JayHoltslander

💭
I may be slow to respond.
View GitHub Profile
@bwhli
bwhli / Redirect WordPress Logout to Home Page
Created July 7, 2015 04:54
Redirect WordPress Logout to Home Page
//* Redirect WordPress Logout to Home Page
add_action('wp_logout',create_function('','wp_redirect(home_url());exit();'));
@plasticbrain
plasticbrain / php-curl.php
Created September 11, 2012 01:10
PHP: Using cURL
<?php
// Initialize cURL
$ch = curl_init();
// The URL to load
curl_setopt($ch, CURLOPT_URL, 'http://www.url-to-load.com');
// Uncomment the following two lines to send POST data
// curl_setopt($ch,CURLOPT_POST, count($post_data_array));
@tribulant
tribulant / wp-config.php
Created January 20, 2017 11:02
WordPress Allow Unfiltered Uploads for wp-config.php
define('ALLOW_UNFILTERED_UPLOADS', true);
@razor-x
razor-x / README.md
Last active February 19, 2020 10:26
Load GitHub Gists asynchronously and optionally specify which file to show.

Load GitHub Gists asynchronously

This is now a Bower package: [gist-async]. [gist-async]: https://github.com/razor-x/gist-async

Requires jQuery.

Jekyll plugin included that modifies the gist markup added by its gist Liquid tag.

Load GitHub Gists asynchronously and optionally specify which file to show.

@liuyigh
liuyigh / wp_helper.sh
Last active February 21, 2020 19:58 — forked from phlbnks/wp_helper.sh
Utility script to help manage WordPress sites on an Serverpilot server (but not limited to SP)
#!/bin/bash
# Help / usage info.
USAGE=$'WordPress Helper script, adapted from Phil Banks (emirpprime@github) EasyEngine script for Serverpilot .\nWithout any args it will search /srv/users/serverpilot/apps for WordPress sites, loop over them in alphabetical order and check for core and plugin updates.\nAlso accepts:\n\t--sites=[space seperated list of site paths relative to /srv/users/serverpilot/apps]\n\t--update=[plugins|wp|all].'
# Die function for exiting on errors.
die () {
echo "${1}, exitting..." >&2 ; echo ; exit 1
}
@jaredatch
jaredatch / gist:1629862
Created January 17, 2012 23:54
Remove hentry from post_class()
<?php
/**
* Remove 'hentry' from post_class()
*/
function ja_remove_hentry( $class ) {
$class = array_diff( $class, array( 'hentry' ) );
return $class;
}
add_filter( 'post_class', 'ja_remove_hentry' );
@sahava
sahava / Facebook Pixel.tpl
Last active June 5, 2022 17:51
Facebook Pixel custom tag template for Google Tag Manager
___INFO___
{
"displayName": "Facebook Pixel",
"description": "This is a template prototype for the Facebook Pixel.",
"securityGroups": [],
"id": "cvt_temp_public_id",
"type": "TAG",
"version": 1,
"brand": {
@mikeygee
mikeygee / 01-before.html
Created May 7, 2012 07:45
truncate blog posts in jekyll
<!-- using the truncate filter -->
{% for post in site.posts limit:10 %}
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span>
{% if post.content.size > 2000 %}
{{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node -->
<a href="{{ post.url }}">read more</a>
{% else %}
{{ post.content }}
{% endif %}
@mw-ferretti
mw-ferretti / README.md
Last active January 28, 2023 20:44
Paypal button on markdown github

Steps:

<!-- Sample of code generated --> 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RGQ8NSYPA59FL">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/pt_BR/i/scr/pixel.gif" width="1" height="1">
@loschke
loschke / Bootstrap-thumbnail-hover-grid.html
Last active March 9, 2023 20:48
Bootstrap - Thumbnail Hover Caption with Tooltip Blog Article: http://goo.gl/x2GSQ
<!-- Bootstrap Markup -->
<div class="container">
<ul class="thumbnails" id="hover-cap"> <!-- add id attr to thumbnail list -->
<li class="span3">
<div class="thumbnail">
<div class="caption">
<h4>Caption Title</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<p><a href="#" class="btn btn-inverse" rel="tooltip" title="Preview"><i class="icon-eye-open"></i></a> <a href="#" rel="tooltip" title="Visit Website" class="btn btn-inverse"><i class="icon-share"></i></a></p>
</div>