Skip to content

Instantly share code, notes, and snippets.

View jeremyrwross's full-sized avatar

Jeremy Ross jeremyrwross

View GitHub Profile
@jeremyrwross
jeremyrwross / functions.php
Created March 13, 2015 20:39
Wordpress 301 redirect using functions.php
add_action('template_redirect','my_template_redirect');
function my_template_redirect() {
$redirect_to = false;
list($url_path,$params) = explode('?',$_SERVER['REQUEST_URI']);
$path_parts = explode('/',trim($url_path,'/'));
switch ($path_parts[0]) {
case 'wrongpage1.html':
$redirect_to = '/';
break;
case 'wrongpage2.php':
@jeremyrwross
jeremyrwross / get-sick.js
Last active August 29, 2015 14:15
Spin a Website - Using Font Awesome
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<script>
$(function(){
$('*').addClass('fa-spin');
});
</script>