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 defined('SYSPATH') or die('No direct script access.');?> | |
<?if (Model_Category::current()->loaded() AND Model_Category::current()->id_category!=1):?> | |
<?=View::factory('pages/ad/listing_overview')?> | |
<?else:?> | |
the HMTL you had before that loads categories | |
<?endif?> |
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
Verifying I am +chema on my passcard. https://onename.com/chema |
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 FraudLabsPro { | |
private $apiKey; | |
public function __construct($apiKey=''){ | |
if(!preg_match('/^[A-Z0-9]{32}$/', $apiKey)) | |
throw new exception('FraudLabsPro: Invalid API key provided.'); | |
$this->apiKey = $apiKey; | |
} |
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 | |
folders=(folder1 /my/otherfolder/ /var/www/openclassifieds2/) | |
for i in "${folders[@]}" | |
do | |
foo+=(--tab -e "bash -c 'cd "$i";git pull;git status';bash") | |
done | |
gnome-terminal "${foo[@]}" |
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 | |
/** | |
* HTML template for the install | |
* | |
* @package Install | |
* @category Helper | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2014 Open Classifieds Team | |
* @license GPL v3 |
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
/** | |
* CSV file to array | |
* @param file $csv | |
* @param array $expected_header | |
* @param boolean $convert_object you want it returned as an object? | |
* @param string $delimiter | |
* @param string $enclosure | |
* @return array | |
*/ | |
public function csv_to_array($csv,$expected_header=NULL,$convert_object = FALSE, $delimiter = "," , $enclosure = '"') |
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 | |
/** | |
* HTML template for the install | |
* | |
* @package Install | |
* @category Helper | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2014 Open Classifieds Team | |
* @license GPL v3 |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name | |
yourdomain.com | |
; | |
root /var/www/openclassifieds; | |
proxy_set_header Host $host; |
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
<? | |
/** | |
* checks if a domain name is valid | |
* @param string $domain_name | |
* @return bool | |
*/ | |
public static function domain_name($domain_name) | |
{ | |
//FILTER_VALIDATE_URL checks length but..why not? so we dont move forward with more expensive operations | |
$domain_len = strlen($domain_name); |
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 | |
/** | |
* HTML template for the install | |
* | |
* @package Install | |
* @category Helper | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2014 Open Classifieds Team | |
* @license GPL v3 | |
*/ |