Skip to content

Instantly share code, notes, and snippets.

@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%')
@egi
egi / index.ctp
Last active August 14, 2018 14:26
CakePHP sample with custom query and pagination.
<?php pr($list); ?>
@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.
<?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 / 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-
# complete case insensitively
set completion-ignore-case on
# makes completion of file and directory names easier
set show-all-if-ambiguous on
@egi
egi / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@egi
egi / ping packet lost
Last active August 29, 2015 14:15
20150218. Cannot connect to 202.78.200.140.
nopro:~ egi$ ping 202.78.200.140
PING 202.78.200.140 (202.78.200.140): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
--- 202.78.200.140 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
@egi
egi / gist:5cb3df03b79b17f0c0d1
Last active August 29, 2015 14:17
nuskin, mlm
http://brontecapital.blogspot.com/2013/07/good-and-bad-mlms-pampered-chef.html
nuskin is stated 'at the other end compared to the gold-standard for MLM'
http://pyramidschemealert.org/nu-skin-facing-the-ultimate-whistle-blower/
is having dirty laundry exposed...
http://isnuskinascam.com/
helps to recover from mlm victims
http://www.mlm-thetruth.com/research/mlm-statistics/nuskins-numbers/
@egi
egi / gist:d17083685241d2147b5d
Last active August 31, 2023 09:01
creating rate limiting rule with mod_security
http://sourceforge.net/p/mod-security/mailman/message/30634837/
global and ip cannot be set per appid.
http://johnleach.co.uk/words/1073/rate-limiting-with-apache-and-mod-security
basic rules for rate-limiting incoming traffic
https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_security-with-apache-on-debian-ubuntu
the instruction here helps in debugging mod_security
http://stackoverflow.com/questions/131681/how-can-i-implement-rate-limiting-with-apache-requests-per-second