simple example of DataObjects
managed with ModelAdmin
filterable in the frontend
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/bash | |
#Copyright 11.11.13 Michell Gailing <[email protected]> | |
#It's Licensed under DWWWI 'Do whatever you want with it!' | |
wget http://www.okean.com/chinacidr.txt | |
sed -i '1,4d' chinacidr.txt | |
sed -i 's/ China//g' chinacidr.txt | |
ipset create china hash:net | |
while read line; do ipset add china $line; done < chinacidr.txt | |
iptables -I INPUT -m set --match-set china src -j DROP | |
rm chinacidr.txt |
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 | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
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
prod: | |
rm -rf ./bundle | |
mrt bundle bundle.tgz > /dev/null | |
tar -xzf bundle.tgz | |
rm -r bundle/server/node_modules/fibers | |
cd bundle/server && npm install [email protected] | |
clean: | |
rm -f ./bundle.tgz | |
rm -rf ./bundle |
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 | |
namespace ME\MainPageBundle\Response; | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
use Symfony\Component\Form\Form; | |
class FormErrorResponse extends JsonResponse { | |
public function __construct(Form $form, $status = 400, $headers = array()) { | |
$errors = $this->getFormErrors($form); |