Skip to content

Instantly share code, notes, and snippets.

View jlengstorf's full-sized avatar
💭
partyin

Jason Lengstorf jlengstorf

💭
partyin
View GitHub Profile
@jlengstorf
jlengstorf / README.md
Last active August 29, 2015 14:07
Base typography for Hoverboard child themes

Default Typography for WordPress

Use this file to set up default responsive typography rules for a WordPress site.

WordPress Aligment Classes

Includes out-of-the-box support for WordPress alignment classes (.aligncenter, .alignleft, .alignright).

Automatically Set a Featured Image on WordPress Posts

Add these functions to your functions.php to automatically assign a featured image for each post.

Usage

This function must be called within the loop. The first parameter is the post content, and the second is the image size to load.

php
@jlengstorf
jlengstorf / README.md
Last active January 20, 2022 07:21
Bootstrap styling for Gravity Forms, LESS style.

Bootstrap Styles for Gravity Forms in LESS

Include these styles in any project using Bootstrap (with LESS) and Gravity Forms to add good baseline styles for your GF Forms.

@jlengstorf
jlengstorf / README.md
Created October 8, 2014 20:28
Adds responsive embedding to WordPress oEmbed content.

Responsive Embeds in WordPress

This snippet filters oEmbed output in WordPress (the_content()) to force responsive embeds.

Usage

To use, add the contents of responseive_embeds.less to your site's stylesheet (if you're not using LESS, don't forget to move the iframe,object,embed rule outside of .embed-container and change it to .embed-container iframe,.embed-container object,.embed-container embed).

Then add the responsive_embed() function to your theme's functions.php and insert the add_filter() call in your theme's setup function.

@staltz
staltz / introrx.md
Last active April 19, 2024 09:27
The introduction to Reactive Programming you've been missing
@jlengstorf
jlengstorf / README.md
Last active September 10, 2018 01:50
Removes the junk that wpautop adds to shortcodes in WordPress.

Remove Crappy Markup from WordPress Shortcodes

When using shortcodes in WordPress like so:

[shortcode]

Content goes here...

[/shortcode]

@jlengstorf
jlengstorf / .htaccess
Created February 28, 2013 21:59
Apache configuration for forcing a secure connection to the site.
# Force SSL
RewriteCond %{SERVER_PORT} !443$
RewriteRule ^(.*)$ https://www.example.org/$1 [L]
@jlengstorf
jlengstorf / wp-img-defaults.css
Created February 26, 2013 23:06
Default styling for WordPress image alignment and captions
/*
* Default WP Alignment Classes
*****************************************************************************/
.aligncenter,.alignleft,.alignright {
display: block;
padding: 0;
}
.aligncenter {
@jlengstorf
jlengstorf / git_rm_ls-files.sh
Last active December 12, 2015 08:28
Git command to remove all deleted files
# Removes all deleted files
git rm $(git ls-files -d)
# Removes deleted files in a given directory
git rm $(git ls-files -d path/to/subdir/.)
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).