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 FunctionBodyReflection extends ReflectionFunction | |
{ | |
/** | |
* get the body of a function as a string | |
* | |
* @access public | |
* @param bollean $withDeclaration true to return entire function delcaration | |
* @return String | |
*/ |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Refined/Color Schemes/Monokai Refined.tmTheme", | |
"file_exclude_patterns":[ | |
".DS_Store", | |
"dump.rdb", | |
".git*" | |
], | |
"folder_exclude_patterns":[ | |
".git", |
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 expandtab | |
:set tabstop=4 | |
:retab | |
:set shiftwidth=4 | |
:syntax on |
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
post_max_size=100M | |
open_basedir = /var/www/vhosts | |
upload_max_filesize = 100M | |
date.timezone = America/New_York |
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> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link href="style.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="tags"></div> |
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
from zope.testbrowser.browser import Browser | |
from time import sleep | |
storyIds = range(1, 201) | |
rootUrl = "http://example.com/%s" | |
for storyId in storyIds: | |
url = rootUrl % (storyId) | |
browser = Browser("http://qrickit.com/qrickit_apps/qrickit_qrcode_creator_url.php") |
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
Show hidden characters
/** | |
* Basic LessCSS Build System for Sublime Text 2 | |
* | |
* Prerequisites: node.js, global lesscss node module | |
* How it works: | |
* 1. Create the folders "src/css" and "assets/css" in your project root | |
* 2. Put all your .less files into "src/css" | |
* 3. Open your main .less file and hit "Build" | |
* 4. Dance happily around your minified and compiled CSS file in "assets/css" | |
* 5. Profit |
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 | |
PriceCalculator::applyFilter('calculate', function($self, $args, $chain) { | |
// code here will get executed before the calculation has occurred | |
extract($args); //$qty, $item | |
$total = $chain->next($self, $args, $chain); | |
if (date('n') === "6") { |
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 Email { | |
protected $logger; | |
public function __construct(Logger $logger = null) { | |
$this->setLogger($logger); | |
} |
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
use lithium\action\Dispatcher; | |
use lithium\storage\Session; | |
use lithium\security\validation\RequestToken; | |
use lithium\action\Response; | |
Dispatcher::applyFilter('run', function($self, $params, $chain) { | |
$request = $params['request']; | |
$excludes = array('get', 'head', 'options'); |
OlderNewer