Skip to content

Instantly share code, notes, and snippets.

@isaacraja
isaacraja / ajaxdom.js
Created April 19, 2010 10:40
Simple Dom/Event/Ajax
var Dom = {
get: function (el) {
if(typeof el === 'string')
{
return document.getElementById(el);
}
else
{
return el;
@isaacraja
isaacraja / one-file-lithium-app.php
Created November 10, 2010 10:59
One File Lithium App
<?php
use lithium\core\Libraries;
use lithium\net\http\Router;
use lithium\core\Environment;
/* define lithium library path */
define('LITHIUM_LIBRARY_PATH', dirname(__DIR__) . '/lithium/libraries');
if (!include LITHIUM_LIBRARY_PATH . '/lithium/core/Libraries.php') {
$message = "Lithium core could not be found. Check the value of LITHIUM_LIBRARY_PATH in ";
$message .= __FILE__ . ". It should point to the directory containing your ";
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');

Approach

  • We found that the bottle neck to be multiple rates call, quick add api call, few queries, database views
  • The Itinerary page will have a city level loader that preloads the required travels/activities/guides data for dropdowns
  • While a city is loading, the following things are inaccessbile
    • Adding a new city
  • The controls for a city will be enabled once the city loading is complete(Edit/Add/Delete services)
  • All the controls will be enabled once all the city load is complete(Add a new city)
  • The max loading time for all the cities to be kept under 8 secs.
  • The drop-downs for Add Travel, Add Activities, Add Guide, Add Hotel will be instantaneous after this.
(setq php-mode-coding-style (quote psr2))
dotspacemacs-configuration-layers
'(
php
auto-completion
)

Keybase proof

I hereby claim:

  • I am isaacraja on github.
  • I am isaacraja (https://keybase.io/isaacraja) on keybase.
  • I have a public key ASDOOOgKtP1SudU80x1G5-T96jchz4yrfxDXtu4G3V7_mwo

To claim this, I am signing this object:

@isaacraja
isaacraja / refactor.md
Last active January 25, 2018 07:57
Refactor
@isaacraja
isaacraja / pld.md
Created February 21, 2018 08:59
pld.md
- [PipelineDealService.php](#sec-1)
  - [getAllCustomFieldData() ->](#sec-1-1)
  - [sendCurlGetRequest($dealId) ->](#sec-1-2)
  - [getPrimaryGuestInfo($pldUserId) ->](#sec-1-3)
  - [getPeopleInfoById($pldUserId) ->](#sec-1-4)
  - [getDealInformation($dealId)->](#sec-1-5)
  - [updateNotes($pldId, $category<sub>id</sub>, $content) ->](#sec-1-6)
  - [getPersonByEmail($emailId)](#sec-1-7)
  - [createPerson($data)](#sec-1-8)

Artemis prod push Checklist

No of users

  • cron jobs setup required when we spin more servers
  • rates scalability considerations

Queues - running with single worker

  • Delayed emails based on the no of jobs in the queue
  • Delayed update to PLD

Security - testing@enchantingtravels.com

  • ID server security
  • testing@enchantingtravels.com account password is shared with lot of people
<?php
namespace Modules\Reports\Repositories\GuestPayment;
use Carbon\Carbon;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Modules\Booking\Models\Booking;
use Modules\Core\Repositories\BaseRepository;