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 | |
class FooFactory extends Nette\Object | |
{ | |
private $link; | |
public function injectLinkProvider($provider) | |
{ | |
$this->link = callback($provider); | |
} |
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 | |
function work(){ | |
echo "1"; | |
} | |
while(!sleep(1)) work(); |
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 | |
/** | |
* PostsImporter.php | |
* | |
* @author Jiří Šifalda <[email protected]> | |
* @package Flame | |
* | |
* @date 11.12.12 | |
*/ |
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
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "enlan/categorymodule", | |
"version": "master", | |
"source": { | |
"url": "<git-url>", | |
"type": "git", | |
"reference": "master" |
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
# Create local repo | |
cd ~ | |
mkdir repositories | |
cd repositories | |
mkdir localRepo.git | |
cd localRepo.git | |
git init --bare --shared=true | |
# Add remote to local repo in your project | |
cd myProject |
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
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "vendor/package", | |
"version": "1.0.0", | |
"dist": { | |
"url": "http://example.org/package.zip", | |
"type": "zip" | |
}, |
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
var deps = [ | |
'/js/libs/jquery.min.js', | |
'/js/libs/address.min.js', | |
'/js/libs/ui.min.js', | |
'/js/libs/prefixfree.min.js', | |
'/js/libs/modernizr.js', | |
'/js/libs/jqtube.js', | |
'/js/core.js', | |
'/js/yt.js', |
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 | |
/** | |
* CountryFacade.php | |
* | |
* @author Jiří Šifalda <[email protected]> | |
* | |
* @date 01.12.12 | |
*/ | |
class CountryFacade extends \Nette\Object |
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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
echo "[PRECOMMIT HOOK] Running tests" | |
if [[ -e "libs/bin/phpunit" ]]; then | |
if [[ -d "tests" ]]; then |
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 | |
function powerSet($in,$minLength = 1) { | |
$count = count($in); | |
$members = pow(2,$count); | |
$return = array(); | |
for ($i = 0; $i < $members; $i++) { | |
$b = sprintf("%0".$count."b",$i); | |
$out = array(); | |
for ($j = 0; $j < $count; $j++) { |