Skip to content

Instantly share code, notes, and snippets.

View fleeting's full-sized avatar
🐢
As productive as this turtle.

James Fleeting fleeting

🐢
As productive as this turtle.
View GitHub Profile
@fleeting
fleeting / functions.php
Created May 23, 2013 15:28
WordPress - Remove Posts menu item in admin area.
/*-----------------------------------------------------------------------------------*/
/* Remove Unwanted Admin Menu Items */
/*-----------------------------------------------------------------------------------*/
function remove_admin_menu_items() {
$remove_menu_items = array(__('Posts'));
global $menu;
end ($menu);
while (prev($menu)){
$item = explode(' ',$menu[key($menu)][0]);
(function() {
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';',
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %> */'
$aPhoto = $this->dbQuery(
"SELECT * FROM `{dbPrefix}photocontest`"
." WHERE `id` = ".$this->dbQuote($id, "integer")
,"all""
);
$this->dbUpdate(
"photocontest",
array(
"votes" = $aPhoto["votes"]+1
@fleeting
fleeting / simpleWeather.sample-usage.js
Created October 30, 2012 22:32
Can I use different weather icons instead of Yahoo's? [example]
$.simpleWeather({
zipcode: '76309',
unit: 'f',
success: function(weather) {
html = '<h2>'+weather.city+', '+weather.region+'</h2>';
html += '<img style="float:left;" width="125px" src="images/weather/'+weather.code+'.png">';
html += '<p>'+weather.temp+'&deg; '+weather.units.temp+'<br /><span>'+weather.currently+'</span></p>';
html += '<a href="'+weather.link+'">View Forecast &raquo;</a>';
$("#weather").html(html);
@fleeting
fleeting / simpleWeather.usage.js
Created October 30, 2012 20:57
Full usage example for simpleWeather.js
// Docs at http://simpleweather.monkeecreate.com
$.simpleWeather({
zipcode: '76309',
woeid: '',
location: '',
unit: 'f',
success: function(weather) {
html = '<h2>'+weather.city+', '+weather.region+' '+weather.country+'</h2>';
html += '<p><strong>Today\'s High</strong>: '+weather.high+'&deg; '+weather.units.temp+' - <strong>Today\'s Low</strong>: '+weather.low+'&deg; '+weather.units.temp+'</p>';
html += '<p><strong>Current Temp</strong>: '+weather.temp+'&deg; '+weather.units.temp+' ('+weather.tempAlt+'&deg; C)</p>';
@fleeting
fleeting / simpleweather.demo.js
Created October 30, 2012 20:15
Sample usage for the simpleWeather plugin. http://simpleweather.monkeecreate.com
$.simpleWeather({
zipcode: '',
woeid: '2357536',
location: '',
unit: 'f',
success: function(weather) {
html = '<h2>'+weather.city+', '+weather.region+'</h2>';
html += '<img style="float:left;" width="125px" src="'+weather.image+'">';
html += '<p>'+weather.temp+'&deg; '+weather.units.temp+'<br /><span>'+weather.currently+'</span></p>';
html += '<a href="'+weather.link+'">View Forecast &raquo;</a>';
@font-face {
font-family: 'MedioRegular';
src: url('/fonts/Medio-webfont.eot');
src: url('/fonts/Medio-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/Medio-webfont.woff') format('woff'),
url('/fonts/Medio-webfont.ttf') format('truetype'),
url('/fonts/Medio-webfont.svg#MedioRegular') format('svg');
font-weight: normal;
font-style: normal;
}
$(document).ready(function() {
weather();
setInterval(weather, 15000);
});
function weather() {
$.simpleWeather({
zipcode: '19104',
unit: 'f',
success: function(weather) {
$(window).scroll(function() {
var pos = $(window).scrollTop();
var el = $('.side-info');
if(pos > 90 && el.is(':visible')) {
el.fadeOut('fast');
} else if(pos < 90 && el.is(':hidden')) {
el.slideDown('slow');
}
});
<!-- ORIGINAL -->
<hgroup>
<h1 class="pull-left"><a href="/">Family Hearing Center</a></h1>
<h2><a href="">Schedule an Appointment</a> or Call</h2>
<h3>{getSetting tag="phone"}</h3>
</hgroup>
<!-- UPDATED -->
<h1 class="pull-left"><a href="/" title="Family Hearing Center of Wichita Falls">Family Hearing Center</a></h1>