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 | |
/** | |
* @param $url | |
* @param $apiKey | |
* @return mixed | |
*/ | |
function isMobileReady($url, $apiKey) | |
{ | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( |
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
/** | |
* @author Shaharia Azam <shaharia.azam@gmail.com> | |
*/ | |
angular.module('services', ['ngResource']). | |
factory("notesService", function ($resource) { | |
return $resource('/notes'); | |
}); | |
var app = angular.module('myApp', ['ngResource', 'services']); |
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 | |
$erp = new Erp(); | |
$getPartnersInvoice = $erp->search('account.invoice', array(array('partner_id', '=', 57), array('state', '=', 'open'))); | |
$getPartnersInvoiceDetails = $erp->read('account.invoice', array($getPartnersInvoice)); | |
//var_dump($getPartnersInvoiceDetails); die(); | |
$dataVoucher = array( | |
'journal_id' => (int)$getPartnersInvoiceDetails[0]['journal_id']['data']['value'][0]['int'], |
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
location ~ \.php/?(.*)$ { | |
fastcgi_connect_timeout 3000s; # default of 60s is just too long | |
fastcgi_read_timeout 1000s; # default of 60s is just too long | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
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
############### Vartual Host PIGI ORDER PORTAL (Accounts) ####################### | |
server { | |
listen 80; | |
server_name accounts.pop.dev; | |
root /var/www/pop/accounts/webroot/; | |
access_log /var/log/nginx/accounts-pop.access.log; | |
error_log /var/log/nginx/accounts-pop.error.log; | |
location / { |
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 class="panel panel-default"> | |
<div class="panel-body"> | |
<div class="panel-info"> | |
<div class="folded"> | |
<h2 style="background-color: #DB874A;">CakePHP</h2> | |
</div> | |
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 | |
//@URL http://stackoverflow.com/questions/1268378/create-ini-file-write-values-in-php?answertab=votes#answer-1268642 | |
function write_ini_file($assoc_arr, $path, $has_sections = FALSE) | |
{ | |
$content = ""; | |
if ($has_sections) { | |
foreach ($assoc_arr as $key => $elem) { | |
$content .= "[" . $key . "]\n"; | |
foreach ($elem as $key2 => $elem2) { |
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
$(document).ready(function(){ | |
var a = $('.navbar-nav a'); | |
a.each(function(){ | |
if(window.location.href == $(this).attr('href')){ | |
$(this).closest('li').addClass('active'); | |
} | |
}) | |
}) |
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 MDC_IpManagerClass{ | |
public $MyIp = $_SERVER['REMOTE_ADDR']; | |
//................................................... | |
// more code snippet | |
//................................................... | |
} | |
/** | |
* Here $MyIp is just a class property declaration. It can't holds any EXPRESSION. |
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 class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">02 RAMADAN - RAHMAT</h3> | |
</div> | |
<div class="panel-body"> | |
<h1>29 June 2014</h1> | |
<h2>(SUNDAY)</h2> | |
<h3 class="sehri">Sehri: 03:42 AM</h3> | |
<h3 class="iftar">IFTAR: 06:49 PM</h3> | |
</div> |