Create a file called layout.php
. Where you want the content to
appear add <?php echo $content ?>
. Here is an example:
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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</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
// The Babylonian Method | |
// http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method | |
// @param n - the number to compute the square root of | |
// @param g - the best guess so far (can omit from initial call) | |
function squirt(n, g) { | |
if (!g) { | |
// Take an initial guess at the square root | |
g = n / 2.0; | |
} | |
var d = n / g; // Divide our guess into the number |
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
class Table(Base): | |
id = Column(Integer, primary_key=True) | |
_name = Column('name', String(24)) | |
@property | |
def name(self): | |
return self._name; | |
@name.setter | |
def name(self, value): |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// Suggestions from golang-nuts | |
// http://play.golang.org/p/Ctg3_AQisl |
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 | |
# Favicon and Apple Touch Icon Generator | |
# | |
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several | |
# other formats used on modern websites. The following copies are generated: | |
# | |
# * apple-touch-icon-144x144-precomposed.png | |
# * apple-touch-icon-114x114-precomposed.png | |
# * apple-touch-icon-57x57-precomposed.png |
Try these rules:
(in www.domain.com's server block)
rewrite ^/$ http://domain.com permanent break;
rewrite ^/main(.*)$ http://domain.com$1 permanent break;
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 | |
/** | |
* Description of VideoStream | |
* | |
* @author Rana | |
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
*/ | |
class VideoStream | |
{ | |
private $path = ""; |
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/sh | |
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
#---------------------------------------------------- | |
# a simple mysql database backup script. | |
# version 2, updated March 26, 2011. | |
# copyright 2011 alvin alexander, http://devdaily.com | |
#---------------------------------------------------- | |
# This work is licensed under a Creative Commons | |
# Attribution-ShareAlike 3.0 Unported License; |
This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).
Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.
Switch to the master branch and make sure you are up to date:
OlderNewer