Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am brendonwbrown on github.
  • I am brendonwbrown (https://keybase.io/brendonwbrown) on keybase.
  • I have a public key ASDT5NtnOt7AZGeZOtNp3b6WnfrtN9G2dK5KrYSVi8SViQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am brendonwbrown on github.
  • I am brendonwbrown (https://keybase.io/brendonwbrown) on keybase.
  • I have a public key ASBY-IfFZ2ATahCv-teJ-m4QihkjEXARRPelMgu0gEA80wo

To claim this, I am signing this object:

@Brendonwbrown
Brendonwbrown / Sticky Header
Created May 12, 2014 12:56
Create an animated sticy header with Html, jQuery, CSS3 transitions
WDD Animated Sitcky Header.
http://www.webdesignerdepot.com/2014/05/how-to-create-an-animated-sticky-header-with-css3-and-jquery/
HTML
<header><h1>Sticky Header</h1></header>
<img src="large-image.jpg" width="782" height="2000" alt="Big Image" />
@Brendonwbrown
Brendonwbrown / scrollfixer
Last active December 27, 2015 20:29
Set a scrolling element to fixed position after the page reaches a given point. Also you could use: http://imakewebthings.com/jquery-waypoints/ .
<div id='something'>Something! </div>
#something {
position:relative;
}
$(window).scroll(function(){
if ($(window).scrollTop() > 50){
$("#something").css({"top": ($(window).scrollTop()) -50 + "px"});
}
@Brendonwbrown
Brendonwbrown / shadowbox.setup
Created August 19, 2013 19:48
A custom setup for shadowbox.js
<script type="text/javascript">
Shadowbox.init({
skipSetup: true
});
window.onload = function () {
Shadowbox.setup("a.shadowboxclass", {});
};
$(document).ready(function(){
$('a.shadowboxclass').live('click',function(e){
@Brendonwbrown
Brendonwbrown / WP-config DB settings changer
Last active December 16, 2015 18:29
Update your WP-Config DB settings based on current environment.
# WP-Config File Changer
## Credit to Konstantin Kovshenin, a complete stranger who publishes nice things on the web.
### Nutshell: customize this code with various DB information and place it in wp-config.php file instead of corresponding config information. It instructs Wordpress to look for a different (empty) file in parent directory of local, development or production servers and serves up the appropriate config to wordpress.
### You will have to create empty env_local, env_development files in parent directories of your websites on corresponding servers.
<?php
if ( file_exists( dirname( __FILE__ ) . '/../env_local' ) ) {
// Local Environment
@Brendonwbrown
Brendonwbrown / WP_childLinks
Last active December 16, 2015 10:29
How to get a Wordpress child page navigation links to show on the parent page.