This file contains hidden or 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 | |
/** | |
* Created by Chris Hardcastle to run cron jobs | |
* Based on the default kohana 2.3.4 index.php | |
* Note the required #! stated above | |
* CRON TAB USAGE (To run twice a day) | |
0 0,12 * * * /usr/bin/php [root][site]/cron.php --controller --method | |
* | |
* Use the shebang --> #!/usr/bin/php (should you need it, thanks @spolster) | |
*/ |
This file contains hidden or 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(){ | |
$(".pagination") | |
.find("a") | |
.removeClass("selected") | |
.end() | |
.find("a[href="+$(this).attr("href")+"]") | |
.addClass("selected"); | |
})(jQuery) |
This file contains hidden or 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
/* | |
* Written by Chris Hardcastle | |
* Pre-load an image using jQuery | |
* Example HTML layout | |
<div id="globalInner"> | |
<div id="loading"><!-- css loading gif --></div> | |
<div id="stage"></div> | |
</div> | |
*/ | |
/* |
This file contains hidden or 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
find ./ -name "*.css" -print0 | xargs -0 -I xxx mv xxx css/ |
This file contains hidden or 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
<!Doctype html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load('jquery','1.3.2') | |
</script> | |
</head> | |
<style type="text/css"> | |
#thumb{ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Site name</title> | |
</head> | |
<body></body> | |
</html> |
This file contains hidden or 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
// from http://thefinerstuff.posterous.com/git-saved-my-day-restore-accid | |
git ls-files -d | xargs git checkout -- |
This file contains hidden or 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
/* | |
* Read the Homepage XML file and get the snippets | |
* from file | |
*/ | |
public List<string> get_homepage_snippets() | |
{ | |
List<string> snippets = new List<string>(); | |
XmlTextReader reader = new XmlTextReader(Server.MapPath("~/Data/homepage.xml")); | |
while (reader.Read()) |
This file contains hidden or 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
## Automate FTP uploads | |
## Go to destination | |
cd C:\Test | |
$location = Get-Location | |
"We are here: $location" | |
## Get files | |
$files = Get-ChildItem -recurse | |
## Get ftp object | |
$ftp_client = New-Object System.Net.WebClient | |
$ftp_address = "ftp://user:pass@adress:/home/chardcastle/test" |
OlderNewer