Skip to content

Instantly share code, notes, and snippets.

Jay Holtslander JayHoltslander

Block or report user

Report or block JayHoltslander

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
View Bulk WebP convert.sh
find ./ -type f -name '*.jpg' -exec sh -c 'cwebp -q 75 $1 -o "${1%.png}.webp"' _ {} \;
View Animated List Items in Bootstrap 3.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Animated List Items in Bootstrap</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
@JayHoltslander
JayHoltslander / Multi-column CSS
Last active Jan 31, 2019
Split a paragraph into multi columns like a newspaper with this CSS3. Text will automatically fill the columns. You can use this within a single Bootstrap column to simulate multi-column layout without needing to add extra divs for extra columns.
View Multi-column CSS
p.4columns {
-webkit-column-count: 4; /* Chrome, Safari, Opera */
-moz-column-count: 4; /* Firefox */
column-count: 4;
-webkit-column-gap: 20px; /* Chrome, Safari, Opera */
-moz-column-gap: 20px; /* Firefox */
column-gap: 20px;
column-rule-color: #ccc; /* Optional */
column-rule-style:solid; /* Optional */
column-rule-width: 1px; /* Optional */
@JayHoltslander
JayHoltslander / private-wp-admin
Created Nov 14, 2018
Redirect unauthorized IP addresses that try to access Wordpress' wp-admin
View private-wp-admin
#REDIRECT UNAUTHORIZED IP ADDRESSES THAT TRY TO ACCESS WP-ADMIN
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
# IF YOU WANT INTO THE WORDPRESS ADMIN AREA...
RewriteCond %{REQUEST_URI} ^/wp-admin.*
# AND YOU'RE NOT ON ONE OF THESE IP ADDRESSES...
@JayHoltslander
JayHoltslander / deactivate-plugins-on-domain.php
Last active Oct 23, 2018 — forked from subharanjanm/deactivate-plugins-wpe-staging.php
Deactivate certain Wordpress plugins when running on the development/staging domain
View deactivate-plugins-on-domain.php
<?php
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$plugins = array(
'wordpress-seo/wp-seo.php',
'broken-link-checker/broken-link-checker.php'
);
if ( strpos(get_site_url(), 'devserver.com') !== false ) {
deactivate_plugins( $plugins );
}
else {
@JayHoltslander
JayHoltslander / COMPLETE.html
Created May 4, 2014
Bootstrap 3 Page with a full height sidebar
View COMPLETE.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Sidebar</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
View gist:c1c4e7f72e803a30a5466a69c5fe4927
Alberta
British Columbia
Manitoba
New Brunswick
Newfoundland and Labrador
Northwest Territories
Nova Scotia
Nunavut
Ontario
Prince Edward Island
View List - Canadian Cities.txt
Abbotsford
Airdrie
Armstrong
Barrie
Bathurst
Belleville
Brampton
Brandon
Brant
Brantford
@JayHoltslander
JayHoltslander / 5 even columns in Bootstrap 3.md
Last active Oct 18, 2017
5 even columns in Bootstrap 3
View 5 even columns in Bootstrap 3.md

#5 even columns in Bootstrap 3

Bootstrap can easily make 1,2,3,4, or 6 equally sized columns. But what if you want 5? Well the grid doesn't support it out of the box. You have to add a bit of CSS to Bootstrap and add a class to your row.

The HTML

Write your HTML as if you were creating columns to fit a grid width of 10 as opposed to 12. The example below shows 5 columns with a width of 2.

<div class="row fivecolumns">
View non-critical.css
.non-critical {
background-color: yellow; text-align:center; padding:30px; height:20%;
}
.non-critical a {color:black;}
You can’t perform that action at this time.