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 | |
include 'config.php'; | |
// This should go in your config.php ^^ | |
define('BASEPATH', dirname(__FILE__)); | |
// Also, convention is capitals for constants | |
define('NAME', "Tom"); | |
function tint($tinty){ |
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 | |
/* $board = " | |
+---+---+---+---+---+---+---+ | |
| | | | | | | | | |
+---+---+---+---+---+---+---+ | |
| | | R | | | | | | |
+---+---+---+---+---+---+---+ | |
| R | | R | W | | | R | | |
+---+---+---+---+---+---+---+ |
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 | |
function stylesheet($title = 'Home Page') | |
{ | |
$filename = trim(strtolower($title)); // EG: "Home Page" => "homepage" | |
echo '<link rel="stylesheet" href="../css/' . $filename . '.css" type="text/css" media="all" />'; | |
} |
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 | |
class Controller_Blog extends Controller { | |
/** | |
* This is a simple example, the class does not exist. There are much more | |
* things you would be able to do, this is just an example. | |
* | |
* Yes, I know this is all (kind of) currently possible, but this encapsulates | |
* the response and allows for nice things like advanced response caching. |
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
import simplejson, urllib | |
from sys import argv | |
class PHPFPM: | |
def __init__(self, agent_config, checksLogger, rawConfig): | |
self.agent_config = agent_config | |
self.checks_logger = checksLogger | |
self.raw_config = rawConfig | |
self.status_url = "http://127.0.0.1/status" |
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
// | |
// LESS - Leaner CSS v1.1.4 | |
// http://lesscss.org | |
// | |
// Copyright (c) 2009-2011, Alexis Sellier | |
// Licensed under the Apache 2.0 License. | |
// | |
(function (window, undefined) { | |
// | |
// Stub out `require` in the browser |
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
// | |
// LESS - Leaner CSS v1.1.4 | |
// http://lesscss.org | |
// | |
// Copyright (c) 2009-2011, Alexis Sellier | |
// Licensed under the Apache 2.0 License. | |
// | |
(function (window, undefined) { | |
// | |
// Stub out `require` in the browser |
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
<html> | |
<head> | |
<title>thing</title> | |
<style type="text/css"> | |
.section { | |
height: 600px; | |
background: red; | |
} | |
</style> |
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
$('#full').scroll(function() { | |
var el = false; | |
console.log('-----'); | |
$('.set').each(function(i, e) { | |
console.log($(e).offset().top - 32); | |
if (!el && ($(e).offset().top - 32) == 0) { | |
el = $(this); |
OlderNewer