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
// Try to transform path into socket name | |
// Change this lines | |
//try { | |
// $socket = Request::factory(implode('.', $request->getPath()), | |
// $request->getArguments(), | |
// $request->getTunnel())->getSocket(); | |
//} catch (\Exception $e) { | |
// throw new \RuntimeException($e->getMessage()); | |
//} | |
// into : |
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
# Default route rule | |
default: | |
controller: \App\ActionController | |
arguments: | |
- '/^[a-zA-Z]+$/' | |
action: | |
controller: \App\ActionController | |
arguments: | |
- '/^[a-zA-Z]+$/' |
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
//... | |
/** | |
* Serve HTTP request | |
* | |
* @param string | |
* @param string | |
* @return response | |
*/ | |
public function executeHttp($proxy = 'Home', $method = 'index', $id = NULL) | |
{ |
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 | |
namespace App; | |
use Juriya\Pattern\Observer; | |
use Juriya\ResponseHttp; | |
class CustomContent implements Observer { | |
public static function onExecute($observable, $arguments) |
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 namespace Gas; | |
/** | |
* CodeIgniter Gas ORM Packages | |
* | |
* A lighweight and easy-to-use ORM for CodeIgniter | |
* | |
* This packages intend to use as semi-native ORM for CI, | |
* based on the ActiveRecord pattern. This ORM uses CI stan- | |
* dard DB utility packages also validation class. |
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/bash | |
case "${1:-''}" in | |
'start') | |
if test -f /tmp/selenium.pid | |
then | |
echo "Selenium is already running." | |
else | |
java -jar /usr/lib/selenium/selenium-server-standalone-2.21.0.jar > /var/log/selenium/selenium-output.log 2> /var/log/selenium/selenium-error.log & echo $! > /tmp/selenium.pid | |
echo "Starting Selenium..." |
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
Vivas El Barca! |
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
{"foo":"bar","lorem":"ipsum"} |
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
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/objdetect/objdetect.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
const char* keys = | |
{ | |
"{i|input| |The source image}" | |
"{d|dir| |The resource directory}" | |
}; |
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
import cv2 | |
import sys | |
def detect(img,out): | |
color = (0,255,0) | |
cascade = cv2.CascadeClassifier("res/haarcascade_frontalface_alt.xml") | |
faces = cascade.detectMultiScale(img, 1.2, 2, 0, (100,100)) | |
if (faces == None): | |
print "None found!" | |
else: |