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
<img src="<?= base_url() ?>assets/images/photos/<?= $photo ?>" /> |
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
<div id="content"> | |
<div class="span-15"> | |
<h1>Resized Photos</h1> | |
<h2>Your photos are resized in the background. Press F5 to see has been resized</h2> | |
<? # render_partial('jobs/_list_files.php', array('files' => $files)); ?> | |
</div> | |
<div class="span-8 last" style="background-color:#c9c1a7;padding:20px;"> | |
<h1>Upload new photo</h1> |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Jobs extends MY_Controller { | |
private $upload_path; | |
function __construct() | |
{ | |
parent::__construct(); | |
log_message('debug', "Model Class Initialized [". get_class($this) ."]"); |
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 | |
# | |
# /etc/init.d/gearman-workers | |
#count="ps x -o pid,command | sed -n \"s/^ *\([0-9]*\) .*worker\.php.*/\1/p\" | wc -l" | |
#echo $count | |
case "$1" in | |
start) | |
# comando para iniciar o serviço |
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 | |
# NAME ........: pskiller | |
# AUTHOR ......: José Lopes de Oliveira Júnior | |
# DESCRIPTION .: | |
# Kills a process by a name. But it accepts non complete names, like | |
# netsc for NETSCape, or mac for eMACs. It also accepts the signal to kill | |
# the processes. A list of process can be eigther passed to the script, even | |
# combined with a process signal for all processes, like in the examples: | |
# $ pskiller ema fire soffice kick | |
# $ pskiller -9 xmm |
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 | |
$gmw = new GearmanWorker(); | |
$gmw->addServer(); | |
$gmw->addFunction("resize_image", "resize_image"); | |
# waiting for job | |
while($gmw->work()){ | |
if($gmw->returnCode() != GEARMAN_SUCCESS) 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 if (!defined('BASEPATH')) { exit('No direct script access allowed'); } | |
class AuthenticationService { | |
private $provider; | |
private $account; | |
private $CI; |
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 if (!defined('BASEPATH')) { exit('No direct script access allowed'); } | |
class ErpAuthentication implements Authentication { | |
public function authenticate(Account $account) | |
{ | |
#echo "ErpAuthentication::autenticate" . PHP_EOL; | |
$current_user = Account::find(array('provider'=>'erp','login'=> $account->login)); | |
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 if (!defined('BASEPATH')) { exit('No direct script access allowed'); } | |
class TwitterAuthentication implements Authentication { | |
private $CI; | |
public function __construct() | |
{ | |
$this->CI =& get_instance(); | |
$this->CI->load->library('tweet'); |
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 if (!defined('BASEPATH')) { exit('No direct script access allowed'); } | |
interface Authentication { | |
public function authenticate(Account $account); | |
} |