This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Enter the hostname you want to monitor (eg citypress.co.uk) and hit [ENTER]: " | |
read hostname | |
while true; do | |
newip=$(dig +short $hostname) | |
if [ "$newip" != "$previp" ]; then | |
if [ -z "$previp" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** This version only requires jQuery **/ | |
$("a[href*='#']").click(function(event) { | |
event.preventDefault(); | |
var full_url = this.href; | |
if(full_url !== '#') { | |
var parts = full_url.split("#"); | |
var trgt = parts[1]; | |
var target_offset = $("#" + trgt).offset(); | |
var target_top = target_offset.top; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var dates = $( "#from, #to" ).datepicker({ | |
defaultDate: "+1w", | |
numberOfMonths: 1, | |
beforeShow: function( ) { | |
var other = this.id == "from" ? "#to" : "#from"; | |
var option = this.id == "from" ? "maxDate" : "minDate"; | |
var selectedDate = $(other).datepicker('getDate'); | |
$(this).datepicker( "option", option, selectedDate ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @from_host = 'old-host.com'; | |
SET @to_host = 'new-host.com'; | |
UPDATE `wp_options` SET `option_value` = REPLACE(`option_value`, @from_host, @to_host); | |
UPDATE `wp_posts` SET `guid` = REPLACE(`guid`, @from_host, @to_host); | |
UPDATE `wp_posts` SET `post_content` = REPLACE(`post_content`, @from_host, @to_host); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
class CategoryAwareNextGenerator < Generator | |
safe true | |
priority :high | |
def generate(site) | |
site.categories.each_pair do |category_name, posts| | |
posts.sort! { |a, b| b <=> a } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%sprites { | |
display: inline-block; | |
background-repeat: no-repeat; | |
background-image: sprite-url($sprites); | |
} | |
@mixin sprite($name, $dimensions: true, $pad: 0) { | |
@if ($dimensions == true) { | |
@include sprite-dimensions($sprites, $name); | |
} |
NewerOlder