Skip to content

Instantly share code, notes, and snippets.

View johanoloflindberg's full-sized avatar
💭
Ready to work 😃

WEBBAB johanoloflindberg

💭
Ready to work 😃
View GitHub Profile
@johanoloflindberg
johanoloflindberg / TypeKit embed code.php
Created July 4, 2017 03:54 — forked from ericrasch/TypeKit embed code.php
Different methods for loading TypeKit's embed code.
<?php
/**
* TypeKit's default embed code.
* Source: http://help.typekit.com/customer/portal/articles/649336-embed-code
* Avg. Load Time: 191ms; 198ms; 265ms
*/
?>
<script type="text/javascript" src="//use.typekit.net/xxxxxxx.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
@johanoloflindberg
johanoloflindberg / WP Ping Services
Created July 4, 2017 03:54 — forked from ericrasch/WP Ping Services
A list of ping services to use in the WordPress admin.
http://bing.com/webmaster/ping.aspx
http://blo.gs/ping.php
http://blog.goo.ne.jp/XMLRPC
http://blog.with2.net/ping.php
http://blogpingr.de/ping/rpc2
http://blogsearch.google.com/ping/RPC2
http://ping.bitacoras.com/
http://ping.fc2.com/
https://feedburner.google.com/fb/a/ping
http://ping.wordblog.de/
@johanoloflindberg
johanoloflindberg / WP Disable Comments.md
Created July 4, 2017 03:54 — forked from ericrasch/WP Disable Comments.md
If you need to completely shut off all comments/trackbacks/pingbacks in the WordPress Admin

To shut off all comments/trackbacks/pingbacks in the WordPress Admin, the steps for cleanup are:

@johanoloflindberg
johanoloflindberg / Set Custom WP Feeds.php
Created July 4, 2017 03:53 — forked from ericrasch/Set Custom WP Feeds.php
Add this code to your Theme's functions.php file.
<?php
/* =BEGIN: Remove WP generated junk from head
Source: http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/
---------------------------------------------------------------------------------------------------- */
function removeHeadLinks() {
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'feed_links_extra', 3 );

Proper HTML Formatting

Just wanted a simple resource for referencing the proper way to correctly format HTML code.

A Pen by Eric Rasch on CodePen.

License.

<section id="scrollNav-1" class="scroll-nav__section">
<h2>
Title with no class
</h2>
<div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.</p>
</div>
<hr>
</section>
@johanoloflindberg
johanoloflindberg / HTML5 Keyboard Input Types.js
Created July 4, 2017 03:53 — forked from ericrasch/HTML5 Keyboard Input Types.js
HTML5 Input Types for Touch Keyboards
$('<input type="email" id="lead_email_alt" name="lead[email]" required="required" placeholder="E-mail Address" class=" form field text _lead_email ">').insertAfter('input#lead_email');
$('input#lead_email').remove();
$('<input type="tel" id="lead_phone_alt" name="lead[phone]" required="required" placeholder="Phone Number" class=" form field text phone _lead_phone ">').insertAfter('input#lead_phone');
$('input#lead_phone').remove();
$('<input type="text" autocorrect="off" id="lead_address_alt" name="lead[address]" required="required" placeholder="Street Address" class=" form field text _lead_address ">').insertAfter('input#lead_address');
$('input#lead_address').remove();
$('<input type="number" pattern="\d*" id="lead_zipCode_alt" name="lead[zipCode]" required="required" placeholder="Zip Code" class=" form field text _lead_zipCode ">').insertAfter('input#lead_zipCode');
@johanoloflindberg
johanoloflindberg / Detect WordPress template file.php
Created July 4, 2017 03:53 — forked from ericrasch/Detect WordPress template file.php
Detect + display WordPress template file being used
<?php
/**
* Detect + display WordPress template file being used
* REF: http://www.wpmayor.com/output-name-of-wordpress-template-file-being-used/#comment-8221
*/
add_action('wp_head', 'show_template');
function show_template() {
global $template;
global $current_user;

Sublime Text Preferences

My personal settings for Sublime Text (Mac). Heavily borrowed from Wes Bos: https://gist.github.com/wesbos/a3b12cfda064a906ac04

To set the key bindings below, goto Sublime Text menu -> Preferences -> Key Bindings - User, paste the settings from below and save that file.

To set the user preferences below, type ⌘, in Sublime Text to bring up the Preferences.sublime-settings file, paste the settings from below and save that file.

Installed Packages

@johanoloflindberg
johanoloflindberg / 00 OS X app list.md
Created July 4, 2017 03:53 — forked from ericrasch/00 OS X app list.md
List of useful Mac apps I use daily + profiles for my home directory.

Mac OS X App List

Productivity Tools

  • Alfred Powerpack Powerpack is a set of incredibly powerful features for Alfred
  • Alfred Boosts your efficiency with hotkeys, keywords, text expansion and more
  • AppCleaner Drag-n-drop app uninstall
  • Caffeine keeps your Mac from going to sleep
  • Default Folder X Finder save location helper
  • Fantastical Menubar calendar app w/ natural language
  • GPG Suite secure communication and encrypting files