Skip to content

Instantly share code, notes, and snippets.

View hanafiah's full-sized avatar
🏠
Working from home

Muhamad Hanafiah Yahya hanafiah

🏠
Working from home
View GitHub Profile
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE MONTH(datalog) = '3' AND YEAR(datalog) = '2012' GROUP BY link_id;
/* 0 rows affected, 233 rows found. Duration for 1 query: 173.062 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE datalog BETWEEN '2012-03-01 00:00:00' AND '2012-04-01 00:00:00' GROUP BY link_id;
/* 0 rows affected, 233 rows found. Duration for 1 query: 174.328 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE MONTH(datalog) = '3' AND YEAR(datalog) = '2012' GROUP BY crc32(link_id);
/* 0 rows affected, 233 rows found. Duration for 1 query: 4.859 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE datalog BETWEEN '2012-03-01 00:00:00' AND '2012-04-01 00:00:00' GROUP BY crc32(link_id);
/* 0 rows affected, 233 rows found. Duration for 1 query: 4.829 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE MONTH(datalog) = '3' AND YEAR(datalog) = '2012' GROUP BY link_id;
/* 0 rows affected, 233 rows found. Duration for 1 query: 174.312 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE datalog BETWEEN '2012-03-01 00:00:00' AND '2012-04-01 00:00:00' GROUP BY link_id;
/* 0 rows affected, 233 rows found. Duration for 1 query: 173.172 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE MONTH(datalog) = '3' AND YEAR(datalog) = '2012' GROUP BY crc32(link_id);
/* 0 rows affected, 233 rows found. Duration for 1 query: 4.765 sec. */
SELECT link_id,COUNT(*) FROM ltlinks_log WHERE datalog BETWEEN '2012-03-01 00:00:00' AND '2012-04-01 00:00:00' GROUP BY crc32(link_id);
@hanafiah
hanafiah / php.xampp.mac.sh
Last active July 29, 2025 01:39
ubah default php path dalam mac osx
#1. buka terminal, dan taip arahan di bawah
which php
#2. secara default, lokasi php adalah seperti berikut
/usr/bin/php
#3. edit bash_profile
sudo vim ~/.bash_profile
#3a. if use zsh
<!DOCTYPE html>
<html>
<head>
<title>iframe test</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>change url to test</div>
<iframe src="http://www.amazon.com/" style='width:100%;height:300px' ></iframe>
<?php
$arr = [
'a' => [
0=>[
'file_name'=>'abc',
'file_type'=>'image/jpeg',
],
1=>[
'file_name'=>'def',
<?php
//contoh hash yang hendak di semak
$lookup_txt = 'sample1-123';
var_dump(is_txt_exist('ibnuyahya.com',$lookup_txt));
function is_txt_exist($tld,$lookup_txt){
$txts = dns_get_record($tld,DNS_TXT);
foreach ($txts as $txt) {
if($lookup_txt ==$txt['txt'] )
<?php
/**
* 1st. make sure you've created your access key in IAM. then configure credential file in the following path
*
* ~/.aws/credentials
* enter credentials info as below..
[default]
aws_access_key_id = YOUR_ACCESS_KEY_ID
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY
~ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed