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 Fuel\Tasks; | |
class Mongo { | |
public function run() { | |
$file = \Fuel\Core\Config::load('db'); | |
$env = $file['mongo']['default']['hostname']; | |
exec('cd fuel/app/backup/ && mongodump --journal --host ' . $env . ' --port 27017 && tar -zcvf backup_'.date('Y-m-d-h-m-s').'.tar.gz dump && rm -rf dump;'); |
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 | |
# The files to ignore are already minified. | |
css_files_to_ignore=( | |
"jquery.colorbox-min.css" | |
); | |
js_files_to_ignore=( | |
"jquery.colorbox-min.js" |
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 | |
limpa() { | |
echo -e "\nDeleting existing minified files..." | |
find ../js -name \*.min.js -exec rm {} \; | |
find ../css -name \*.min.css -exec rm {} \; | |
} | |
comprime_js() { | |
echo -e "\nComprimindo e minificando o JavaScript..." |
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 Fuel\Tasks; | |
class Geo { | |
public static function run() { | |
$mongo = \Fuel\Core\Mongo_Db::instance(); | |
$process = $mongo->get_where('companies', array('address.geo' => array('$exists' => false))); | |
echo "STARTING Process \n"; |
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
public function getByLatLng($lat, $lng, $range = 5000 /* KM */, $earthRadius = 6378 /* Unit Earth Radius */) { | |
\Config::load('db'); | |
$mongoConf = \Config::get('mongo'); | |
$monga = \Monga::connection('mongodb://' . $mongoConf['default']['hostname'] . ':27017'); | |
$database = $monga->database($mongoConf['default']['database']); | |
$nameCache = 'company_get_by_' . $lat . '_' . $lng; | |
try { |
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 | |
Class API extends \CI_Model { | |
public $auth = array( | |
'appID' => 'web-based', | |
'secret' => 'secret' | |
); | |
public $permission; | |
public $urlAPI; |
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
alias git_core="cd ~/projects/00K_CORE && git pull" | |
alias git_api="cd ~/projects/00K_API && git pull" | |
alias git_docs="cd ~/projects/00k_docs && git pull" | |
alias git_interface="cd ~/projects/00K_INTERFACE && git pull" | |
alias git_web_commom="cd ~/projects/web/00k_zend_library/00k_common_library && git pull" | |
alias git_web_api="cd ~/projects/web/00k_zend_library/00k_api_library && git pull" | |
alias git_web_interface="cd ~/projects/web/00k_zend_library/00k_interface_library/ && git pull" | |
# Update all repos OOK | |
alias git_all="git_core; git_api; git_docs; git_interface; git_web_commom; git_web_api; git_web_interface" |
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
$utf = function ($value, $key) use (& $array) { | |
utf8_encode($array); | |
}; | |
array_walk_recursive($allArray, $utf); |
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
{ | |
group: [ | |
{ | |
id: "1280", | |
nome: "Saia Spoiler Para-choque Golf 95 96 97 GL GLX Mexicano", | |
imagem: null, | |
descricao: null, | |
valor: null, | |
peso: null, | |
loja_id: null, |
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
{"group":[{"id":"1280","nome":"Saia Spoiler Para-choque Golf 95 96 97 GL GLX Mexicano","imagem":null,"descricao":null,"valor":null,"peso":null,"loja_id":null,"id_prod":null,"quantidade":null,"frete":null,"frete_gratis":null,"desconto":null,"id_kit":null,"outros_dados":null,"itens":"0","id_produto_grupo":"176","childs":[{"id":"357","nome":"Lado Direito Passageiro","descricao":"Saia Spoiler Spolle Para-choque Golf 95 96 97 Gl GLX Mexicano Lado Direito Passageiro Larga","valor_original":"49.90","valor_venda":"41.90","foto":null,"loja_id":"100","peso":"350"},{"id":"358","nome":"Lado Esquerdo Motorista","descricao":"Saia Spoiler Spolle Para-choque Golf 95 96 97 Gl GLX Mexicano Lado Esquerdo Motorista","valor_original":"49.90","valor_venda":"41.90","foto":null,"loja_id":"100","peso":"350"},{"id":"358","nome":"Lado Esquerdo Motorista","descricao":"Saia Spoiler Spolle Para-choque Golf 95 96 97 Gl GLX Mexicano Lado Esquerdo Motorista","valor_original":"49.90","valor_venda":"41.90","foto":null,"loja_id":"100","peso":" |
OlderNewer