Skip to content

Instantly share code, notes, and snippets.

View saifulapm's full-sized avatar
I may be slow to respond.

Saiful Islam saifulapm

I may be slow to respond.
View GitHub Profile
var years = [2022,2021,2020,2019,2018,2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,1977,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951];
var config = {
count: 0,
make: 0,
model: 0,
submodel: 0,
};
function syncStore(callback) {
var years = [2022,2021,2020,2019,2018,2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,1977,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1950];
var config = {
count: 0,
make: 0,
model: 0,
};
function syncStore(callback) {
if (years.length > config.count) {
var dataProducts = [];
var totalProducts = 0;
var dataLoaded = false;
var totalPage = 0;
var maxLimit = 13000;
function getCategory(type, total = 0) {
var brand = $("#brand option:selected").val();
var year = $("#years option:selected").val();
var make = $("#make option:selected").val();
var model = $("#model option:selected").val();
var dataProducts = [];
var totalProducts = 0;
var dataLoaded = false;
var totalPage = 0;
var maxLimit = 5000;
function getCategory(type, total = 0) {
var brand = $("#brand option:selected").val();
var year = $("#years option:selected").val();
var make = $("#make option:selected").val();
var model = $("#model option:selected").val();
var dataProducts;
var totalProducts = 0;
var currentCount = 0;
function getCategory(type) {
var brand = $("#brand option:selected").val();
var year = $("#years option:selected").val();
var make = $("#make option:selected").val();
var model = $("#model option:selected").val();
var subModel = $("#subModel option:selected").val();
var engine = $("#engine option:selected").val();
 vi /usr/local/etc/httpd/httpd.conf

Make chnage to those lines link

Listen 80
DocumentRoot /Users/your_user/Sites
<Directory "/Users/your_user/Sites">
AllowOverride All
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
@saifulapm
saifulapm / config_en.json
Created December 7, 2020 06:12
Mobile App Configuration
{
"HorizonLayout": [
{
"layout": "logo",
"showMenu": false,
"showSearch": true
},
{
"layout": "bannerImage",
"items": [
@saifulapm
saifulapm / nearby-coordinates.sql
Created May 12, 2020 18:11 — forked from statickidz/nearby-coordinates.sql
Ordering with SQL by nearest latitude & longitude coordinates (MySQL & SQLite)
---
METHOD 1
This should roughly sort the items on distance in MySQL, and should work in SQLite.
If you need to sort them preciser, you could try using the Pythagorean theorem (a^2 + b^2 = c^2) to get the exact distance.
---
SELECT *
FROM table
ORDER BY ((lat-$user_lat)*(lat-$user_lat)) + ((lng - $user_lng)*(lng - $user_lng)) ASC
@saifulapm
saifulapm / Setting up ESLint for NextJs.md
Last active March 28, 2023 13:34
Setting up ESLint and Prettier for NextJs

ESLint requires a few additional configurations to be set up optimally for use with Next JS.

To start off with, install eslint, eslint-plugin-react,

npm i --save-dev eslint eslint-plugin-react

Next, create a .eslintrc file using the following:

eslint --init
@saifulapm
saifulapm / zip.md
Created September 20, 2018 23:22
Making Zip archive in arch linux

How to make zip archive on arch linux

Must Need be Installed zip.. sudo pacman -Syu zip

zip -9 -r <zip file> <folder name>

To zip a single file:

zip -9