Skip to content

Instantly share code, notes, and snippets.

View syahmiibrahim's full-sized avatar

Syahmi Ibrahim syahmiibrahim

View GitHub Profile
@apih
apih / extra-code-form-footer.html
Last active January 29, 2024 00:36
OnPay: Show current donation amount and progress bar in the order form's text
<?php
interface HasherContract
{
public function encrypt($string);
}
class Aes implements HasherContract{
public function encrypt($string)
@nasrulhazim
nasrulhazim / readme.md
Last active December 9, 2016 07:17
Setting up Ajax in Laravel and it's Usage

Add Script Section in Layout

@yield('scripts')

Setup CSRF Token in $.ajaxSetup

jQuery(document).ready(function($) {
@zulhfreelancer
zulhfreelancer / malaysia_postcode_list.json
Last active June 8, 2020 12:11
Malaysia Postcode List By State (JSON)
{
"prepared_by": "Zulhilmi Zainudin",
"last_update": "21 June 2016",
"data": [
{
"state": "Selangor",
"codes": [
"40000",
"40100",

Most active GitHub users in Malaysia

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Mon, 14 Apr 2014 04:55:12 GMT till Tue, 14 Apr 2015 04:55:12 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -&gt; user.location = 'malaysia')
@quawn
quawn / getWorkingDays.php
Last active October 11, 2023 17:04
PHP: GetWorkingDays excluding weekend and holidays
<?php
function getWorkingDays($startDate,$endDate,$holidays) {
// do strtotime calculations just once
$endDate = strtotime($endDate);
$startDate = strtotime($startDate);
//The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24
//We add one to inlude both dates in the interval.
$days = ($endDate - $startDate) / 86400 + 1;