Skip to content

Instantly share code, notes, and snippets.

@egi
egi / topup.log
Created May 24, 2014 22:25
topup masih selalu gagal untuk postpaid
2014-05-25 05:21:44,490 INFO [STDOUT] (http-0.0.0.0-8080-103) 25-05-2014 05:21:44,489|DEBUG|CommonHttpService|-|6285692973721|392003ADAC8FBBDB1450071BEC49F9EF|[url:http://10.128.81.78:7800/WLI_EAI_PROCESS/Servl
etEAISyncWSS;service:null;xmlReq:<?xml version="1.0" encoding="UTF-8"?> <ExtMessage xmlns="com/icare/eai/schema/evExtTopupAIRCS3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="com/ica
re/eai/schema/evExtTopupAIRCS3 evExtTopupAIRCS3.xsd "> <ExtTopupAIRCS3Req> <ServiceNumber>6285692973721</ServiceNumber> <Source>Portal</Source> <VoucherHRN>74301109556640</VoucherHRN> </ExtTopupAIRCS3Req> </ExtM
essage>]
2014-05-25 05:21:45,982 INFO [STDOUT] (http-0.0.0.0-8080-103) result = <ExtMessage xmlns="com/icare/eai/schema/evExtTopupAIRCS3Resp">
2014-05-25 05:21:45,982 INFO [STDOUT] (http-0.0.0.0-8080-103) <ExtTopupAIRCS3Resp>
2014-05-25 05:21:45,982 INFO [STDOUT] (http-0.0.0.0-8080-103) <ServiceNumber>6285692973721</ServiceNumber>
2014-05-25 05:21:45,982 INFO [STDOUT] (http-
<?xml version="1.0" encoding="UTF-8"?>
<ExtMessage xmlns="com/icare/eai/schema/evExtTopupAIRCS5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="com/icare/eai/schema/evExtTopupAIRCS5 evExtTopupAIRCS5.xsd ">
<ExtTopupAIRCS5Req>
<ServiceNumber>628159249374</ServiceNumber>
<Source>Portal</Source>
<VoucherHRN>40190371052087</VoucherHRN>
</ExtTopupAIRCS5Req>
</ExtMessage>
@egi
egi / MD5.cs
Last active August 29, 2015 14:01 — forked from irmansulaeman41/RC4.cs
Implementasi detect msisdn on windows phone. Known issues: silverlight does not support md5 hashing and native rc4.
//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Text;
// **************************************************************
// * Raw implementation of the MD5 hash algorithm
// * from RFC 1321.
// *
// * Written By: Reid Borsuk and Jenny Zheng
// * Copyright (c) Microsoft Corporation. All rights reserved.
@egi
egi / index.ctp
Last active August 14, 2018 14:26
CakePHP sample with custom query and pagination.
<?php pr($list); ?>
@egi
egi / gist:5982706
Last active December 19, 2015 16:18
SELECT `Shipment`.`hwb_code`,
CONCAT_WS(" ","HWB : ",Shipment.hwb_code,"BookingCode : ",if(Order.booking_code,Order.booking_code,"-"),"CWB : ",IF(VendorShipment.cwb_code,VendorShipment.cwb_code,"-"),"Ref : ",IF(OrderItem.reference,OrderItem.reference,"-"),"PO : ",IF(OrderItem.purchase_order,OrderItem.purchase_order,"-")) AS name
FROM `pure_kirim`.`shipments` AS `Shipment`
LEFT JOIN `pure_kirim`.`orders` AS `Order` ON (`Order`.`id` = `Shipment`.`order_id`)
LEFT JOIN `pure_kirim`.`order_items` AS `OrderItem` ON (`OrderItem`.`order_id` = `Shipment`.`order_id`)
LEFT JOIN `pure_kirim`.`vendor_shipments` AS `VendorShipment` ON (`VendorShipment`.`shipment_id` = `Shipment`.`id`)
WHERE ((`Shipment`.`hwb_code` LIKE '90%')
OR (`OrderItem`.`purchase_order` LIKE '90%')
OR (`OrderItem`.`reference` LIKE '90%')
OR (`Order`.`booking_code` LIKE '90%')
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/>
<soapenv:Body>
<get:GetSubsInfoResponse
xmlns:get="http://www.example.org/GetSubsInfo/">
<Tid>628588190194720130507124218</Tid>
<Msisdn>6281519307097</Msisdn>
<WSSMessage xmlns="com/icare/eai/schema/evWSSGetServiceClassAIRResp">
<WSSGetServiceClassAIRResp>
<ServiceNumber>6281450010213</ServiceNumber>
<Status>Success</Status>
<ErrorMessage/>
<ServiceClass>
<SCCode>7900</SCCode>
</ServiceClass>
</WSSGetServiceClassAIRResp>
</WSSMessage>
# (If it takes more than 10 seconds to load my pages, something is wrong)
Timeout 10
# (Note: I can set this lower if I know other processes will need more memory under load)
MaxClients 40
# (My site gets almost no traffic)
MinSpareServers 4
# (My server never uses memory, so extra apache children hanging around doesnot hurt me)
MaxSpareServers 20
@egi
egi / gist:1370233
Created November 16, 2011 14:53 — forked from chartjes/gist:1370214
Need help with a MySQL query
I have the following query:
SELECT COUNT( DISTINCT ( brand.id )), MONTH(u.created_at)
FROM brand
LEFT JOIN brand_admin_group bag ON brand.id = bag.brand_id
LEFT JOIN brand_admin_group_membership bagm ON bag.id = bagm.brand_admin_group_id
LEFT JOIN user u ON bagm.user_id = u.id
GROUP BY MONTH(u.created_at)
Results look like this:
<?php
/**
* diketahui tanggal tertentu (dalam YYYY-mm-dd), keluarkan semua minggu yang
* dalam range-nya memiliki tanggal di dalam bulan berjalan. minggu dimulai dari
* hari senin.
*
* @author Agastiya S. Mohammad <[email protected]>
**/