Skip to content

Instantly share code, notes, and snippets.

@paulmist
paulmist / gist:1159156
Created August 20, 2011 14:14 — forked from Wilto/gist:1107253
Example Fade-y Slideshow Thing
.faderotate {
height: 250px;
position: relative;
width: 100%;
}
.faderotate .slide {
left: 0;
position: absolute;
top: 0;
@paulmist
paulmist / HTML5 CSS Display Reset.css
Created November 21, 2011 10:19
HTML5 CSS Display Reset
/* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section{
display:block;
}
@paulmist
paulmist / Chrome Small Window Bookmarklet
Created June 2, 2012 08:47
Open Chrome window, chromeless to set size. Can be expanded/contracted much smaller than regular window.
javascript:open(
location,
'iPhone:portrait',
'innerWidth='+(320+15)+'
,innerHeight='+(480+15)+'
,scrollbars=yes'
);
@paulmist
paulmist / HSBC.js
Created August 15, 2013 20:24 — forked from benjie/HSBC.js
/******************************
HSBC Personal Statement to CSV
v0.5
Copyright: Benjie Gillam (2012)
License: WTFPL v2.0 ( http://en.wikipedia.org/wiki/WTFPL )
Instructions:
Add the following bookmarklet to your browser:
@paulmist
paulmist / gist:54aa2a1a9151388ebc3a
Last active August 29, 2015 14:14
anti-spam .htaccess
SetEnvIfNoCase Referer semalt.com spambot=yes
SetEnvIfNoCase Referer econom.com spambot=yes
SetEnvIfNoCase Referer buttons-for-website.com spambot=yes
SetEnvIfNoCase Referer ilovevitaly.com spambot=yes
SetEnvIfNoCase Referer ilovevitaly.ru spambot=yes
SetEnvIfNoCase Referer darodar.com spambot=yes
SetEnvIfNoCase Referer 7makemoneyonline.com spambot=yes
SetEnvIfNoCase Referer myftpupload.com spambot=yes
SetEnvIfNoCase Referer priceg.com spambot=yes
SetEnvIfNoCase Referer cenokos.ru spam=yes
@paulmist
paulmist / gist:50419d98643a52c8a65d
Created February 18, 2015 10:34
ACF - Dynamically populate selected entries in Relationship field
add_filter('acf/load_value/name=name-of-relationship-field', function($value) {
if(empty($value)) {
$value = get_posts(array(
'post_type' => 'name-of-post-type',
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
'fields' => 'ids',
));
@paulmist
paulmist / trello-to-newsletter.py
Created January 25, 2016 19:56 — forked from jefftriplett/trello-to-newsletter.py
Trello to Newsletter builder
"""
Trello to Newsletter builder
This is heavily inspired by: https://changelog.com/trello-as-a-cms/
To install:
pip install click cached_property markdown py-trello
To run:
export TRELLO_APP_KEY=''
@paulmist
paulmist / 0_reuse_code.js
Created May 16, 2016 07:29
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
@paulmist
paulmist / ps-search-toggle
Created October 6, 2016 09:54
Search Toggle
<ul class="title-area">
<li class="name">
<span>
<a href="/">
<img class="logo" src="/assets/svg/logo.svg" onerror="this.src='/assets/png/logo.png'" alt="Patrolstore Logo"></a>
</span>
</li>
<!-- Added code -->
@paulmist
paulmist / wp-autopopulate-taxonomy
Created July 8, 2022 08:43 — forked from brenna/wp-autopopulate-taxonomy
WordPress function to auto-populate a taxonomy with a custom post type's entries.
function custom_tax_init(){
//set some options for our new custom taxonomy
$args = array(
'label' => __( 'My Custom Taxonomy' ),
'hierarchical' => true,
'capabilities' => array(
// allow anyone editing posts to assign terms
'assign_terms' => 'edit_posts',
/* but you probably don't want anyone